How are programs executed in Ubuntu?

Colin Law clanlaw at gmail.com
Wed Feb 3 22:37:08 UTC 2016


On 3 February 2016 at 21:20, Colin Law <clanlaw at gmail.com> wrote:
> On 3 February 2016 at 14:32, Oliver Grawert <ogra at ubuntu.com> wrote:
>> hi,
>> Am Mittwoch, den 03.02.2016, 13:45 +0000 schrieb Colin Law:
>>> On 3 February 2016 at 12:28, Oliver Grawert <ogra at ubuntu.com> wrote:
>>> > hi,
>>> > Am Mittwoch, den 03.02.2016, 11:56 +1100 schrieb blind Pete:
>>> >> C
>>> >> I am very surprised.  The FHS (filesystem hierarchy standard) indicates
>>> >> that /usr/local/ is the place to store host specific stuff.  It has
>>> >> always been in my PATH.  Type "echo $PATH" without the quotes in a
>>> >> terminal.  And /usr/local/share exists on my machine, although
>>> >> /usr/local/share/applications/ does not.
>>> >
>>> > that sounds like a bug ... checking XDG_DATA_DIRS on my trusty system i
>>> > see:
>>> > ogra at anubis:~/datengrab/snappy$ env|grep XDG_DATA_DIRS
>>> > XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/
>>> >
>>> > so /usr/local/share is definitely in the searchpaths and apps using the
>>> > xdg standard should actually respect /usr/local/share/applications/ if
>>> > you created it and added a .desktop file ...
>>> >
>>> > see http://standards.freedesktop.org/menu-spec/menu-spec-latest.html
>>>
>>> Hi Oliver, I am not sure what it is that are saying is a bug.  Do you
>>> mean that if I place a .desktop file in /usr/local/share/applications
>>> then it should automatically be seen by the Dash?
>>>
>> correct ... the linked spec says $XDG_DATA_DIRS/applications is
>> valid ... given that /usr/local/share is in XDG_DATA_DIRS by
>> default /usr/local/share/applications should be valid too ...
>> if you create that dir and drop a .desktop file into it ... and unity
>> (or any other desktop that claims being freedesktop spec compatible)
>> doesn't pick it up, thats a bug ...
>
> OK, thanks, I had better give it another try then.

Well I don't know what I did last time, but when I repeat the
operation I find that desktop files /do/ work in
/usr/local/share/applications. So Pete was right all along and I lose
and that should be the recommended place for all-user desktop files.
For the record it is not necessary to logout and in again, the files
are picked up immediately.   Also it doesn't seem to matter whether
they are executable (I believe when they are in
.local/share/applications they do need to be executable, or at least
that is what I determined some time ago) or who they are owned by.

Cheers

Colin




More information about the ubuntu-users mailing list