elementary / initial-setup

New user setup app designed for elementary OS
https://elementary.io
GNU General Public License v3.0
35 stars 11 forks source link

Set hostname #113

Closed meisenzahl closed 3 years ago

meisenzahl commented 3 years ago

Bildschirmfoto von 2021-08-07 21 21 07

https://user-images.githubusercontent.com/10796736/128611789-dd02eed2-df4d-4a75-8f18-b765482d33cf.mp4

@cassidyjames I hope this is what you had in mind?

cassidyjames commented 3 years ago

Hmmm. I know a device name is not technically the same as the user, but I wonder if we could include it on that view since it’s just a single field?

meisenzahl commented 3 years ago

Bildschirmfoto von 2021-08-08 10 49 10

Hmm, I don't really like it because the field doesn't fit the title of the page thematically.

cassidyjames commented 3 years ago

Thoughts from @elementary/ux?

My worry is adding a whole extra page and step for something that most people probably should just leave with the defaults (since the installer chooses a hardware-based name with a unique hash). It feels really heavy to say, "here's a whole step, you probably don't want or need to change it, but here you go!" whereas it feels a bit more natural to include the single field along with the first user's details.

The fact that the device name is not technically part of the account is probably fine?

danirabbit commented 3 years ago

Maybe we can double space between the rest of the user details and the device name? It does feel a little bit awkward since it's kinda unrelated to creating the user

vjr commented 3 years ago

How about not doing this in initial setup and instead making the hostname editable in the about plug and/or sharing plug? This will allow people to change the name later on as well if they feel the need.

The default can be left as elementary-os initially...

See https://github.com/elementary/switchboard-plug-sharing/issues/53

meisenzahl commented 3 years ago

With increased spacing to hostname:

Bildschirmfoto von 2021-08-09 06 53 22

danirabbit commented 3 years ago

Design looks good, but I can't confirm that this is working. Is there any validation that we need to be doing here? Like symbols that aren't allowed, spaces etc?

meisenzahl commented 3 years ago

@danrabbit I should have read the documentation first:

SetStaticHostname sets the device name.

meisenzahl commented 3 years ago

@danrabbit thanks for reviewing so accurately despite your stress with the release.

I hope that I have now taken everything into account.

meisenzahl commented 3 years ago

The device name is now invalid if it is prefilled with the current hostname:

image

danirabbit commented 3 years ago

Hm I'm not sure we need to force people to change the name. It's possible that they're perfectly happy with the generated name

iancleary commented 3 years ago

This is something I did miss during Elementary OS 6 installation today and noticed was absent (relative to the Ubuntu 21.04 installer).

Certain users or organizations prefer to have a hostname naming convention for their machines (lp-icleary-eos, framework-laptop etc.). That may be handled in their processes after the OEM installation step (I'm not that close to that world, but just brainstorming if this option is useful to those folks).

I was able to edit /etc/hostname, /etc/hosts/ as normal to change it to my preference. I'm now just realizing that method may be ignorant of the pretty hostname concept (today I learned πŸ˜„ ).

I think giving users the option during the installer flow would be a clean improvement, especially to align with the paradigm of not needing the command line (while it being available if you need it). I say this assuming the above design considerations are met within the Users screen to make it less awkward and not knowing how many people change the generated name. So not a big deal for me to do it post install, but I just wanted to share my user experience.


Congrats on the release! πŸ₯³ I'm excited to test it out on my Framework laptop! Thanks again for all you do with elementary OS.

meisenzahl commented 3 years ago

@danrabbit sorry, I should have worded that differently. My problem is that by default the entry for the hostname is invalid. This is not intentional on my part, but I currently can't find a solution that validates the hostname properly when programmatically setting it:

hostname_entry = new Granite.ValidatedEntry () {
    activates_default = true,
    hexpand = true,
    text = Utils.get_hostname ()
};

I would appreciate some help πŸ˜ƒ

meisenzahl commented 3 years ago

@danrabbit I think I got it right.

danirabbit commented 3 years ago

@meisenzahl I can confirm validation is working now. We're stilling running into some permission errors it looks like. I've tried updating the pkla file here but for some reason Polkit.Permission.sync is not returning with permission

danirabbit commented 3 years ago

@meisenzahl not that I'm aware of, but as far as I can tell the userdel command doesn't delete your home directory, so if you recreate the same user it shouldn't really be noticeable. YMMV etc but that's been my experience on a test machine