在 Linux下使用雙螢幕

我在 Windows 下可以利用 intel 915 顯示卡的驅動程式就可以用很簡單的方法使用雙螢幕,其實它就是模擬 2048*768 的螢幕讓你分成二個螢幕顯示。你可以在主螢幕上寫程式,副螢幕上列出或顯示要參考的文件,使用是非常方便。而 linux 下的 xorg 也可以實作這樣的功能。

你必需照下面的範例修改 /etc/X11/xorg.conf 檔案,請記得修改前請備份你的 xorg.conf ,避免日後如果 xwindow 開不起來,還有辦法救回來。設定檔中必需要設定的就是,設定二張顯卡但是它是指到同一個 device,二台顯示器,和二個顯示元件,並且設定其擺放的位置(左邊還右邊),可以讓你決定滑鼠是往左還是往右移動就會到下一個螢幕。

範例如下: [code linenum=“no” download=“xorg.conf.example”] Section “Device” Identifier “Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller” Driver “i810” BusID “PCI:0:2:0” Option “MonitorLayout” “CRT,LFP” Screen 0 EndSection Section “Device” # 第二個顯示卡的名字,修改後,後面利用到些螢幕的名字都要一樣 Identifier “Intel-CRT” Driver “i810” BusID “PCI:0:2:0” Option “MonitorLayout” “CRT,LFP” Screen 1 EndSection Section “Monitor” Identifier “Generic Monitor” Option “DPMS” EndSection # 第二個螢幕 Section “Monitor” Identifier “CRT” Option “DPMS” EndSection Section “Screen” Identifier “Default Screen” Device “Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller” Monitor “Generic Monitor” DefaultDepth 24 SubSection “Display” Depth 24 Modes “1024x768” “800x600” “640x480” EndSubSection EndSection # 第二個螢幕設定 Section “Screen” Identifier “External Screen” Device “Intel-CRT” Monitor “CRT” DefaultDepth 24 SubSection “Display” Depth 24 Modes “1024x768” EndSubSection EndSection Section “ServerLayout” Identifier “Default Layout” # 有幾個螢幕就寫幾個 Screen “Default Screen” Screen “External Screen” RightOf “Default Screen” InputDevice “Generic Keyboard” InputDevice “Configured Mouse” InputDevice “Synaptics Touchpad” EndSection Section “DRI” Mode 0666 EndSection # 開啟多螢幕功能 Section “ServerFlags” Option “Xinerama” “true” EndSection [/code]

不過我還是希望我的二個螢幕各有不同的桌面和工具列,就像虛擬桌面一樣。這樣我按 alt+tab 時,就不會跳到另一個桌面,不過我目前不會設定,只好現在將就點。