On Sun, 2007-02-18 at 12:09 -0500, David Zeuthen wrote:
Given the F7 schedule was pushed back one month I thought perhaps we
could spend this time on polishing stuff.
It looks like gnome-screensaver already drops a directory Pictures
in /etc/skel/Pictures  to ensure that the user gets the directory
~/Pictures. Personally, I'm a big fan of having pre-made directories in
a new users home directory. Mostly because it allows us to patch our
applications so they open the file chooser in the right directory.
I think we ought to do more of this. I also think we ought to formalize
Ok. Here is a counter-proposal for translations-on-disk:
Here is how it works:
Somewhere (early) in the login scripts we run xdg-user-dirs-update. It
reads a config file in /etc/xdg/user-dirs.conf, and a list of defaults
for user dirs in /etc/xdg/user-dirs.defaults (by default, it also
respects the xdg basedir spec if you want to tweak it). It also loads
the current user dir configuration in ~/.config/user-dirs.dirs, if it
For each default specified dir type (DESKTOP, TEMPLATES, etc) that is
not already in the user config the directory-name is decided based on
the default config and translations in gettext. This directory is
created and the user config is updated to point to it.
Some old directories (like ~/Desktop) are special cased such that a
translated version of them are not created if the old one exists
already. This gives some backwards compatibility.
If a user-configured directory doesn't exist anymore (the user deleted
it) we don't recreate it, instead we change the settings to point it to
There is also a --force flag that ignores any existing settings and just
creates and sets up localized dirs.
The user config files for the dirs is in a form that allows shell
scripts to do:
Included in the source is a ANSI-C version of xdg_user_dir_lookup() that
is just one function and calls only libc functions. Its easy to cut and
paste into any application if we need to patch them. For real desktop
integration the idea is that the desktops themselves would add support
for this in their platform libraries.
Here is how the current default config files look, as an example:
# Default settings for user directories
# The values are relative pathnames from the home directory and
# will be translated on a per-path-element basis into the users locale
# Another alternative is:
And here is a typical ~/.config/user-dirs.dir
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line your interested in
# All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is shell-escaped. No other format
Alexander Larsson Red Hat, Inc
He's an ungodly pirate boxer looking for a cure to the poison coursing through
his veins. She's a man-hating hypochondriac barmaid from a family of eight
older brothers. They fight crime!