In linux, the program starter-general Linux technology-Linux technology and application information. The following is a detailed description. By using a concept of windows, it is a shortcut. The program starters in linux are a bit the same and different. In the same way, the application is represented by a small icon, and then double-click with the mouse. Let's look at the difference.
The Desktop Entry file is a file in the Linux Desktop System that describes the startup configuration of the program. You can go to its official website to view the official content: http://standards.freedesktop.org... ry-spec-latest.html
The Desktop Entry file is suffixed with ". desktop. Taking the Linux GNOME desktop system as an example, after you open the application browser (), you will see many application shortcuts. In fact, each application shortcut corresponds to a Desktop Entry file. These Desktop Entry files are usually stored in/usr/share/applications/opt/gnome/share/applications/and other directories. Access these directories from the file browser and click the corresponding Desktop Entry file to start the corresponding application.
Assume that there is a file "gaim. desktop, open "gaim. desktop, you will get the following content:
CODE: [Desktop Entry] Encoding = UTF-8 Name = Gaim Internet Messenger Name [ar] = too many characters have been transferred too many minutes have been transferred too many times Name [ca] = Missatger d' Internet Gaim Name [ca @ valencia] = Missatger d' Internet Gaim Name [cs] = Gaim Internet Messenger Name [da] = Gaim-internet beskeder Name [de] = Gaim Internet-Sofortnachrichtendienst Name [dz] = zookeeper ། Name [en_GB] = Gaim Internet Messenger Name [eo] = Gaim Interreta Mesa mozilo Name [es] = Gaim-cliente de mensajer ía de Internet Name [et] = Gaim-Interneti s õ numivahetus Name [eu] = Gaim interneteko mezularitza Name [fa] = too many threads have been written too many times Name [fi] = Gaim-pikaviestin Name [fr] = Gaim Messagerie Internet Name [gl] = Gaim-Mensaxer ía na Internet Name [he] = too many characters have been written into your memory when there are too many other characters have been written into your memory Name [hu] = Gaim azonnali üzen Repository Name [it] = Gaim Internet Messenger Name [ja] = Gaim zookeeper? Why are there too many other users? Name [ko] = commandid already exist Name [lt] = Interneto pokalbi extends programa Gaim Name [nb] = Gaim lynmeldingsklient Name [nl] = Gaim-Expresberichten Name [pl] = Komunikator Internetowy Gaim Name [pt] = Mensageiro Internet Gaim Name [pt_BR] = Mensageiro da Internet Gaim Name [ro] = Mesagerul Gaim Name [ru] = Gaim-Zookeeper zookeeper bytes Name [sk] = Gaim Internet Messenger Name [sl] = Spletni sel Gaim Name [sq] = Lajm ‑sjell ‑si Internet Gaim Name [sv] = Gaim Internet Messenger Name [th] = Gaim has already been used since there were already too many other such problems. Name [zh_CN] = Gaim Internet communication program Name [zh_TW] = Gaim? What is the path? R-pass GenericName = Internet Messenger GenericName [ar] = too many rows have been written too many GenericName [ca] = Missatger d' Internet GenericName [ca @ valencia] = Missatger d' Internet GenericName [cs] = Internet Messenger GenericName [da] = Internet beskeder GenericName [de] = Internet-Sofortnachrichtendienst GenericName [dz] = zookeeper ། GenericName [en_GB] = Internet Messenger GenericName [eo] = Interreta Mesa mozilo GenericName [es] = Cliente de mensajer ía de Internet GenericName [et] = Interneti s õ numivahetus GenericName [eu] = Interneteko mezularitza GenericName [fa] = too many threads have been written GenericName [fi] = Pikaviestin GenericName [fr] = Messagerie internet GenericName [gl] = Mensaxer ía na Internet GenericName [he] = too many bytes have been written too many times GenericName [hu] = Azonnali U zenetk U ld é s GenericName [it] = Internet Messenger GenericName [ja] = too many bytes? Why are there too many other users? GenericName [ko] = Linear Regression GenericName [lt] = Pokalbiai internete GenericName [nb] = maid GenericName [nl] = Expresberichten GenericName [pl] = Komunikator Internetowy GenericName [pt] = Mensageiro Internet GenericName [pt_BR] = Mensageiro da Internet GenericName [ro] = Mesagerie instant GenericName [ru] = Please wait until there are too many other than your own names when there are too many other names. GenericName [sk] = Internet Messenger GenericName [sl] = Spletni sel GenericName [sq] = Lajm datagsjell ipvs Internet GenericName [sv] = Meddelandeklient GenericName [th] = too many bytes have been written into our records. GenericName [zh_CN] = Internet communication program GenericName [zh_TW] =? What is the path? R-pass Comment = Send instant messages over multiple protocols Comment [ar] = zookeeper Comment [ca] = Envieu missatges instantanis en múltiples protocols Comment [ca @ valencia] = Envieu missatges instantanis en múltiples protocols Comment [cs] = Pos ílat instant message r ?zn =mi protokoly Comment [da] = Send beskeder over flere protokoller Comment [de] = Sendet Sofortnachrichten über mehrere Protokolle Comment [dz] = zookeeper when there are too many threads, there are too many threads, too many threads ་། Comment [el] = Α π ο σ | λ α π λ {{π ω σ ο κ λ ω u Comment [en_GB] = Send instant messages over multiple protocols Comment [eo] = Sendu tujmesa unzip ojn per pluraj protokoloj Comment [es] = Cliente de mensajer ía instant ánea multiprotocolo Comment [et] = välks ‑numite saatmine mitmete protokollide kaudu Comment [eu] = Bidali berehalako mezuak hainbat protokoloetan Comment [fa] = zookeeper Comment [fi] = lähet äpikaviestej ämonilla eri yhteysk äytänn öillä Comment [fr] = Envoie des messages instantan é s en utilisant divers protocoles Comment [gl] = envía mensaxes instant áneas a trav é s de Múltiples protocolos Comment [he] = Please wait until there are too many attempts when there are too many errors. when there are too many threads, there are too many threads. Comment [hu] = Azonnali üzenetek k üld é se több protokoll haszn álatával Comment [it] = Client multiprotocollo per messaggi immediati Comment [ja] =? How many threads are involved? Alimail Comment [ko] = commandid has been written into another commandid Comment [lt] = bendrauikeliais interneto pokalbi protocol protokolais Comment [nb] = Send maid over flere protokoller Comment [nl] = Multi-protocol programma voor expresberichten Comment [pl] = Komunikator internetowy obs ~uguj ~cy kilka protoko ~ów Comment [pt] = Envie mensagens instant â neas sobre vários protocolos Comment [pt_BR] = Envie mensagens instant â neas através de múltiplos protocolos Comment [ro] = Trimite ready I mesaje instant prin orice protocol IM Comment [ru] = zookeeper when there are too many threads, there are too many threads, too many threads. Comment [sl] = maid Comment [sq] = D your rgoni mesazhe t your atyp your ratysh then m protokollesh t your ndrysh then m Comment [sv] = sänder snabbmeddelande över m extends nga protokoll Comment [th] = Please wait a few minutes until there are too many reasons why? Comment [zh_CN] = send instant messages through multiple protocols Comment [zh_TW] = transparent? More? ?? F? Instant? R? Information Exec = gaim Iconw.gaim.png StartupNotify = true Terminal = false Type = Application Categories = Network; InstantMessaging; X-Ubuntu-Gettext-Domain = gaim X-Ubuntu-Gettext-Domain = gaim
The content of the Desktop Entry file is composed of several {keywords, values} paired entries.
Keyword "Version": [Optional] This value specifies the standard Version of the Desktop Entry file to be followed by the current Desktop Entry file. Keyword "Encoding": [not recommended for version 1.0] This value specifies the Encoding method used by a specific string in the current Desktop Entry file. Although this keyword is not recommended in standard 1.0 of the Desktop Entry file, it is still widely used in existing Desktop Entry files due to historical reasons. Keyword "Name": [required] This value specifies the name of the application. For example, the value of the keyword "Name" in Listing 1 is "Quick Start Tour ". Open the file browser and go to the "/usr/share/applications" directory to view the display style of the shortcut defined in the "cbt. desktop" file, as shown in figure 2. The display Name of the shortcut is determined by the value of the keyword "Name", and the Icon used by the shortcut is determined by the value of the keyword "Icon" to be introduced below. Keyword "GenericName": [Optional] This value specifies the common name of the application. For example, the value of the keyword "GenericName" in Listing 1 is "User Tutorial ". Keyword "Comment": [Optional] This value is a brief description of the current Desktop Entry. Keyword "Type": [required] The keyword "Type" defines the Type of the Desktop Entry file. Common "Type" values are "Application" and "Link ". "Type = Application" indicates that the current Desktop Entry file points to an Application, and "Type = Link" indicates that the current Desktop Entry file points to a URL (Uniform Resource Locator ). Keyword "Exec": [Optional] The keyword "Exec" is valid only when the "Type" Type is "Application. The value of "Exec" defines the command to be executed to start a specified application. This command can contain parameters. In this example, the value of the keyword "Exec" is the string "gnome-open/usr/share/doc/manual/sled-gnome-cbt_en/index.html ". Enter this string in shell and press the Enter key to start the specified application. Keyword "URL": [Optional] The keyword "URL" is valid only when the "Type" Type is "Link. Keyword "Icon": [Optional] This value defines the icon displayed in the current Desktop Entry file in the application browser or file browser. If the value of the keyword "Icon" is given in absolute path format, the Icon file specified by the value will be used. Otherwise, in Linux, "Icon Theme Specification" [2] is used to locate the desired Icon file under the Icon directory specified by the system. For example, in this example, the value of the keyword "Icon" is "gaim", which corresponds to the image file "gaim.png" in the directory specified by the system ". Keyword "StartupNotify": [Optional] The value of the keyword "StartupNotify" is a Boolean value (true or false ). This keyword is valid only when the "Type" Type is "Application. The numerical value is defined by the standard "Startup Notification Protocol Specifications" [3] and will not be detailed here. Keyword "Terminal": [Optional] Like "StartupNotify", the value of the keyword "StartupNotify" is also a Boolean value, and this keyword is meaningful only when "Type" is "Application. The value indicates whether the application (that is, the value of the keyword "Exec") needs to run in the terminal window. This article describes how to use the keyword "Terminal" in the next section. Keyword "Categories": [Optional] The keyword "Categories" makes sense only when the "Type" Type is "Application. The value of "Categories" indicates the category displayed by the relevant application in the menu. The specific Menu category is defined by the Specification "Desktop Specification Menu" [4]. Keyword "OnlyShowIn" and "NotShowIn": [Optional] These two keywords define whether the current Desktop Entry is displayed in a specific Linux Desktop System (for example, Linux GNOME or Linux KDE) (defined by "OnlyShowIn ), or not displayed (defined by "NotShowIn ). Now, simply copy an original file and modify it.
Cp/usr/share/applications/gaim. desktop/home/lee/Desktop Vi gaim is modified as follows: [Desktop Entry] Encoding = UTF-8 Name = my blog Exec = firefox http://johnwoolee.cublog.cn. Iconw.gaim.png StartupNotify = true Terminal = false Type = Application Categories = Network; InstantMessaging; X-Ubuntu-Gettext-Domain = gaim X-Ubuntu-Gettext-Domain = gaim |