-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set hostname #113
Set hostname #113
Conversation
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? |
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? |
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 |
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 |
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? |
@danrabbit I should have read the documentation first:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meisenzahl it looks like according to https://www.freedesktop.org/software/systemd/man/org.freedesktop.hostname1.html we need to use SetPrettyHostname
as well and we should be transforming the value of SetStaticHostname
the same way we do username. So for example:
- The user inputs "Daniel's Yoga"
SetPrettyHostname
should use the valueDaniel's Yoga
SetStaticHostname
should use the valuedaniels-yoga
@danrabbit thanks for reviewing so accurately despite your stress with the release. I hope that I have now taken everything into account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of other small comments. It also looks like there's a permissions issue. Adding the hostname interface to the pkla file in data seems to fix it
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 |
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 (
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! |
@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 😃 |
@danrabbit I think I got it right. |
@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 |
Co-authored-by: Cassidy James Blaede <cassidy@elementary.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danrabbit is there any way to test initial-setup
in lightdm
without deleting my user?
|
||
[Host name] | ||
Identity=unix-user:lightdm | ||
Action=org.freedesktop.hostname1.set-hostname;org.freedesktop.hostname1.set-static-hostname; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Action=org.freedesktop.hostname1.set-hostname;org.freedesktop.hostname1.set-static-hostname; | |
Action=org.freedesktop.hostname1.set-pretty-hostname;org.freedesktop.hostname1.set-static-hostname; |
I'm not familiar with the pkla file format at all, unfortunately, but that might work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current value is fine, see here for possible values: https://www.freedesktop.org/software/systemd/man/org.freedesktop.hostname1.html#Security
@meisenzahl not that I'm aware of, but as far as I can tell the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that this works, displays the default hostname, updates the hostnames, and still creates users. 😄
Peek.2021-08-07.21-22.mp4
@cassidyjames I hope this is what you had in mind?