There are three directories related to the gnome menu display:/usr/share/applications, /usr/share/gnome/apps and/etc/X11/applnk/documents with the suffix desktop in the former:/usr/share/applications; for the latter/usr/share/gnome/apps and/etc/X11/applnk/, there are some directories, which can be Network, Office
There are three directories related to the gnome menu display:/usr/share/applications,/usr/share/gnome/apps and/etc/X11/applnk/
Documents with the suffix desktop in the former, namely,/usr/share/applications; for the latter/usr/share/gnome/apps and/etc/X11/applnk/, there are some directories, which can be Network, Office, Graphics, AudioVideo, System, Development, utility, Settings, etc. Generally, the menu items corresponding to these files ending with desktop are displayed in other directories. Files in/usr/share/applications can be displayed in other files or in the first menu.
Next, let's take a look at the format of the file ending with. desktop. Below is a template:
[Desktop Entry]
Name [zh_CN] =
Exec =
Icon =
Terminal =
Type =
Categories = Application ;;;
Encoding = UTF-8
Comment =
Comment [zh_CN] =
OnlyShowIn =
X-Desktop-File-Install-Version = 0.3
I will explain each of the above items one by one:
Name -- the Name you originally named for the program
Name [zh_CN] -- the local corresponding to the program is a Chinese Name
Exec Application Path to be executed
Icon the path of the Icon you want to display
The Type of the program, generally Application.
The following Categories is the key. Pay attention to the semicolon above. The first one is generally Application. The second can be one of Network, Office, Graphics, AudioVideo, System, Development, Utility, and Settings.
They correspond to the following:
Internet Network
Office
Image Graphics
Audio and video AudioVideo
System Tools
Programming Development
Auxiliary options Utility
Preference Settings.
That is to say, if this item is "Network", it will be displayed in the internet bar. If this item is "Utility", the menu items you create will be displayed in the auxiliary options, and so on.
The content after the second semicolon can be X-Red-Hat-Base plus X-Red-Hat-Base-Only or X-Red-Hat-Extra. (Note that as long as X-Red-Hat-Base is added, it will not be displayed in other columns) the addition of X-Red-Hat-Base and X-Red-Hat-Base-Only is displayed in the first-level menu, and the addition of X-Red-Hat-Extra is displayed in other menus.
Two instances are shown below:
[Desktop Entry]
Name [zh_CN] = red Office
Exec = redoffice
Icon =/usr/share/pixmaps/RedHat-word-processor.png
Terminal = false
Type = Application
Categories = Application; Office; X-Red-Hat-Extra;
Encoding = UTF-8
Comment = RedOffice1.2
Comment [zh_CN] = Office Tool
X-Desktop-File-Install-Version = 0.3
My menu will be displayed in other offices.
[Desktop Entry]
Name [zh_CN] = red Office
Exec = redoffice
Icon =/usr/share/pixmaps/redhat-word-processor.png
Terminal = false
Type = Application
Categories = Application; Office; X-Red-Hat-Base-Only;
Encoding = UTF-8
Comment = RedOffice1.2
Comment [zh_CN] = Office Tool
X-Desktop-File-Install-Version = 0.3