Now If We Could Get a Solution to the Home Directory Dotfile Hell!

Now If We Could Get a Solution to the Home Directory Dotfile Hell!

“Now if we could get a solution to the home directory dotfile hell!”[11] Making Linux NFS-mounted home directories useful again. Andrei Warkentin VMware, Inc. [email protected] Abstract 1 Introduction The title of this paper has been kindly borrowed from Unix environments have traditionally consisted of a BYU UUG email [11], that originally inspired me to multi-user and diverse multi-computer configurations, find a solution. backed by expensive network-attached storage. The re- cent growth and proliferation of desktop- and single While some systems prefer a centralized approach to machine- centric GUI environments, however, has made storing user-specific program configuration settings, it very difficult to share a network-mounted home di- Unix-like systems typically keep user preferences un- rectory across multiple machines. This is particularly der a number of hidden files and directories kept in the noticeable in the context of concurrent graphical logins root of the home directory. These hidden files and direc- or logins into systems with a different installed soft- tories are distinguished by a leading dot in their name, ware base.The typical offenders are the “modern” bits of and are thus generally called dotfiles. The historical be- software such as desktop environments (e.g. GNOME), havior is to store read-once configuration to avoid hard- services (dbus, PulseAudio), and applications (Firefox), coded choices, for example .profile stores instruc- which all abuse dotfiles. tions for customizing the shell session, .emacs stores EMACS editor settings, and so on. Perhaps due to Unix- Frequent changes to configuration format prevents the like systems being used in extensively networked, re- same set of configuration files from being easily used mote access and shared storage environments, dotfiles across even close versions of the same software. And were never meant to be used as a persistent database for whereas dotfiles historically contained read-once con- runtime-modified preferences, or as a locking mecha- figuration, they are now misused for runtime lock files nism, since that would have compromised the ability to and writeable configuration databases, with no effort log in concurrently into several machines with the same to guarantee correctness across concurrent accesses and account stored on the network. There was always some differently-versioned components. Running such soft- degree of inflexibility, where the same configuration file ware concurrently, across different machines with a net- would not work exactly as expected across different ver- work mounted home directory, results in corruption, sions of software1, yet the read-only nature of these files data loss, misbehavior and deadlock, as the majority of and conservative changes to setting schema meant you configuration is system-, machine- and installation- spe- could come up with a valid subset of settings for all ma- cific, rather than user-specific. chines and operating systems in use. The recent rise of “user-friendly”, graphical user This paper explores a simpler alternative to rewriting all interface-driven and largely PC-centric applications, existing broken software, namely, implementing sepa- however, has resulted in a number of popular software rate host-specific profiles via filesystem redirection of packages which are incompatible with the typical uni- dotfile accesses. Several approaches are discussed and versity or corporate heterogeneous environment based the presented solution, the Host Profile File System, al- around network-mounted home directories and network though Linux-centric, can be easily adapted to other logins. For recent software, such as the GNOME similar environments such as OS X, Solaris and the BSDs. 1E.g., .emacs or .vimrc for the famous editors. • 55 • 56 • “Now if we could get a solution to the home directory dotfile hell!”[11] Desktop Environment, there are no simple solutions $HOME to making them work in an environment where net- .mozilla work mounted home directories are a possibility, largely firefox due to ever evolving and fluid configuration formats. 2o1nz6r9.default Software distribution-specific minutiae and breaking lock changes across seemingly compatible major revisions of .parentlock software, results in an inability to share the same con- ... figuration files. In environments where the user can make some guarantees as to software versioning and Figure 1: Partial structure of Mozilla Firefox configura- configuration compatibility, concurrent network logins tion. are largely impossible due to the storage of writeable $HOME preferences and runtime data within dotfiles. Given .esd_auth that programs such as web browsers, WYSIWYG edi- .gconf tors and desktop environments also manipulate configu- apps ration from within the applications, treating their dot- evolution files as writable databases, you immediately run into gnome-terminal write collisions and configuration corruption when run- ... ning concurrent sessions on several machines. Fre- desktop quently, such software attempts to protect itself by cre- .gnome ating lock files (see Figure1), which results in denial ... of service condition during concurrent logins. Finally, system the trend towards providing services via remote pro- http-proxy cedure call mechanisms, seen in software such as IPC proxy buses and audio daemons like Enlightened Sound Dae- ... mon or PulseAudio, has resulted in storing named pipes, .gconfd sockets, authentication cookies, and other unspeakable saved-state things within their dotfiles, with largely predictable re- .gnome sults. .gnome2 As an example of all of these, logging in to a Red Hat Figure 2: Typical structure of GNOME 2 configuration. Linux RHEL 5 and SUSE Linux SLES11 system, con- currently or not, will result in a corrupted desktop on remote home directories and operating system-specific both hosts. Both of these systems use some variation of profiles [8]. GNOME 2. A typical file system layout for GNOME 2 configuration can be seen in Figure2. These issues are Roaming User Profiles (RUP) synchronize the local not new nor are they the only ones. Configuration file copy of the user profile, consisting of user directories collisions across different versions of software, com- and a user-specific registry hive holding configuration pounded by fragility and expressive verbosity for de- entries, with the remote server upon login and logout. 2 fault auto-generated settings has also been a bane for Conflicts are resolved based on modification time, and upgrading such software and its configuration success- the registry hive is treated as an opaque binary ob- fully. ject, with no fine grained synchronization. The weak- est spot of the entire mechanism is specifically rely- 2 Related Work ing on a synchronization mechanism and being largely unaware of what is being synchronized. Copying data back and forth imposes a noticeable penalty, on the or- The problem space itself is not particularly novel. der of minutes, for anything but the most trivial profile, Roaming User Profiles and Folder Redirection are two forcing users to store their data locally. By not relying similar technologies available to Microsoft Windows on network file access and locking semantics for con- users, which specifically deal with networked logins, current access, there is always the potential for silent 2As seen with GNOME 2, moving into GNOME 3. data loss caused by the “last modified wins” policy or 2012 Linux Symposium • 57 by failures during synchronization. Additionally, RUP $HOME is not capable of distinguishing between synchroniz- profiles ing settings and synchronizing application data. A lack andreiw-lnx ... Dotfiles of fine-grained synchronization of registry keys, and a specific to host lack of state separation between user settings and host- andreiw-lnx. .gnome2 specific user settings, results in inconsistent profile be- .xyzzy havior across systems configured with a different set of ... applications or with different versions and revisions of andreiw-vmw ... Dotfiles Windows. These limitations are somewhat addressed by specific to host using completely separate profiles for Vista and newer andreiw-vmw. versions, and by using the Folder Redirection mecha- .gnome2 nism to alias certain predefined user profile directories3 ... to network locations, bridging the separate profiles to andreiw-vm1 ... Dotfiles the degree that is possible and reducing the usability specific to host “threat” posed by synchronization. andreiw-vm1. .gnome2 A Roaming User Profile-like approach is not particu- ... larly feasible on Linux. Implementing such Windows .gnome2 semantics would mean using a local cache as the real .xyzzy ... Visible here because home directory, which would then be synchronized un- we are on host andreiw-lnx. der the user’s credentials with the network copy on log- ... ging in and logging out. This relies on having a mech- anism capable of resolving conflicts, and thus aware of Figure 3: View of a home directory on host andreiw-lnx, all the possible applications, and having a complex con- with dotfile redirection enabled. flict resolution policy. Getting this to work smoothly implies, at the very least, root access to all the machines • Mechanism and policy are separate. affected, and some pretty serious source-level hacks4 to get it all to work in a transparent and fail safe manner. • System configuration changes are minimal, ideally not requiring root access. 3 Solutions With this design there are, by default, no configura- Due to the limitations of a synchronization-based de- tion collisions, conflicts and deadlocks.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us