From Fedora Project Wiki

Better Hostnames

Summary

Maintain a user-friendly name for your computer in addition to the regular hostname, and use it in the user interface.

Owner

Current status

  • Targeted release: Fedora 13
  • Last updated: 2009-11-13
  • Percentage of completion: 33%

The xdg-hostname service has been written, and we have a dialog that allows editing the computer name. Next steps:

  • Package xdg-hostname
  • Add the dialog to nautilus
  • Add a read-only api for computer name(s) to GLib
  • Use this throughout the stack: NetworkManager, vino, gnome-user-share, avahi, bluez/gnome-bluetooth
  • Use PolicyKit to control editing privileges in xdg-hostname
  • Make the installer set friendly hostnames

Detailed Description

Computers need names in many different contexts. There's the traditional hostname that works for routing network traffic, but there is also the need to show computers by name in the user interface in many places: on the login screen ('Welcome to ...'), in the nautilus 'Computer' window, when browsing network shares, when sending somebody connection details for sharing your desktop, etc. In addition, it is often useful to have an icon that goes along with the name (we already support this in some fashion with /etc/favicon).

To make matters more complicated, the hostname that is used for routing network traffic may be 'transient', because it can depend on the network you are on at the time, and might change at unpredictable times.

Currently, we don't do a very good job of this. The installer/firstboot offer to set a hostname, but the default is 'localhost.localdomain'. We don't offer any way to change the computer name from the desktop.

David has written the xdg-hostname service to solve this problem. It is a small, activated service on the system bus that maintains the various names for the computer, and offers a dbus API to change it.

The client-side API that is currently included in the xdg-hostname repository will be replaced by a read-only API in GIO. The (few) clients that need to change the names will use the dbus API directly.


Benefit to Fedora

Working with multiple computers in a networked environment is a lot more user-friendly if these computers appear with consistent, readable names and icons everywhere.

Scope

  • xdg-hostname needs to be packaged
  • GIO api needs to be written and committed upstream
  • The hostname edit dialog needs to be added to nautilus
  • Various components need to be patched to use the GIO api for friendly hostnames: NetworkManager, vino, gnome-user-share, bluez/gnome-bluetooth, avahi
  • Anaconda and/or firstboot should write out an initial configuration for xdg-hostname

How To Test

TBD

User Experience

During the installation, the user will be asked for a 'friendly' name in addition to the traditional hostname. Ideally, both fields will have sensible defaults.

On the desktop, the nautilus 'Computer' icon will have a name that uses the 'friendly' computer name. Renaming that icon brings up the hostname editing dialog.

Services that are advertised over the network, such as file sharing via gnome-user-share, remote desktop via vino, music sharing via DAAP, etc., will appear with the 'friendly' computer name and icon.

Dependencies

  • anaconda/firstboot changes would be nice to have, but are not central to this feature


Contingency Plan

The core parts of this feature are getting xdg-hostname packaged and adding the hostname editing dialog to nautilus. Beyond these, the rest of the feature is more incremental in nature.

The contingency plan for the core parts of the feature is to just not install xdg-hostname. Then everything should fall back to using the traditional hostname, as before.

Documentation


Release Notes

TBD

Comments and Discussion