I was always annoyed by the fact that every application seems to put hidden files in the home directory wherever and named however it wants. This is messy ("ls -a" is hardly usable). But what's most annoying is that it becomes very hard to separate files by purposes, for instance to copy a configuration to another computer.
KDE and Gnome each have some standards for how their apps put files in the home directory, but it's not universal, and they don't seem to scratch my itch. xdg-user-dirs does this for data files, but not for the configuration. I'd like to see the mess in ~ organized by purpose. The structure I'm thinking of would have a (small) set of directories. Each application would create a file or a folder with its name in each folder it needs. ~/.config -- Every user-defined setting (including 'history' of user actions). Examples of info that would enter here are: bash's profile and the .bashrc file, and bash-history (or any history) firefox's use profiles, including all per-user extensions installed, configuration and bookmarks, but excluding cache azureus's config, including where files should be downloaded, but excluding anything related to downloads in progress amarok's settings, including the library (it contains user ratings, etc) but excluding the cover cache gnome-settings-daemon: everything it knows that belongs to the user (ie, if there are per-machine settings they are probably in /etc, right?) all the settings is ~/.kde/apps, but excluding any caches and temporary files beagle and tracker's list of directories to index user-installed fonts, themes, plugins, scripts; sessions; profiles; bookmarks; customizations; The point of this directory is that once it's copied to another machine, every app that is shared between the two computers should behave identically (except version differences). Also, if this is deleted, every application that keeps data there should behave exactly as a newly-installed app, with exactly all default settings. ~/.temp -- Every file that is needed at runtime but isn't useful in itself between executions. If the contents of this directory are always deleted at log-off, nothing should change in an application's behavior. Examples include control sockets, lock files, etc. ~/.cache -- Everything that if deleted wouldn't change an application's behavior, except for speed. firefox's (and any browser's) web cache amarok's cover cache beagle's, tracker's search indexes any application's in-progress downloads (but which files are downloaded should be in ~/.config, so if the cache is deleted the download can be retried). Examples are firefox and other browsers, azureus and any torrent client, any file-sharing program, etc. Applications' that don't resume downloads at all would put these in ~/.temp, though. the .thumbnails directory every other cache and index that can be rebuilt using only the settings in ~/.config without user intervention application logs -- the difference between these and 'history' is that 'history' is read by applications and offered to users in the UI (think firefox). Logs are those read by the user, not by the original app. The point of all this is that ~/.config would be a manageable-size directory which can be easily copied between machines. Most importantly, it can be backed up and restored. It can be deleted to restore a standard configuration. It can be made read-only to prevent _all_ user configuration changes. Admins could simply make a copy of one to create a template for new user accounts. And all contents would be non-hidden (they don't need to be, as the base directory is hidden), so it's a bit simpler to explore it if needed. The ~/.temp directory prevents applications from filling the ~ with all sorts of temporary files and can be erased automatically at each log-off; some security might be gained this way, too. ~/.temp and ~/.cache are just two directories, and thus easy to prevent all indexing and back-up tools from entering them. (If this standard would be accepted, it would be the default setting to avoid them. Even nautilus would refrain from thumbnailing things in there.) The separation also allows the user to put ~/.config, ~/.temp and ~/.cache on different partitions (via links), for instance a journaled FS for ~/.config and a fast scratch disc for ~/.temp and ~/.cache. Note that this doesn't include any data that the user normally interacts with directly. Downloaded files (from Firefox, torrents, DC, IM clients) will go to wherever the user wants them to _when_ they are finished downloading. Media files would be either in ~/Music or wherever the user wants. Something like iTunes would put settings in ~/.config, downloading files in ~/.temp, caches of cover images and internet pages in ~/.cache, and the music files in ~/Music or another user-picked directory. A database application wouldn't put its database in ~/.config, because it's data that doesn't change its behavior (analogue to music or video). How do you think we should do all this? I imagine something like xdg-user-dirs might be nice, to standardize things with other distros. A single settings file in /etc/ would give the standard name of these dirs, so users can change them to, say ~/.settings, ~/.tmp and ~/.tmp/cache if they want to. Most applications have a file in /etc which can control where they look for config files, so in many cases we'll only need to change some default config files. But some things might need patching the source to separate the different kinds of info. (For instance, Firefox's profiles.) The advantage of having a well-defined standard is that we could file bugs on launchpad against each application that doesn't conform, rather than each user meddling with the config of each application by themselves. -- Bogdan Butnaru — [EMAIL PROTECTED] "I think I am a fallen star, I should wish on myself." – O. On Feb 5, 2008 2:42 PM, Jo-Erlend Schinstad <[EMAIL PROTECTED]> wrote: > It would be nice if we had one directory for downloads, whether you > download using Firefox, Transmission, or something else. Now, when you > download, it's automatically sent to the root of your home directory, > causing a lot of unnecessary clutter, unless you manually configure > the applications to use a specific folder for this. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop