Features/BetterHostname

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
(Release Notes)
(Comments and Discussion)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Better Hostnames =
+
= Better computer names =
  
 
== Summary ==
 
== Summary ==
Line 10: Line 10:
  
 
== Current status ==
 
== Current status ==
* Targeted release: [[Releases/13 | Fedora 13 ]]
+
* Targeted release:  
* Last updated: 2009-11-13
+
* Last updated: 2009-11-23
 
* Percentage of completion: 33%
 
* Percentage of completion: 33%
  
Line 22: Line 22:
 
* Use PolicyKit to control editing privileges in xdg-hostname
 
* Use PolicyKit to control editing privileges in xdg-hostname
 
* Make the installer set friendly hostnames
 
* Make the installer set friendly hostnames
 +
* Make the necessary configuration changes to have changes in xdg-hostname appear in /etc/hostname and NSS
  
 
== Detailed Description ==
 
== Detailed Description ==
Line 35: Line 36:
 
The client-side API that is currently included in the xdg-hostname repository will be replaced by a read-only
 
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.
 
API in GIO. The (few) clients that need to change the names will use the dbus API directly.
 
  
 
== Benefit to Fedora ==
 
== Benefit to Fedora ==
Line 46: Line 46:
 
* Various components need to be patched to use the GIO api for friendly hostnames: NetworkManager, vino, gnome-user-share, bluez/gnome-bluetooth, avahi
 
* 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
 
* Anaconda and/or firstboot should write out an initial configuration for xdg-hostname
 +
 +
Note that this page describes the changes in the desktop spin related to this feature. Other spins, such as the KDE or Xfce spins, can of course use the xdg-hostname DBus service, but they will probably require some integration work and user interface changes that are not described here. If people are willing to work on this for other spins, the scope of the feature can be extended.
  
 
== How To Test ==
 
== How To Test ==
TBD
+
# During installation, verify that the hostname screen has sensible defaults for the display hostname and the regular hostname.
<!-- This does not need to be a full-fledged document.  Describe the dimensions of tests that this feature is expected to pass when it is done. If it needs to be tested with different hardware or software configurations, indicate them. The more specific you can be, the better the community testing can be.  
+
# After installation, verify that nautilus' computer icon has a name that reflects the display hostname set during installation.
 
+
# Enable file sharing in gnome-user-share and verify on another system that the service is advertised with the display hostname and icon.
Remember that you are writing this how to for interested testers to use to check out your feature - documenting what you do for testing is OK, but it's much better to document what *I* can do to test your feature.
+
# Enable remote desktop sharing in vino and verify on another system that the service is advertised with the display hostname and icon.
 
+
# Enable DAAP music sharing in rhythmbox and verify on another system that the service is advertised with the display hostname and icon.
A good "how to test" should answer these four questions:
+
# Rename the nautilus computer icon. You should get a hostname editing dialog that lets you set a display hostname, icon and regular hostname for your computer.
 
+
# Verify that the ability to make changes in this dialog is controlled by a PolicyKit policy.  
0. What special hardware / data / etc. is needed (if any)?
+
# In the hostname editing dialog, change the display hostname and icon. Verify that this change is reflected in services that advertised via DNS-SD such as file sharing, remote desktop sharing and DAAP music sharing.
1. How do I prepare my system to test this feature? What packages
+
# Verify that changes to the display hostname and icon are reflected on the login screen
need to be installed, config files edited, etc.?
+
# Verify that changes to the regular hostname are reflected in /etc/hostname
2. What specific actions do I perform to check that the feature is
+
working like it's supposed to?
+
3. What are the expected results of those actions?
+
-->
+
  
 
== User Experience ==
 
== User Experience ==
Line 72: Line 70:
 
== Dependencies ==
 
== Dependencies ==
 
* anaconda/firstboot changes would be nice to have, but are not central to this feature
 
* anaconda/firstboot changes would be nice to have, but are not central to this feature
 
  
 
== Contingency Plan ==
 
== Contingency Plan ==
Line 82: Line 79:
 
== Documentation ==
 
== Documentation ==
 
* http://people.freedesktop.org/~david/xdg-hostname/
 
* http://people.freedesktop.org/~david/xdg-hostname/
 
  
 
== Release Notes ==
 
== Release Notes ==
Line 88: Line 84:
  
 
== Comments and Discussion ==
 
== Comments and Discussion ==
* See [[Talk:Features/YourFeatureName]]   
+
* See [[Talk:Features/BetterHostname]]   
 
+
  
 
[[Category:FeaturePageIncomplete]]
 
[[Category:FeaturePageIncomplete]]

Latest revision as of 18:10, 12 January 2010

Contents

[edit] Better computer names

[edit] Summary

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

[edit] Owner

[edit] Current status

  • Targeted release:
  • Last updated: 2009-11-23
  • 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
  • Make the necessary configuration changes to have changes in xdg-hostname appear in /etc/hostname and NSS

[edit] 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.

[edit] 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.

[edit] 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

Note that this page describes the changes in the desktop spin related to this feature. Other spins, such as the KDE or Xfce spins, can of course use the xdg-hostname DBus service, but they will probably require some integration work and user interface changes that are not described here. If people are willing to work on this for other spins, the scope of the feature can be extended.

[edit] How To Test

  1. During installation, verify that the hostname screen has sensible defaults for the display hostname and the regular hostname.
  2. After installation, verify that nautilus' computer icon has a name that reflects the display hostname set during installation.
  3. Enable file sharing in gnome-user-share and verify on another system that the service is advertised with the display hostname and icon.
  4. Enable remote desktop sharing in vino and verify on another system that the service is advertised with the display hostname and icon.
  5. Enable DAAP music sharing in rhythmbox and verify on another system that the service is advertised with the display hostname and icon.
  6. Rename the nautilus computer icon. You should get a hostname editing dialog that lets you set a display hostname, icon and regular hostname for your computer.
  7. Verify that the ability to make changes in this dialog is controlled by a PolicyKit policy.
  8. In the hostname editing dialog, change the display hostname and icon. Verify that this change is reflected in services that advertised via DNS-SD such as file sharing, remote desktop sharing and DAAP music sharing.
  9. Verify that changes to the display hostname and icon are reflected on the login screen
  10. Verify that changes to the regular hostname are reflected in /etc/hostname

[edit] 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.

[edit] Dependencies

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

[edit] 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.

[edit] Documentation

[edit] Release Notes

Starting with F13, Fedora system maintain a 'display hostname' in addition to the regular hostname. The display hostname will be used when advertising services over DNS-SD and when presenting hostnames in the user interface.

[edit] Comments and Discussion