How are programs executed in Ubuntu?

Colin Law clanlaw at
Sat Jan 30 07:48:19 UTC 2016

On 29 January 2016 at 22:16, Jim Byrnes <jf_byrnes at> wrote:
> On 01/29/2016 03:45 PM, Colin Law wrote:
>> On 29 January 2016 at 21:00, Jim Byrnes <jf_byrnes at> wrote:
>>> ...
>>> After much stumbling around I finally got this to work. The first thing I
>>> did wrong was to create a file called myprog.desktop based on the link
>>> you
>>> gave above and drop it in /local/share/applications. That did not work.
>>> Then I tried using the utilities mentioned in the link above, but they
>>> could
>>> not find the file even I was looking at it in Nemo.  Finally I used ls in
>>> a
>>> terminal and it showed up as myprog.desktop.desktop. Apparently that
>>> location adds .desktop by default but Nemo did not display it.
>>> Once I fixed that the desktop utilities put it in the proper location and
>>> I
>>> was able to put it on the launcher.
>> Just checking that you realise that the proper place is
>> .local/share/applications.  Installed applications put their launchers
>> in /usr/share/applications but generally you should put diy ones in
>> .local/share/applications.
>> Colin
> I'll keep that in mind.  There was some desktop file utilities mentioned in
> the link you provided. One of them was an install utility and it put my diy
> one in /usr/share/applications.

If you want a shortcut that is accessible to all users then put it
/usr/share/applications.  If it just for one user then put it in the
users .local/share/applications.  In particular if you want to modify
one of the standard desktop files for some reason (I know that is not
what you are doing) then don't edit the one in /usr/share/applications
as it may be overwritten if the application is updated.  Instead copy
it to .local/... and change the name of the file and the Name field,
as the Name is what appears when you hover over the launcher, that way
it can be differentiated from the original.


More information about the ubuntu-users mailing list