1.生成xorg.conf文件
在Ubuntu12.04中, 系統默認是不會生成xorg.conf文件的,需要使用命令手動生成xorg.conf文件(注意:需要在真正的終端裏面運行,並非X環境下的終端模擬器)
1)停止display manager
sudo service gdm stop
2) 生成新的xorg.conf文件, 此時生成的文件只是爲xorg.conf.new
sudo Xorg -configure :1
3) 將新生成分xorg.conf 文件移動到/etc/X11目錄下
sudo mv xorg.conf.new xorg.conf
2.修改xorg.conf文件
vi /etc/X11/xorg.conf 在最後添加如下內容
Section "ServerFlags"
Option "DontVTSwitch" "true"
EndSection
保存並退出
3.重啓
sudo reboot