Request for clarification on menu/file spec

Thiago Macieira thiago at kde.org
Tue Feb 7 19:31:36 EET 2006


Jeremy White wrote:
> 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?
>
>Note that I'm actually not waiting on this; my implementation is done
>and works.  My concern is that I want to improve the specification so
>that others can find it simpler to do this in the future.

A self-contained package should not install stuff outside its prefix. So, 
if the user says it should install under /opt/appname, there should be 
nothing in /usr. That's what I would expect, at least.

Now, if you want to have the menu entry show always, you should add it 
to /usr/share/applications. If XDG_DATA_DIRS does not point to /usr at 
all, it's because the user chose that way.

You'll probably need to make your application be instead a script that 
sets PATH and LD_LIBRARY_PATH and other variables, as necessary.

But note that, as I said, it may be difficult to interoperate in the 
future if you run an app that expects the system to find stuff that is 
outside XDG_DATA_DIRS (e.g., systray app telling the systray to show icon 
"iconname").

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

2. Tó cennan his weorc gearu, ymbe se circolwyrde, wearð se cægbord and se 
leohtspeccabord, and þa mýs cómon lator. On þone dæg, he hine reste.
-------------- 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/20060207/410018a5/attachment.pgp 


More information about the xdg mailing list