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
相关文章
相关标签/搜索