Score:0

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

cn flag

I downloaded the program Zotero for Linux and it doesn't need installing, only extracting. However, the only way to start the program is by running it from a terminal.

I would really like to have a simple launcher for it. I understood I am supposed to copy a .desktop file from /usr/share/applications/ but there is no file zotero.desktop

In the downloaded program folder is a file called zotero.desktop, but I don't know what to do with it.

On the website are the following instructions, which didn't work:

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, and 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.

I also tried sudo ln -s Zotero_linux-x86_64/zotero.desktop /usr/share/applications/zotero.desktop but again nothing

I'm using Ubuntu 20.04, thank you very much.

Score:3
cn flag

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.
WILiCE avatar
cn flag
Great, it worked. Thank you so much!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.