storage location for common user directories

Benjamin Meyer benjamin.meyer at
Thu Mar 9 13:53:29 EET 2006

On Wednesday 08 March 2006 16:39, Jamie McCracken wrote:
> Benjamin Meyer wrote:
> > On Wednesday 08 March 2006 16:27, Jamie McCracken wrote:
> >> Benjamin Meyer wrote:
> >>> I am curious if anyone has through about making a storage location
> >>> standard for user directories.  More generic then Trash there are a
> >>> handfull of directories that would be usefull to know such as: Desktop,
> >>> Documents, Applications, Music, Movies, and Pictures.
> >>
> >> IIRC, this was discussed a year ago or so on the gnome-dev lists. Other
> >> folders were specified too like Downloads and Templates.
> >
> > Do you remember which list and/or the list of folders that was created?

Good reads, thanks

> >> The conclusion was we would not hardcode the paths of the directories
> >> because of language translations, whether to have them in $Home or
> >> $Desktop, making them configurable so Documents could point to a shared
> >> folder on a server etc
> >
> > I found that in OS X they have a function (FSFindFolder) which will
> > return the translated name of the folder for display purposes.
> yes but that inadequate for us cause we need to configure the paths
> rather than hardcode them (which would cause endless arguments as I
> stated above and int he links)

Well they are separate things, there is an API to get the 'desktop' folder and 
there is a separate api that will give you the translated name of that 
folder.  Similar to the .directory files OS X has a .localized file which can 
provide a localized name for that directory.  

This solution seems a lot better then the Windows way of having the actual 
folder name be the translated name.  You probably have seen different 
"Program Files" folders in different locales all on the same computer.  In a 
similar vain (on the linked thread) was the idea of renaming the folders when 
you changed locales, but I think everyone agreed that was just a bad idea.

There are really two questions that the API would need to address, where is 
the location for X and what is the translations for X (if there is one).

Unless we plan on having a desktop settings file sometime soon an environment 
variable seems to be the only solution to the first problem.  Using Music as 
an example to find out the location an environment variable $MUSIC_LOCATION 
would be checked and if it doesn't exists then it can default to ~/Music.  
The environment variable can be set by the desktop environment.  Changes 
would of course requires a restart of applications or even the desktop.  When 
the day comes that we have a common settings system the specification can be 
amended with it.

This lets the desktop environment decide if it wants the actual directory name 
to be Movies to be "Movies", "Videos" or "película".  For translations if the 
directories weren't translated, using .directory files with translations 
seems like a reasonable solution.

The specification would not make recommendations on if a desktop should create 
those folders the first time a user logs in (up to the desktop environment if 
it wants to or not).

-Benjamin Meyer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 

More information about the xdg mailing list