How can I add a terminal application (such as less or python) if that application doesn't appear in the list when I press the "Show Applications" button?
1 Answers
To add a terminal application to your Favorites, you first need to create a valid launcher for it. Once created, it can be pinned as favorite.
You can create a .desktop launcher for terminal commands when you set Terminal=true. That option will attempt to open a terminal to run the command specified on the Exec= line.
The launcher will appear in your menu only if it is valid and located in ~/.local/share/applications or an applications directory under one of the directories listed in XDG_DATA_DIRS,e.g., /usr/local/share/applications,
An example of such .desktop file is given below.
[Desktop Entry]
Type=Application
Version=1.0
Name=Htop
GenericName=Process Viewer
Comment=Show System Processes
Icon=htop
Exec=htop
Terminal=true
Categories=System;Monitor;ConsoleOnly;
Keywords=system;process;task
As the executable exists in one of the directories of the PATH, specifying its name on the Exec= line is sufficient. Else, provide the full pathname.
When the icon is installed in ~/.icons, ~/.local/share/icons or in an icons directory under one of the directories listed in XDG_DATA_DIRS,e.g., /usr/local/share/icons, specifying the file name, without extension, of the icon file is sufficient. Else, specify a full path name.
Lines such as Comments and Generic name are optional.
- 97,564