[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: User directories integration - request for help



Le Lun 19 mars 2007 15:08, Alexander Larsson a écrit :
> On Mon, 2007-03-19 at 13:09 +0100, Nicolas Mailhot wrote:
>> Le Lun 19 mars 2007 12:01, Alexander Larsson a écrit :
>> > test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source
>> > ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
>> > tar czvf /tmp/music.tar.gz ${XDG_MUSIC_DIR}
>>
>> Add looping to handle multi-user setups, and you get the magnitude of
>> problems to replicate a simple ls /home/*/.config/xdg-dir/music/
>
> I don't see that sort of operation as being very common though.

You lack imagination ;)

> The
> special directories are not some set-in-stones kind of LSB filesystem
> hierarchy. Its just a helping system that gets you some nice defaults
> for applications so that things can start up in a slightly nicer way
> than everything in ~/. You can't assume that a users files are in the
> xdg-user-dirs MUSIC directory any more than you can assume a hardcoded
> ~/Music.

You can assume in CLI just like you're assuming in GUI
Also you're consumming very precious desktop and home estate with your
stuff, you bet it will be central to apps.

>> > And translation of the filenames in the UI will *never* be complete.
>>
>> More reason *not* to pre-create directories with faulty names, and ask
>> users on creation what they would like to call their directories.
>
> How is this different from not creating the folders at all. When your
> file selector defaults in $HOME you can just create your Music directory
> and select it. The idea is that a lot of people don't even know that you
> can/should do this and do something better by default.

When the user launches an app that needs one of your special folders, and
if it's not already registered (via symlinks or conf files), you propose
to create it.

Advantages :
- the user is doing stuff related to this dir, you'll have this attention
- you can explain what the folder will be used for, he won't be surprised
when other apps use it
- you can propose a standard name
- he can correct it if the translation is wrong for his locale, he already
has a directory for this use, or he thinks your default choice is stupid
for any other reason (that will happen more often than you think)

Contrast it with pre-creation of folders that may fit or not with the user
habits, may use the right locale or not, may be properly translated or
not, may be used by the user or not (some users will never do music or
pictures), may duplicate existing folders or not, etc etc

Sometimes asking the user is the right thing (as long as you keep light
touches)

>> > There will always be 3rd party applications that don't translate the
>> > names,
>>
>> And apps that won't parse your config file but can be pointed at a
>> default symlink
>
> There are many implementations that all work. [...]
> If I had picked symlinks someone else would complain.

That's a poor argument. No need to waste fedora-devel time if your choices
are set in stone

-- 
Nicolas Mailhot


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]