XDG Autostart

From ArchWiki
Revision as of 23:11, 23 April 2018 by Eca (talk | contribs) (added example of disabling an autostarting app)
Jump to navigation Jump to search

The XDG Autostart specification defines a standard for autostarting ordinary desktop entries on desktop environment startup and removable medium mounting, by placing them in specific #Directories.

Prerequisites

You need to use either a desktop environment that supports it, or a dedicated implementation, like dex, dapperAUR, or fbautostartAUR.

Directories

An XDG-compliant desktop environment will automatically start desktop entries found in the following directories:

  • System-wide: $XDG_CONFIG_DIRS/autostart/ (/etc/xdg/autostart/ by default)
  • GNOME also starts files found in /usr/share/gnome/autostart/
  • User-specific: $XDG_CONFIG_HOME/autostart/ (~/.config/autostart/ by default)

Override

Users can override system-wide desktop entries by copying them into the user-specific directory.

Disable Autostarting

First create an overriding desktop entry, then add Hidden=true to the desktop file.

cp /etc/xdg/autostart/blueman.desktop ~/.config/autostart 
echo "Hidden=true" >> ~/.config/autostart/blueman.desktop

For a more details, consult the specification.