1

Due to outdated versions in the apt repository, I have manually downloaded a program as a portable version (only one available).

I do not want to manually locate the executable file each time, and don't want to use a bash-script every time as well.

Therefore, I'd like to move the folder containing the application to wherever my applications are stored, and link it to an entry in the "start menu"/the applications overview. Since I am fairly new to ubuntu and linux in general, I do not know where to move the applications folder to, and how to generate a clickable icon in the start menu, leading to my question:

How can I create a "shortcut" from my programs executable to the start menu?

In the same context, is there a way to use a command line to start a portable program in the style of program-name as with every program installed via apt and/or snap?

  • Hello. What version of Ubuntu are you using? The version is the repository are the version that are known to work with the version of Ubuntu that you are using. What program did you install manually? – David Apr 13 '22 at 07:41
  • @David Hi, I use Ubuntu 21.10, and the program is UGENE. It seems, that they did not update their program version in the repository since quite some time... The apt-version is 8 generations old. – the_ermine Apr 13 '22 at 12:32

1 Answers1

0

1. Creating an item in your menu

It is sufficient to create a valid .desktop launcher file in the directory ~/.local/share/applications. This is a text file with a specific format that tells the desktop the name to display in the menu, how to execute the program and what icon to use among other things. Such launcher will cause the application to appear in your application menu.

A minimal .desktop launcher, for example ~/.local/share/applications/color.desktop, looks like:

[Desktop Entry]
Name=Color Picker
Exec=color
Type=Application
Icon=colors

Essential is to provide a valid executable next to Exec=. If the executable exists in the search PATH, the name is enough. Else, you need to specify the full pathname.

Alternatively, install Alacarte or Menulibre to create such launchers using a graphical tool.

2. Launching the program just by typing the name of the executable

Create a directory ~/.local/bin. Log out then back in: that directory will now automatically be included in your PATH. Check your path with the command printenv PATH or echo $PATH.

Create a symbolic link to your executable in that directory. Alternatively, create a script that launches the executable in that directory. The latter is sometimes referred to as a "wrapper script", and is useful if you need to do some preparations before starting the program, e.g. change directories, set environmental variables, ...

vanadium
  • 88,010