well-known user folders, a proposal
sbrabec at suse.cz
Fri Feb 23 03:13:03 PST 2007
Alexander Larsson píše v Pá 23. 02. 2007 v 08:52 +0100:
> On Thu, 2007-02-22 at 12:05 -0800, Octavio Alvarez wrote:
> > > Also, env vars can't ever change after login.
> > Why would you need that? I don't imagine a distro upgrade spitting some
> > directory changes in my face during a critical session (at least not
> > without my permission).
> You might want to change it yourself, even if its not done
> automatically. i.e. I can imagine a "make this the default location for
> photos" menu item in a file manager.
I have been thinking more about it. I am not against localized names,
but I am against automatic creation of any visible directories.
It would be nice to be able to control these directories from GUI, and
even initial creation should show GUI (and rationale) for it and a way
for disabling some or all of them (and re-enabling later). But it's an
implementation note above the scope of your proposal.
I consider default directories very useful not only for beginners. There
are possible use cases I can imagine:
I see directories, but I will not use them, unless application will
change automatically to it.
Implementation note: It's expected that applications will default there.
OK. I see directories, I will try to use it.
Implementation note: None.
Where is directory for my videos? I want "~/Videos" with special icon as
a default for Kino and DVDBackup.
Implementation note: Directory list must be easily extensible. It must
be possible to assign applications to directories.
Just now I am working on Project A placed in ~/Projects/Project_A/.
I want all image editors to default into ~/Projects/Project_A/img.
Afternoon I will work on project B and I will want to change the
Implementation note: Easy to change default, instant apply without
Another power users:
I really hate to mix photos from my camera and images from different
resources. All applications working with my photos should default to
Implementation note: Be able to change application category.
A Québec lawyer:
The government of Québec requires that all texts must be in French.
Implementation note: "Desktop" must be translated, too.
Just now I see 9 applications and 1 library containing "/Desktop" on my
GNOME desktop, so I guess it should not be a much pain to do another
Home is on NFS. User hun runs old distro and uses locale zh_CN.BIG5.
User jin already uses zh_CN.UTF-8. User leang uses km_KH.UTF-8. But in
time of initial creation of directories, there was no Khmer translation
of "Templates" and "Pictures" directories available, so half of his
directories is named in Khmer, another half in English.
Implementation note: directory creator must check, whether
admin/upstream did not provide new names or translations, new
directories or new paths.
Users jon and hans will work on Project A and should have different
setting than other users.
- Admin may decide to have some folders outside $HOME.
- Admin may want to do define per-user defaults (optional).
Implemented only in the application launcher. Launcher will try to guess
application type and do chdir() before launching application.
Easy to implement.
Nearly all applications will work with these dirs.
Only one default directory per application.
Application needs restart to change default.
No support in file selector.
How to create initial mapping?
I can imagine three ways:
- Based on new keyword in the desktop file, e. g.:
(reserver: UserDir=Home for default home dir, UserDir=Custom would be
reserved for implementation inside app)
- Based on Categories and defined in menu description.
- Based on MimeType (first element of first item in the list).
Implemented in the file selector of GUI toolkit.
If application does not provide default path, simply chose one based on
provided UserDir setting.
Only few libraries needs change.
Support visual feedback - default bookmarks.
We can select only bookmark related to the application.
Only one default directory per application.
May collide with saving default path inside application (can be hacked
to return a false save path to be able to detect this situation).
Implemented in the application.
We can select only bookmark related to the current conttext in the
Many changes required.
Best Regards / S pozdravem,
SUSE LINUX, s. r. o. e-mail: sbrabec at suse.cz
Lihovarská 1060/12 tel: +420 284 028 966
190 00 Praha 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
More information about the xdg