Difference between revisions of "XDG Autostart"

From ArchWiki
Jump to navigation Jump to search
(added example of disabling an autostarting app)
m (→‎Override: smaller heading size)
Line 16: Line 16:
 
== Override ==
 
== Override ==
 
Users can override system-wide [[desktop entries]] by copying them into the user-specific directory.
 
Users can override system-wide [[desktop entries]] by copying them into the user-specific directory.
=== Disable Autostarting ===
+
==== Disable Autostarting ====
 
First create an overriding desktop entry, then add Hidden=true to the desktop file.
 
First create an overriding desktop entry, then add Hidden=true to the desktop file.
  

Revision as of 23:12, 23 April 2018

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.