1 min read

XDG Autostart

Table of Contents

Autostart Directories

依以下優先順序

# 1: user-specific
$XDG_CONFIG_HOME/autostart

# 2: user-specific default
~/.config/autostart

# 3: system-wide
$XDG_CONFIG_DIRS/autostart

# 4: system-wide default
/etc/xdg/autostart

.desktop file format

有興趣看詳細定義可閱讀 Desktop Entry Specification 。

以 Steam 裡面的遊戲「Little Nightmares」爲例:

[Desktop Entry]
Name=Little Nightmares
Comment=Play this game on Steam
Exec=steam steam://rungameid/424840
Icon=steam_icon_424840
Terminal=false
Type=Application
Categories=Game;

TBD..

參考資料