GNOME Bugzilla – Bug 724138
Add support for pretty hostnames
Last modified: 2014-02-13 14:15:12 UTC
Read and parse /etc/machine-info to obtain a pretty human readable hostname (eg. "Bob's Laptop" instead of "bob-laptop"). If the file is not found, or it can't be parsed, we fall back on the normal hostname. In GNOME, the pretty hostname can be configured in the control center details and sharing panels. In other systems, it can be changed using "hostnamectl --pretty".
Created attachment 268823 [details] [review] Add support for pretty hostnames
Review of attachment 268823 [details] [review]: Otherwise looks ok, thanks ::: src/librygel-core/rygel-root-device-factory.vala @@ +45,3 @@ + var parts = line.split ("="); + + if (parts[0] == "PRETTY_HOSTNAME") Missing curlies. @@ +48,3 @@ + return string.joinv("=", parts[1:-1]); + } + } catch (GLib.Error e) { } Please add a debug message here (debug because the fail isn't severe), empty catches are a PITA when something goes wrong (and if it's only "Why is pretty name not working")
Created attachment 268961 [details] [review] Add support for pretty hostnames Read and parse /etc/machine-info to obtain a pretty human readable hostname (eg. "Bob's Laptop" instead of "bob-laptop"). If the file is not found, or it can't be parsed, we fall back on the normal hostname. In GNOME, the pretty hostname can be configured in the control center details and sharing panels. In other systems, it can be changed using "hostnamectl --pretty".
Review of attachment 268961 [details] [review]: +1
Attachment 268961 [details] pushed as 93cc069 - Add support for pretty hostnames