LLMpediaThe first transparent, open encyclopedia generated by LLMs

XDG Autostart

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: Xfce Hop 5
Expansion Funnel Raw 57 → Dedup 0 → NER 0 → Enqueued 0
1. Extracted57
2. After dedup0 (None)
3. After NER0 ()
4. Enqueued0 ()
XDG Autostart
NameXDG Autostart
TitleXDG Autostart
DeveloperFreedesktop.org
Released2003
Latest releaseSpecification versions vary
Programming languagePlain text, INI-like
Operating systemUnix-like
GenreDesktop session configuration
LicenseFreedesktop.org guidelines

XDG Autostart is a freedesktop.org convention that defines how desktop sessions launch applications automatically on login. It standardizes autostart desktop entry files used by desktop environments such as GNOME, KDE, Xfce, LXDE, and MATE to start background services, applets, and utilities. The mechanism interacts with session managers like systemd user instances, ConsoleKit, and legacy X Window System session scripts and influences startup behavior for distributions including Debian, Ubuntu, Fedora, Arch Linux, and openSUSE.

Overview

The specification provides a cross-desktop method for describing startup programs via .desktop files compatible with the Desktop Entry Specification maintained by freedesktop.org. Commonly placed under system-wide directories such as /etc/xdg/autostart or per-user locations like ~/.config/autostart, these entries are consumed by session components in GNOME Shell, KWin, Xfwm, and other window managers. Administrators and packagers for projects such as Red Hat, Canonical, SUSE, Gentoo, and Debian Project use the format to ensure consistent behavior across KDE Plasma, LXQt, and Enlightenment sessions. Integration with init systems such as systemd and display managers like LightDM, GDM, and SDDM affects when entries are invoked during login.

Specification and File Format

The autostart files follow the INI-like Desktop Entry syntax developed by freedesktop.org and are interpreted by components implementing the Desktop Entry Specification. Required keys include Name, Exec, and Type, while optional keys such as Hidden, OnlyShowIn, NotShowIn, and X-GNOME-Autostart-enabled control visibility and desktop-specific behavior. The OnlyShowIn and NotShowIn keys reference desktop identifiers like GNOME, KDE, XFCE, MATE, and LXDE to limit applicability. Files may include X- prefixes used by implementations in GNOME Foundation, KDE e.V., or third-party projects to convey vendor-specific hints. The format's interaction with environment variables, command-line arguments, and session bus activation in D-Bus implementations is specified indirectly by related freedesktop standards.

Installation and Management

System integrators install .desktop autostart files into distribution-managed locations for packages maintained by organizations such as Debian Project, Fedora Project, and Arch Linux package maintainers. End users manage per-user autostart entries via file managers, text editors, or desktop control panels in GNOME Control Center, KDE System Settings, and Xfce Settings Manager. Tools and utilities like xdg-utils and desktop-specific session managers provide commands and GUIs to enable, disable, or edit autostart entries. Packaging guidelines from distributions including Ubuntu, openSUSE, and Fedora Project recommend using /etc/xdg/autostart for system services while allowing overrides in ~/.config/autostart. For deployment at scale, configuration management systems used by enterprises such as Red Hat Ansible and Puppet can provision or remove autostart files.

Desktop Environment Integration

Desktop environments implement autostart handling in session components: GNOME Session processes .desktop files and coordinates with systemd --user where applicable; KDE Plasma's SessionManager consults KDE-specific metadata alongside freedesktop keys; Xfce reads the files during session startup; LXQt and MATE provide control panels for toggling entries. Integration often requires cooperation with compositors and window managers like Mutter, KWin, Xfwm4, and Openbox to ensure services start after display initialization. Applications from projects such as Mozilla Foundation and Mozilla Thunderbird may ship autostart entries for background update checks, while applets from Canonical-affiliated toolkits or KDE Frameworks rely on the convention to restore session state.

Security and Privacy Considerations

Autostart entries can introduce attack surface if unprivileged applications place files in ~/.config/autostart or if system-wide entries are improperly managed by packagers in Debian Project or Red Hat. Malware or misconfigured software may persist by creating autostart .desktop files; therefore distributions and desktop environments implement policies and prompts in GNOME Shell and KDE Plasma to warn users. Privacy-sensitive daemons started at login—such as analytics collectors from vendors associated with Canonical or telemetry components from third-party projects—should be opt-in and clearly documented. Access controls offered by AppArmor and SELinux can limit what autostarted processes may do, and audit tooling from Auditd can report suspicious activity. Administrators in enterprise environments governed by policies from organizations like The Linux Foundation and OpenSSF should enforce repository and package signing to reduce risk.

Troubleshooting and Common Issues

Common problems include incorrect Exec paths, malformed Desktop Entry keys, conflicting OnlyShowIn/NotShowIn directives, or files masked by Hidden=true. Diagnosing startup failures often involves checking ~/.xsession-errors, journal entries via journalctl for systemd-based sessions, session logs from LightDM or GDM, and examining per-user ~/.config/autostart overrides. Desktop-specific tools—such as GNOME's Startup Applications, KDE's Autostart settings, or Xfce's Session and Startup dialog—help toggle entries. Packagers and system administrators reference distribution packaging guides from Debian Policy, Fedora Packaging Guidelines, and Arch Wiki to ensure correct installation paths and metadata. When concurrency or timing issues arise with services coordinated by D-Bus activation or systemd --user units, ordering can be addressed by deferring execution in Exec or integrating with unit file dependencies managed by systemd.

Category:Freedesktop.org standards