Desktop files are kind of configuration files that define how particular applications behave in desktop environment, how they appear menu, etc. These desktop files follow the Desktop Entry Specification. Additionally, some YaST-related entries are defined for YaST-specific purpose.
Configuration files are stored under the /usr/share/applications/YaST2/ directory.
Entries begining with blank or # character are comments.
All entries are case-sensitive.
Desktop file entries are divided into groups. Each group is defined by a group-name using a square-brackets around it. This is a must-have group in every desktop file:
[Desktop Entry]
Entries are following the grop name below which they are defined. They use a simple definition:
Key=Value
Key can contain only letters, digits and a dash character.
Exec=/sbin/yast2 example
Entries, that are displayed to user, can have their values localized. This format uses the base key name and adds a locale name surrounded by a square brackets. Variables must be UTF-8 encoded. The locale string uses [language[_territory][.codeset][@modifier]] format:
Key=A.B.C. Key[de]=A.B.C. - German Key[en_US]=A.B.C. - American English Key[cs_CZ.UTF-8]=A.B.C. - Czech (UTF-8)
These localized definitions are used according to LC_MESSAGES variable - The best match wins (evaluated from left).
There are some mandatory entries that are required by the desktop file definition. Additionally we use a YaST-specific and AutoYaST-specific entries.
Key | Description | Value Type |
Type | Application, Link or Directory. YaST uses the type Application. | string |
Name | Application name. YaST module name for YaST purpose, e.g., Firewall. This entry is often used also with localization Name[$locale]. | string |
GenericName | Generic name of the application. In YaST used as description of the application purpose, e.g., Configure a firewall. This entry is often used also with localization GenericName[$locale]. | string |
Categories | A semicolon-separated list of categories in which the entry will be show in a menu, e.g., Qt;X-SuSE-YaST;X-SuSE-YaST-Security;. | string |
Icon | Path to an image or rather only a name of an icon to be displayed along with the application name in file managers and menus, e.g., yast-firewall. If only a name is used, the particular icon is looked up in the current theme. | string |
Exec | A command which is executed when the application is launched. It can have arguments. E.g., /sbin/yast2 firewall. | string |
Key | Description | Value Type |
X-SuSE-YaST-Call | Module name which is called with the /sbin/yast2 command from YaST Control Center, e.g., firewall or users. This entry is required. | string |
X-SuSE-YaST-Group | YaST group name. In YaST Control Center, YaST modules are listed under these groups. Possible values are: Hardware, Misc, Network, Net_advanced, Security, Software and System. This entry is required. | string |
X-SuSE-YaST-Argument | Additional argument(s) for YaST. They can be --fullscreen and/or --noborder. This entry can be empty. | string |
X-SuSE-YaST-SortKey | String for sorting an application in the YaST Control Center. This entry can be empty (than the default zzzzz is used). | string |
X-SuSE-YaST-Geometry | You can also set the default size for opening UI up, nevertheless, this feature doesn't seem to work. And, of course, this entry can be empty. | string |
X-SuSE-YaST-RootOnly | This entry defines whether the application will be visible only for root. Possible values are yes, yes, 1 or any other value which is considered meaning false. | boolean |
These entries are described in the AutoYaST Configuration Management System in section Configuration file
This is an example taken from the firewall.desktop file.
[Desktop Entry] Type=Application Categories=Qt;X-SuSE-YaST;X-SuSE-YaST-Security; # KDE-related entries X-KDE-SubstituteUID=true X-KDE-ModuleType=Library X-KDE-RootOnly=true X-KDE-HasReadOnlyMode=true X-KDE-Library=yast2 # YaST-related entries X-SuSE-YaST-Call=firewall X-SuSE-YaST-Group=Security X-SuSE-YaST-Argument= X-SuSE-YaST-RootOnly=true X-SuSE-YaST-AutoInst=all X-SuSE-YaST-Geometry= X-SuSE-YaST-SortKey= X-SuSE-YaST-AutoInstClonable=true X-SuSE-YaST-AutoInstRequires=lan X-SuSE-YaST-AutoInstSchema=firewall.rnc Icon=yast-firewall Exec=/sbin/yast2 firewall # Name with localizations Name=Firewall Name[es]=Cortafuegos Name[hu]=Tűzfal Name[ko]=방화벽 Name[sv]=Brandvägg Name[ja]=ファイアウォール Name[lt]=Ugniasienė Name[sl]=Požarni zid # GenericName with localizations GenericName=Configure a firewall GenericName[es]=Configuración del cortafuegos para usuarios avanzados GenericName[ko]=고급 사용자를 위한 방화벽 설정 GenericName[sv]=Brandväggsinställningar för avancerade användare GenericName[fr]=Configuration Firewall pour utilisateurs experts GenericName[ja]=上級のファイアウォール設定 GenericName[lt]=Ugniasienės konfigūravimas patyrusiems vartotojams GenericName[sl]=Nastavitve požarnega zidu za napredne uporabnike