Occasionally you download some pre-compiled software. It can be a pain to remember where you put it, navigate there in a shell and run it.
Better would be if it were integrated with the desktop launchers so you can launch it like a regular program.
Information for this behaviour (like where the executable is, what the icon is, etc...) is defined by a .desktop
file, which has to be put in a directory the system monitors. See here for more details.
I was recently wanted to do this with Zotero, and their instructions had some recommendations on how to set this up properly:
- For Ubuntu, the tarball includes a
.desktop
file that can be used to add Zotero to the launcher - Move the extracted directory to a location of your choice (e.g.,
/opt/zotero
) - Run the
set_launcher_icon
script from a terminal to update the.desktop
file for that location - Symlink zotero.desktop into
~/.local/share/applications/
(e.g.,ln -s /opt/zotero/zotero.desktop ~/.local/share/applications/zotero.desktop
). - Zotero should then appear either in your launcher or in the applications list when click the grid icon (“Show Applications”), from which you can drag it to the launcher.
If the program you're installing doesn't have a set_launcher_icon
script (or something similar), then go into the .desktop
file and edit the Exec=/path/to/executable
line to point at the executable.