Environment Status:
System: Ubuntu 14.04
GUI Desktop: Unity
Steps:
I: Create your own shortcut file under the/usr/share/applications/folder:
sudo gedit/usr/share/applications/putty.desktop
II: The contents of the file are as follows: (cannot have extra space before and after)
- [Desktop Entry]//Each desktop file starts with this tab, indicating that this is a desktop Entry file
- Version = 1.0//Indicates the desktop entry (optional)
- Name = Putty//program name (required), here to create a Firefox shortcut for example
- Genericname = putty//program generic name (optional)
- Comment = Putty GUI//Program description (optional)
- Exec =sudo/home/lee/putty-0.67/putty//Program Start command (required), can be run with parameters when the following type is application, this entry is valid
- Terminal=true//Use terminal, temporarily only so that the program can follow the root permission to execute
- Icon=/home/lee/putty-0.67/icons/putty.ico//Set icon for shortcut (optional)
- Terminal = false//whether to run in terminal (optional), when type is application, this entry is valid
- Type = Application//desktop (required), common values are "application" and "Link"
- Categories = GNOME; Application; Network; Indicate the category that appears in the menu bar (optional)
Reference: http://www.2cto.com/os/201406/306618.html
Detailed Documentation:
Desktop Entry files usually start with the string "[Desktop Entry]". As you can tell from Listing 1, the contents of the Desktop Entry file are made up of several {keyword, value} pairs of Entry. For example, "version" is a keyword, and the keyword "version" corresponds to a value of "1.0". The Desktop Entry file standard defines a range of standard keywords. Standard keywords are required and optional two: Required standard keywords must be defined in the. desktop file, and optional keywords do not. The following is an analysis of key keywords.
See also: Http://www.ibm.com/developerworks/cn/linux/l-cn-dtef/index.html?ca=drs-cn#ibm-pcon
Ubuntu | | Add program launcher under Linux