XDG-XSESSION(1)
π¦ XDG-XSESSION(1) π¦
User Commands β yep, this is the XDG-XSESSION(1) manual, bestie. It's giving βtiny launcher, lots of lore.β π
πΈ NAME πΈ
xdg-xsession β an XDG compliant XSession startup notification launcher β¨
π SYNOPSIS π
xdg-xsession [OPTIONS] [APPID|COMMAND]
π DESCRIPTION π
Okay so xdg-xsession is a script that simply executes xdg-launch(1) with the appropriate arguments (--xsession). That's it. That's the whole main-character move. π«Ά
For more info, see "COMMAND OPTIONS" in xdg-launch(1).
π¦ FILE FORMAT π¦
Bestie, there are two formats for the .desktop file of type XSession:
- An entry for a window manager that may or may not be capable of being launched under multiple session managers.
- An entry for a session manager that may or may not include optional window managers.
Detecting between the two can be performed fairly reliably on the basis of examining the XSession desktop entry keys and values. iykyk π
πΌ GROUPS πΌ
The group is literally:
[Desktop Entry]
π [Desktop Entry] π
β Standard Keys β
The Desktop Entry group may contain the following standard keys:
Typeβ this required key specifies the type of the desktop entry. The standard type for application desktop entry files isApplication. The βDesktop Entry Specificationβ dictates that unrecognized types are to be ignored.
The non-standard type for X session desktop entry files is XSession. This key is normally set to Application when the desktop entry file may also reside in applications directories.
The non-standard type for auto-start desktop entry files is Autostart. This key is normally set to Application when the desktop entry file may also reside in applications directories.
KDE specifies additional non-standard types that are typically ignored by all but KDE applications and utilities.
Versionβ this optional key specifies the version of the βDesktop Entry Specificationβ to which the remainder of the file conforms. The current version is1.1. The current version is backward compatible with version1.0. There are backward incompatibilities between pre-1.0 files and file of version 1.0 and later. This key is, therefore, only really necessary when identifying a pre-1.0 (e.g.0.9) file version.
Unless a file is a pre-1.0 version, this key is normally omitted.
As there are no standard versions for XSession or Autostart files, this key is normally omitted in those files.
Name[]β this required key specifies the name of the entry. πGenericName[]β the optional generic name of the entry (e.g.Window Manager).NoDisplayβ this optional key, when set totrue, indicates that the entry should not be displayed in the menus. The key is normally only included to set it totrue. This is often for application that perform some other function (such as anXSessionorAutostartentry, one that just sets itsMimeType, etc.).
For X sessions and auto-start entries, this key is ignored by the x session and auto-start launcher, as it is primarily for use in applications sub-directories only.
Comment[]β this optional key provides a longer description of the application: still normally only consuming one line of text. πIconβ this optional key specifies an icon name for the desktop entry. The icon name should not have an extension, and should not contain a path; however, many applications recognize both extension and path. Where only an extension is specified and not a path, the application typically restricts the selection of icon to one with the same extension as that specified. Where a path is specified, it is normally only used to specify an icon that resides outside the normal search paths for icons. πΈHiddenβ this optional key is normally only included when specified astrue. It is used to occlude entries in search path sub-directories with a lower priority than the one in which the.desktopfile resides.OnlyShowInβ specifies an exclusive list of desktops in which the application is shown in the menus.
This entry is meaningless for X sessions, as the current XDG desktop has not yet been set. This entry is also meaningless for many auto-start entries, especially those that start before the current desktop is set.
NotShowInβ specifies an exclusion list of desktop for which the application is not shown in the menus.
This entry is meaningless for X sessions, as the current XDG desktop has not yet been set. This entry is also meaningless for many auto-start entries, especially those that start before the current desktop is set.
DBusActivatableTryExecβ this optional key typically contains the absolute path and file name of a binary executable that must exist for the desktop entry to be considered valid. It is often specified when theExeckey does not contain the primary binary executable in the first word of the command. It may also be specified without a path, in which case the$PATHenvironment variable is used to search for the executable as wouldwhich(1). This key is not shell word expanded by the application.ExecPathTerminalβ specifies that the application is to be started as the executed command of a terminal (e.g.xterm -e).ActionsMimeTypeCategoriesβ this optional key specifies a list of categories for the entry.
XSession entries have this key set to WindowManager;System;Applications;.
Autostart entries can set this key to give hints to the session manager as to when the auto-start entry should be launched. These hints are:
PanelTrayIconSystemTrayDesktopPagerDockDockAppWindowManagerCompositeManager
ImplementsKeywordsStartupNotifyβ provides a tri-state boolean value and specifies whether the desktop entry supports startup notification completion. This key should be specified asfalsewhen it is known that the application does not perform startup notification and does not map any window (regardless of the setting of theStartupWMClasskey);true, when it is known that it will perform startup notification completion when invoked with aDESKTOP_STARTUP_IDenvironment variable set; and, not present when it is unknown whether the desktop entry supports startup notification or not.
When used in an X session file, this property refers to the window manager or session launched. A session manager interpreting this key when set to false in the X session file, or when not specified and the StartupWMClass and X-GNOME-WMName class are not set, should the session manager or auto-start dispatcher send a new: message when launching the window manager, it should not await a remove: message and should send one itself on appearance of a window manager. Should it send a new: message in such cases, the new: message should contain the SILENT=1 parameter.
When this key is not present and the StartupWMClass or X-GNOME-WMName keys are present, the window manager launcher should await the appearance of an EWMH check window with the appropriate class or name before sending the remove: message. Any sent new: message should not contain the SILENT parameter. π
StartupWMClassβ if specified, it is known that the application will map at least one window with the given string as its WM class or WM name hint.xdg-launch(1), whenTerminalis set totrue, will use this value to have the terminal populate theres_classportion of theWM_CLASSproperty on the terminal, and this value in all lower-case to populate theres_nameportion of theWM_CLASSproperty on the terminal. SeeXGetClassHint(3). π
π Deprecated Keys π
The Desktop Entry group may contain the following deprecated standard keys:
Encodingβ this key is deprecated. Its only currently valid value isUTF-8. This key should be ignored by current applications.MiniIconβ was used with the%mexpansion forExecstrings. Used to expand to--miniicon [MiniIcon], where[MiniIcon]is the value of theMinIconkey.TerminalOptionsβ was used to supply additional terminal options when theTerminalkey was set totrue. Not used inXSessionorAutostartentries.ProtocolsExtensionsExtensionsβ yes, it's listed twice in the original. Not me. The manual said it. πBinaryPatternMapNotifySwallowTitleβ a locale string that specified the title of the window if it is swallowed onto the panel.SwallowExecβ a string that specified the program to execute if the swallowed application was clicked.SortOrderβ was used to specify sorting order for menus: other mechanisms are used currently.FilePattern
π Non-Standard Keys π
The Desktop Entry group may contain the following non-standard, but widely accepted, keys:
DesktopNamesβ this optional key is only used inXSessionfiles. It specifies the contents of the$XDG_CURRENT_DESKTOPenvironment variables, to be set when the session is launched.
Although this key is non-standard, the βDesktop Entry Specificationβ gives it a glancing reference. It can also be seen in many XSession entry files in the wild. π¦
GenericComment[]MultipleArgsX-MultipleArgsPatternsSingleInstanceAsRootβ an optional boolean value that, whentrue, specifies that theExeckey is to be executed as root (e.g. withsudo(1), or another root privileges command).AutostartPhaseβ the same asX-GNOME-Autostart-Phase, below under βGNOME Extensionsβ.AutostartConditionβ a variation of theX-KDE-Autostart-conditionkey. Provides a complex mechanism for specifying the conditions that must prevail before an auto-start entry is considered for launching. Only applicable to auto-start entries.X-DBUS-ServiceNameX-DBUS-ServiceTypeX-DBUS-StartupTypeX-DCOP-ServiceTypeX-DCOP-StartupTypeX-Desktop-File-Install-VersionX-DocPathβ another name for the widely usedDocPathkey.
β¨ GNOME Extensions β¨
The Desktop Entry group can also carry these "GNOME" extension keys, bestie:
X-GNOME-AutoRestartβ this optional extension key is only included when set totrue. It means the application should be restarted if it exits with a non-zero exit status or terminates on a signal. Naturally, the session launching this application must not restart it too rapidly. Applications with X11R6 Session Management could achieve this functionality instead, but itβs often used as an indication to light-weight window managers that a startup application needs to be restarted in this fashion, so itβs a reasonable extension. It mostly applies to X sessions and auto-start entries.X-GNOME-Autostart-Notifyβ this optional extension key is only included when set totrue. It means the application will use theDESKTOP_STARTUP_IDenvironment variable as the session client identifier to register with an X11R6 Session Manager, so the session manager may coordinate auto-start activities. It mostly applies to auto-start entries, and potentially window manager X session entries.X-GNOME-Autostart-Phaseβ this optional key is mostly applicable to auto-start entries and some X session entries. Itβs not normally used with X session files unless the X session file specifies only a window manager, in which case the auto-start phase must be set toWindowManager. Itβs also not normally used with application files unless they also specify an auto-start entry.
When this optional key is present, it specifies the auto-start phase, which may be one of:
PreDisplayServerβ the first phase of normal startup (startup controlled by.desktopfiles rather than session manager code). It covers the possible installation of files in$HOMEby some initial setup programs and must be done before other components use those files. Not normally used in XDG auto-start. Auto-start applications with this phase set likely also haveStartupNotifyset tofalseandStartupWMClassunspecified (because they canβt map windows).Initializationβ covers low-level stuff like settings helpers that need to be running very early (before any windows are displayed). Some examples would be merging.Xresourcesfiles withxrdb(1), setting up.Xmodmapfiles withxmodmap(1), and executing the shell scripts in/etc/X11/xinit/xinitrd.d/and$HOME/.xinitrc.d.
More examples: setting up canberra GTK modules, importing the $DISPLAY and $XAUTHORITY environment variables into systemd(8) and also the DBUS activation environment. .desktop files are seldom used instead of scripts for these functions. One exception is the pusle audio X11 integration.
WindowManagerβ includes window managers and compositing managers, plus anything else that has to be running before any windows are mapped.xdg-launch(1)also interprets this as the phase necessary to set up docks, slits or harbours for dock apps.Desktopβ includes anything that draws directly on the desktop (e.g. backgrounder).xdg-launch(1)also interprets this as the phase necessary to set up desktop layouts for desktop pagers.Panelβ includes anything that permanently takes up screen real estate (via EWMH struts). This is the first phase where things actually appear on the screen.xdg-launch(1)also interprets this as the phase necessary to set up system trays for status icons.Applicationβ sometimes calledApplications(with the "s" on the end). This is everything else.
X-GNOME-Autostart-Delayβ this optional key is normally only specified when set to a non-zero number of seconds.X-GNOME-Bugzilla-Bugzilla,X-GNOME-Bugzilla-Component,X-GNOME-Bugzilla-Product,X-GNOME-Bugzilla-Version,X-GNOME-Bugzilla-OtherBinaries,X-GNOME-Bugzilla-ExtraInfoScriptβ these keys are ignored by most tools other than "GNOME" tools.X-GNOME-WMNameβ for XSession entries, specifies the name that will be placed on the window manager check window. Note that this may also now be specified with theStartupWMClasskey for the window manager.X-GNOME-WMSettingsModuleβ for "GNOME", specifies the window manager settings module to be used bygconf(1). Not useful for other desktops.X-GnomeWMSettingsLibraryβ for "GNOME", specifies the window manager settings library to be used bygconf(1). Not useful for other desktops.X-GNOME-FullName[]β an optional locale string that can be used to specify a longer name for the application.X-GNOME-Keywordsβ old name for the now standardKeywordskey.X-GNOME-Providesβ specifies the capability that the application, auto-start entry or X session provides. Typical values (that may be combined into a semi-colon separated list) are:filemanagerlogin-soundpanelscreen-keyboardscreen-magnifierscreen-readerwindowmanager
These values may be combined into a list: for example, it is common to see panel;windowmanager; as a value. By far the most common use of this key is to identify in an XSession entry that the entry provides a window manager.
X-GNOME-DocPathβ another name for the widely usedDocPathkey.X-GNOME-Autostart-enabledβ theHiddenkey is not completely satisfactory for use in enabling or disabling auto-start entries. Therefore, this optional extension key may be used to enable or disable an auto-start entry that is not hidden. Bothxdg-launch(1)andxde-session(1)respect this key. When absent on an auto-start entry that is not hidden, the default value of this key istrue, instead offalse(as is the case for most keys).
xdg-launch(1) handles this key when performing session startup by setting the Hidden key to the inverse of this boolean value when it is present and the launch type is Autostart.
X-GNOME-Autostart-startup-id,X-GNOME-Autostart-discard-execβ these two extension keys are used bygnome-session(1)to save session state for auto-start entries withX-GNOME-Autostart-Notifyset totrue. They should never appear in XDG directories.
π¦ KDE Extensions π¦
The Desktop Entry group may contain the following "KDE" extension keys:
DocPath,X-KDE-DocPathβ another name for the widely usedDocPathkey.InitialPreference,X-KDE-InitialPreferenceKeywords,X-KDE-Keywordsβ old name for the now standardKeywordskey.ServiceTypes,X-KDE-ServiceTypesX-KDE-StartupNotifyβ this key was used before theStartupNotifykey was standardized. It has similar semantics to the standardStartupNotifykey.X-KDE-autostart-conditionX-KDE-autostart-afterβ this optional key is used to further order auto-start entries that start in the "KDE" auto-start phase 2 (Applications). All auto-start applications in "KDE" phase 2 start after the window manager. Typical values seen in the wild are:panelβ auto-start the entry after the panel has already started up. This is roughly equivalent to the "GNOME" auto-start phase just after Panel.kdesktopβ auto-start the entry after the desktop has already started up. This is roughly equivalent to the "GNOME" auto-start phase just after Desktop.
X-KDE-autostart-phaseβ when present, specifies the auto-start phase for an auto-start entry. This is an integer value that can have one of the following values:0β roughly corresponds to thePreDisplayServer"GNOME" auto-start phase.1β roughly corresponds to theInitialization"GNOME" auto-start phase.2β roughly corresponds to theApplications"GNOME" auto-start phase.
This key only applies to auto-start entries. The default value if not present is the Applications phase (2).
X-KDE-AuthorizeActionX-KDE-BrowserView-ArgsX-KDE-ExtraNativeMimeTypesX-KDE-FactoryNameX-KDE-HasReadOnlyModeX-KDE-HasTempFileOptionX-KDE-LibraryX-KDE-ModuleTypeX-KDE-NativeMimeTypeX-KDE-ProtocolsX-KDE-RootOnlyX-KDE-StartupNotifyβ this key was used before theStartupNotifykey was standardized. It has similar semantics to the standardStartupNotifykey.X-KDE-SubstituteUIDX-KDE-UniqueAppletX-KDE-UsernameX-KDE-WindowManagerIdX-KDE-WindowManagerConfigureX-KDE-WindowManagerRestartArgument
π MATE Extensions π
The Desktop Entry group may contain the following "MATE" extension keys, which correspond to the equivalent "GNOME" extension keys:
X-MATE-AutoRestartβ the same as theX-GNOME-AutoRestartkey, except for "MATE". SeeX-GNOME-AutoRestart, above.X-MATE-Autostart-Notifyβ the same as theX-GNOME-Autostart-Notifykey, except for "MATE". SeeX-GNOME-Autostart-Notify, above.X-MATE-Autostart-Phaseβ the same as theX-GNOME-Autostart-Phasekey, except for "MATE". SeeX-GNOME-Autostart-Phase, above.X-MATE-Bugzilla-Bugzilla,X-MATE-Bugzilla-Component,X-MATE-Bugzilla-Product,X-MATE-Bugzilla-Versionβ these keys are ignored by most tools other than "MATE" tools.X-MATE-Providesβ the same as theX-GNOME-Provideskey, except for "MATE". The only values I have seen for "MATE" are:panelwindowmanager
(peep X-GNOME-Provides, above β same energy π«)
X-MATE-WMNameβ literally the exact same as theX-GNOME-WMNamekey, just for "MATE" instead. SeeX-GNOME-WMName, above.X-MATE-WMSettingsModuleβ the same as theX-GNOME-WMSettingsModulekey, except it's for "MATE". SeeX-GNOME-WMSettingsModule, above.X-MateWMSettingsLibraryβ the same as theX-GnomeWMSettingsLibrarykey, except for "MATE". SeeX-GnomeWMSettingsLibrary, above.
bestie notice the capitalization on that last one β X-MateWMSettingsLibrary is not the same casing pattern as the others, and that's canon, don't @ me, copy it exactly as written π
XFCE Extensions π¦
so the Desktop Entry group can also carry these "XFCE" extension keys:
X-XFCE-BinariesX-XFCE-CategoryX-XFCE-CommandsX-XFCE-CommandsWithParameterX-XFCE-MimeType
SuSE Extensions πΈ
the Desktop Entry group may contain the following "SuSE" extension keys:
X-SuSE-YaST-RootOnlyX-SuSE-translate
LightDM Extensions β¨
and the Desktop Entry group may contain this "LightDM" extension key:
X-LightDM-DesktopName
[Desktop Action ACTION] π
okay important vibe check: the Desktop Action group is not used in Autostart entries. not it. π ββοΈ
The Desktop Action group may contain the following standard keys:
and that's genuinely where the page stops on that one β no list follows, so I'm not gonna invent one for you, queen π
[Window Manager] π
The Window Manager group is a non-standard group, but it's one that a number of session managers actually support. It may contain the following keys:
SessionManagedStartupNotificationConfigExec
BUGS π
xdg-xsession has no known bugs. iconic, honestly. but if you do find something, please report bugs to the source code repository at <https://github.com/bbidulock/xdg-launch/issues>.
SEE ALSO π
xdg-launch(1). that's the whole list, bestie β go read it next, iykyk π
AUTHOR π
Brian Bidulock <mailto:bidulock@openss7.org>
and that's the whole page, bestie!! π«Ά this was xdg-launch version 1.12, dated 2022-01-28 β screenshot it, cite it, love it, periodt. π
β¨
π¦ where this page comes from
- nixos 26.05: xdg-launch 1.12
- nixpkgs unstable: xdg-launch 1.12
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms