Request for clarification on menu/file spec

cobaco (aka Bart Cornelis) cobaco at skolelinux.no
Wed Feb 8 11:34:15 EET 2006


On Tuesday 07 February 2006 18:18, Jeremy White wrote:
> > loki-setup has special handling for desktop files. It will by itself
> > try to automatically determine what kind of files are required and
> > where to install them. So you as packager do not have to care. It
> > doesn't support xdg desktop files yet though. loki-setup follows a
>
> Right; and part of what I'm hoping to do is add support for xdg to
> Loki...
>
> > rather pragmatic approach so if it was up to me to implement xdg
> > support into loki-setup I'd just try to put a desktop file into
> > /usr/share/applications if it already exists. If that fails, try
> > $XDG_DATA_DIRS and finally create ~/.local/share/applications. The
> > uid of the user you are running as doesn't matter.
>
> Yep.  The whole problem is when you say 'try $XDG_DATA_DIRS', what
> exactly does that mean?  I'm trying to write a single .desktop file;
> do I write it to every directory listed in $XDG_DATA_DIRS?  Do I write
> it just to the first directory, or do I (my personal favorite) write
> it to the first writable directory in the list?

neither, you either:
- write it to the default value for $XDG_DATA_DIRS
- add in your own $XDG_DATA_DIRS (probably overkill for a single .desktop
  file)

you have absolutely no way to know what each of the XDG_DATA_DIRS is being 
used for by the admin, hence adding things into a random one could 
seriously mess things up and will not make admins happy (think a school or 
big company that conditionally sets the XDG_*_DIRS variables depending on 
group membership or whatever)

(NOTE: if you're on Debian take a look at the desktop-profiles package which 
offers a standard way for managing the XDG_*_DIRS variables, and similar 
variables of the individual desktop environments)
-- 
cobaco (aka Bart Cornelis):
    Coördinator Belgisch Skolelinux team
    Coördinator Nederlandse Skolelinux vertaling
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20060208/f2880b21/attachment.pgp 


More information about the xdg mailing list