Bug 1028758

Summary: no easy way to change computer name before or during installation
Product: [Fedora] Fedora Reporter: Alexander van Loon <a.vanloon>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: anaconda-maint-list, a.vanloon, g.kaviyarasu, jonathan, mcatanzaro+wrong-account-do-not-cc, vanmeeuwen+fedora, vpodzime
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-16 17:00:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexander van Loon 2013-11-10 14:09:13 UTC
This has been discussed before and I don't want to come across as a nag, but I hope the Anaconda developers could please reconsider this usability issue.

To summarize, see bug #904014 and GNOME bug 692923 [1]. It is GNOME's position that a non-root user should not be allowed to change the computer name in GNOME under Settings → Details. Fedora's live image environment gives the user root privileges, making it possible to change the host name. A changed host name in the live environment should apparently carry over to the installed system. The position of Anaconda's developers (Chris Lumens to be precise) is that users can do exactly so: change the computer name in Settings → Details before starting the installation. This is the reason for the refusal to revive the option to enter the computer name during the installation.

But I wonder how the Anaconda developers expect a new user to figure this out? Apart from these bug reports this procedure to change the computer name isn't explained anywhere. My guess is that most users will simply not know how to change the computer name and will get one assigned automatically. The one I got in Fedora 20's alpha was "linux-2.fritz.box". This is bad, because computer names are supposed to help you identify computers on your network, and I think everyone will agree that these silly automatically generated names do not help with easy identification.

My proposal is to simply revive the question for the computer name during the installation. And if this is technically not feasible for some reason, can we please think of another user-friendly way to allow changing the computer name?

[1] https://bugzilla.gnome.org/show_bug.cgi?id=692923

Comment 1 Vratislav Podzimek 2013-11-11 07:48:14 UTC
Would you be willing to create an Anaconda addon providing that screen? [1] I would, of course, give a helping hand every time needed.

[1] http://vpodzime.fedorapeople.org/anaconda-addon-development-guide/

Comment 2 Alexander van Loon 2013-11-11 17:43:18 UTC
Willing certainly, but I'm not sure if I'm able to. I've got some experience with HTML, CSS and R but I'm not an experienced programmer. From your link I understand that Anaconda uses Python and I remember hearing that Python is relatively easy to learn. 

In the coming days/weeks I'll read your link in detail and give it a shot. I'm unemployed so I have a relatively large amount of free time available. I will report back here in this bug report when I have made progress.

Comment 3 Vratislav Podzimek 2013-11-12 07:34:03 UTC
(In reply to Alexander van Loon from comment #2)
> Willing certainly, but I'm not sure if I'm able to. I've got some experience
> with HTML, CSS and R but I'm not an experienced programmer. From your link I
> understand that Anaconda uses Python and I remember hearing that Python is
> relatively easy to learn. 
> 
> In the coming days/weeks I'll read your link in detail and give it a shot.
> I'm unemployed so I have a relatively large amount of free time available. I
> will report back here in this bug report when I have made progress.
Feel free to email me any comments or questions, I'll be glad to help.

Comment 4 Chris Lumens 2014-05-05 17:39:10 UTC
*** Bug 1094068 has been marked as a duplicate of this bug. ***

Comment 5 Michael Catanzaro 2014-05-06 00:00:20 UTC
Since this was marked a duplicate of Bug #1094068, I'll mention that the hostname field should use hostnamed so that it can accept pretty hostnames with spaces and special characters, like GNOME and systemd do.

Comment 6 David Shea 2015-01-16 17:00:40 UTC
1) We don't really care what systemd has decided to redefine the hostname to be. The network spoke sets the network hostname.

2) You can set the pretty hostname in the live environment using the details settings

3) Setting the pretty hostname in the sysyroot is basically impossible. hostnamectl depends on hostnamed being running in order to write out the machine-info file, which is not feasible in the chroot. We can't write the machine-info file because it uses arcane, undocumented quoting rules. The man page states that the machine-info as generated by hostnamed can be sourced by a shell, but it doesn't take very long to find shell-quoted strings that are misinterpreted by hostnamed. For example, '\', which comes out as a single-quote.