cosimo.cecchi at gmail.com
Wed Jan 15 11:00:41 PST 2014
I'd like to propose an extension to the current xdg-user-dirs mechanism to
make it possible to create application-specific subdirectories in user
dirs, which are subject to the same translation rules applied to their
* An application (e.g. a sound recorder) wants to save a file in a
subdirectory of $XDG_MUSIC_DIR. Another sound recorder wants to save files
in the same subdirectory, and doesn't want to worry about the translations
for each language to be in sync.
* A photo booth application wants to save pictures to a webcam snaps
subdirectory of $XDG_PICTURES_DIR. An "user properties" settings panel in
the desktop environment allows to pick an avatar picture through a file
chooser, which should default to the webcam snaps place.
There's a bunch of similar cases, which you can find in this bug  where
this message originates from.
We need a way for applications to describe and own those subdirectories
inside XDG user dirs. I think this could be as simple as the application
dropping a desktop file on installation, in a well-known directory - for
example $XDG_DATA_DIRS/xdg-user-dirs. Such a desktop file would have a
Name[it]=Scatti dalla Webcam
An utility like xdg-user-dirs-update would then take care of renaming such
directories early at login, together with their parents. Toolkit support
would be achieved with a function that returns the full path of a
subdirectory given the basename of its desktop file descriptor.
In the example above, if the file is called "gnome-webcam.desktop", a GNOME
application would call g_get_user_special_dir_for_id
("gnome-webcam.desktop"); which would return "$HOME/Pictures/Webcam
Snapshots" in English and "$HOME/Immagini/Scatti dalla Webcam" in Italian.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xdg