and (graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1
or drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
or stopped udevtrigger))
or runlevel PREVLEVEL=s)
stop on runlevel [016]
可見,一旦發生檔案系統初始化,DBUS匯流排啟動和發生graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1 or drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1 or stopped udevtrigger or runlevel PREVLEVEL=s這裡面的任何一個事件,GDM就會被啟動,只在執行級別在016的時候,GDM不啟動。
所以,事件也就明瞭了、要在upstart層面幹掉gdm,把上面的啟動相關事件註釋掉,改寫下就行了
由於ubuntu 預設模式為2,所以:
start on (filesystem
and started dbus
and (graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1
or drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
第一種方法:(核心級別的)
Sudo vi /etc/default/grub
修改GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
為:GRUB_CMDLINE_LINUX_DEFAULT=” text”
然後執行下sudo update-grub2就可了
第二種方法:(基於upstart的”正統”方法)
ubuntu的upstart的體系下,/etc/init.d裡面基本上都是連線到/lib/init/upstart-job的軟連線,所以,對 initscripts的請求全部轉化為upstart事件,upstart系統對啟動專案的管理全部根據/etc/init裡面的配置檔案來啟動,可以啟動lightdm的事件就讓人咂舌
編輯檔案 /etc/init/lightdm.conf
start on ((filesystem
and started dbus
and (graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1
or drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
or stopped udevtrigger))
or runlevel PREVLEVEL=s)
stop on runlevel [016]
可見,一旦發生檔案系統初始化,DBUS匯流排啟動和發生graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1 or drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1 or stopped udevtrigger or runlevel PREVLEVEL=s這裡面的任何一個事件,GDM就會被啟動,只在執行級別在016的時候,GDM不啟動。
所以,事件也就明瞭了、要在upstart層面幹掉gdm,把上面的啟動相關事件註釋掉,改寫下就行了
由於ubuntu 預設模式為2,所以:
start on (filesystem
and started dbus
and (graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1
or drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
or stopped udevtrigger)
and runlevel [345])
stop on runlevel [0126]
重啟。