well-known user folders, a proposal
alexl at redhat.com
Thu Feb 22 05:07:51 PST 2007
On Thu, 2007-02-22 at 13:44 +0100, Frederic Crozat wrote:
> -give users predefined directories in their home to store their data :
> Download, Documents, Music, Pictures and Video (this is newbie
> -allow quick access to these directories from the various file selectors
> (GNOME, KDE)
> -allow those directories to be distinguished when using file manager
> (nautilus, konqueror) with a different icon, but handled as standard
> -only display localized names in the UI
> -be able to access those directories now or in the future using scripts
> without too much trouble even if they are localized.
> -if users choose to delete these directories, they should not come back
> or be displayed in any UI anymore
> -if possible, applications save/load difectories should be using those
> directories by default.
Sounds like sensible goals. And i think my approach caters well to them.
> To try to fix some problems, we changed implementation :
> -at first login, a directory called ~/.mdk-folders is created
> -we create real directories with localized name on disk in $HOME and we
> create symlink in ~/.mdk-folders to those directories, symlink name
> being the english name (easier scripting if needed)
> -we create .desktop file in ~/.mdk-folders pointing to those directories
> -we add .directory file in the created directories, allowing konqueror
> to display a nice icon for those directories (unfortunately, it can't be
> done in nautilus and shouldn't, it adds performance penalty too).
> -we patched KDE file selector to search for .desktop file in
> ~/.mdk-folders and add them as shortcuts in file selector
> -we add those .desktop file in ~/.gtk-bookmarks
Several people have proposed using symlinks like this. It certainly
makes it very easy to use from a shell. However, there is imho a clear
risk that such filenames (like ~/.mdk-folders/.desktop/) escape to the
user in an unresolved form and end up exposing internal implementation
details in e.g. the file chooser. Thats why I avoided them in my
For the nautilus part, i think it will be faster if we map it the other
way. I.E. not for each directory read a file, but just read the
directory config file once and match directory filenames with that.
> -encoding : for our (Mandriva) solution, since we hadn't switched to all
> locales to UTF-8 at that time, we were using charset from current locale
> (using "locale charmap")
Ok. I'll try to add this.
> -set of directories : here is our own list : documents, download, music,
> pictures, video
so, photos->pictures (what Benedikt said too), and add video. Makes
Alexander Larsson Red Hat, Inc
alexl at redhat.com alla at lysator.liu.se
He's a benighted guitar-strumming astronaut looking for a cure to the poison
coursing through his veins. She's a disco-crazy gypsy queen of the dead trying
to make a difference in a man's world. They fight crime!
More information about the xdg