Create launcher for application not in /usr/share/applications in Ubuntu 20.04

Solution 1:

To obtain an entry to the program in your application menu, you indeed should copy the zotero.desktop file to an appropriate directory, and also verify if it points to the correct executable and icon.

1) Copy the launcher to a suitable directory

If a Zotero .desktop file came with the program, then copy (or indeed link) that file in one of the directories where the system picks up these launchers:

  • If you are the only user needing to run the application, copy the launcher to ~/.local/share/applications.
  • If all users need to have access and see the program in their menu, copy the launcher to /usr/local/share/applications. That directory may not exist by default. You could also copy to /usr/share/applications but that directory is rather intended to be managed by the operating system.

2) Verify all entries in the file are valid

Open the .desktop file and check if the Exec= and Icon= items point to a valid executable or icon. You can provide a full path to these files, or alternatively

  • For the executable: link to a folder in your search path, i.e. ~/bin or ~/.local/bin if you are the only user needing access, or /usr/local/bin if you want all users to have access
  • For the icon: place a copy of the icon in ~/.local/share/icons or /usr/local/share/icons (may need to create either of these directories) for single user or multi-user installation, respectively.