Debian/Ubuntu自啓動方法總結

總結Debian/Ubuntu的啓動方法.ubuntu

XDG AutoStart

將程序的快捷方式置於/etc/xdg/autostart便可隨XDG自啓動.下面是fcitx輸入法的快捷方式.session

[Desktop Entry]
Name=Fcitx
Name[zh_CN]=Fcitx
Name[zh_TW]=Fcitx
Comment=Input Method
Comment[zh_CN]=輸入法
Comment[zh_TW]=輸入法
Exec=fcitx
Icon=fcitx
Terminal=false
Type=Application
Categories=System;Utility;
StartupNotify=false
X-GNOME-Autostart-Phase=Applications
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Notify=false
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false

~/.config/autostart

在如下環境裏測試成功測試

  • kde4

~/.config/autostart文件夾下保存的desktop文件都會在用戶登陸後自動啓動。也可直接在kde的啓動配置裏添加。spa

/etc/rc.d

rc.local

/etc/X11/Xsession

/etc/X11/Xsession.d存放了不少圖形界面的初始化腳本。code

Upstart

Ubuntu從6.10引入upstart,並在9.10將多數系統服務轉換到upstart下,不過system v init system的服務依然被兼容。ci

閱讀資料

  1. UbuntuBootupHowto
  2. UpstartHowto
  3. Upstart Intro, Cookbook and Best Practises
相關文章
相關標籤/搜索