You need to create a .desktop
launcher for the application in your ~/.local/share/applications
directory.
To create a simple .desktop
launcher manually, first create an empty text file, name it <application-name>.desktop
in the aforementioned directory, and add the following lines to it
[Desktop Entry]
Name=Application Name
Comment=A short description of the application
Exec=command-to-run-application
Icon=/full/path/to/icon-file
Terminal=false
Type=Application
Note that in the Exec=
line you need to use the full path to the command (i.e. /home/<YOUR_USERNAME>/folder/...
instead of ~/folder/...
).
Then save the file. If it doesn't appear in 'Show Applications' (or searching after pressing Super), log out and re-login.
Also there are user-friendly GUI tools to create a .desktop
launcher, e.g.
Main Menu aka alacarte
: install by running
sudo apt install alacarte
MenuLibre: install by running
sudo apt install menulibre
gnome-desktop-item-edit
: need to install the gnome-panel
package by running
sudo apt install gnome-panel
Note: gnome-desktop-item-edit
is discarded since the Ubuntu 19.10 release.
Exec= wine /home/<user>/.wine/folder_to_app/app.exe
. Do it need to set Terminal to true, since it works if I use the command in terminal? – SnowGepard Feb 20 '19 at 09:04Terminal=ture
and now it works fine. The space after Exec was not on purpose. Thanks a lot. – SnowGepard Feb 20 '19 at 09:13