well-known user folders, a proposal

Frederic Crozat fcrozat at mandriva.com
Thu Feb 22 07:28:06 PST 2007


Le jeudi 22 février 2007 à 14:07 +0100, Alexander Larsson a écrit :
> 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
> > oriented).
> > -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
> > directories
> > -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.

Indeed.

> > 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
> version.

We used the symlink approach because it was the faster way to do it. But
since goal here is to do a "clean" solution, I really prefer easy to
parse files from your solution.

> 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.

Yes and monitor it for changes, just in case.

> > -set of directories : here is our own list : documents, download, music,
> > pictures, video
> 
> so, photos->pictures (what Benedikt said too), and add video. Makes
> sense.

As a personal note, I prefer Photos, but this is because I only do
photos. So Pictures is better. 

Or maybe we should separate both (since Photos might be more relevant
for apps like digikam or f-spit).

-- 
Frederic Crozat <fcrozat at mandriva.com>
Mandriva




More information about the xdg mailing list