Overview: hostnamectl set-hostname rejects pretty hostnames which contain apostrophes, despite the example in hostnamectl's manpage ("Lennart's Laptop") containing an apostrophe. Steps to Reproduce: # hostnamectl set-hostname --pretty "Phil's Laptop" Actual Results: The error "Failed to issue method call: Invalid argument" is printed. Expected Results: No error; /etc/machine-info should contain the supplied pretty name. Build Date & Platform: systemd-196, Arch Linux Additional Information: I believe this occurs because systemd-hostnamed calls string_is_safe() on the new pretty hostname (hostnamed.c:554), which rejects apostrophes (along with backslashes and double quotes) (util.c:5562).
Just wanted to confirm this bug on Arch, systemd 197 $ hostnamectl set-hostname --pretty "Nathaniel's Desktop" Failed to issue method call: Invalid argument $ hostnamectl set-hostname --pretty "Nathaniels Desktop" $ hostnamectl status .. Pretty hostname: Nathaniels Desktop Works without the apostrophe.
fixed with commit "ebe5d6d..."
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.