linux串連投影機 方案一:一般來說,需要筆記本當前使用的解析度和投影儀的解析度相同,才能在投影儀上顯示筆記本的X。那麼,可以先運行這個命令: www.2cto.com $xrandr 比如在我的電腦上,結果如下: [2007-04-11 09:03:20]zhangsen@zhangsen-desktop:/opt/src/emacs$xrandr SZ: Pixels Physical Refresh*0 1280 x 1024 ( 433mm x 346mm ) *50 54 1 1024 x 768 ( 346mm x 260mm ) 51 60 61 2 800 x 600 ( 270mm x 203mm ) 52 65 66 67 68 3 640 x 480 ( 216mm x 162mm ) 53 73 74 75 4 1280 x 960 ( 433mm x 325mm ) 55 5 1280 x 800 ( 433mm x 270mm ) 56 6 1280 x 768 ( 433mm x 260mm ) 57 7 1152 x 864 ( 390mm x 292mm ) 58 8 1152 x 768 ( 390mm x 260mm ) 59 9 960 x 600 ( 325mm x 203mm ) 62 10 840 x 525 ( 284mm x 177mm ) 63 11 832 x 624 ( 281mm x 211mm ) 64 12 800 x 512 ( 270mm x 173mm ) 69 13 720 x 450 ( 243mm x 152mm ) 70 14 640 x 512 ( 216mm x 173mm ) 71 72 15 640 x 400 ( 216mm x 135mm ) 76 16 640 x 384 ( 216mm x 130mm ) 77 17 576 x 432 ( 195mm x 146mm ) 78 18 576 x 384 ( 195mm x 130mm ) 79 19 512 x 384 ( 173mm x 130mm ) 80 81 82 20 416 x 312 ( 140mm x 105mm ) 83 21 400 x 300 ( 135mm x 101mm ) 84 85 86 87 22 320 x 240 ( 108mm x 81mm ) 88 89 90Current rotation - normalCurrent reflection - noneRotations possible - normalReflections possible - none 第0條加了*號,說明這是膝上型電腦當前使用的解析度。如果投影儀的解析度是1024x768,那麼就需要改變膝上型電腦的解析度。因為在上面的結果中,1024x768對應第1條,所以運行這個命令來改變解析度: $xrandr -s 1 這樣就切換了解析度。等待投影儀的搜尋吧。 首先接上VGA,執行命令(VGA代表顯示器,LVDS代表筆記本液晶屏): $ xrandr --output VGA --auto 當前案頭會複製到VGA上面,此時執行xrandr會看到有了VGA-0 斷開VGA-0: $ xrandr --output VGA-0 --auto 按照當前的配置延伸桌面: $xrandr --output VGA-0 --auto --left-of LVDS 這是需修改xorg.conf,先用不帶參數執行xrandr能夠列出當前的顯示裝置和每個裝置支援的模式。Screen代表了總顯示地區,VGA代表顯示器,LVDS代表筆記本液晶屏。 Screen 0: minimum 320 x 200, current 1280 x 768, maximum 1280 x 1280 VGA connected (normal left inverted right x axis y axis) 1280x1024 75.0 + 69.8 59.9 1024x768 75.1 70.1 60.0 800x600 72.2 75.0 60.3 640x480 75.0 72.8 65.4 60.0 720x400 70.1 LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 246mm x 184mm 1024x768 50.0*+ 60.0 40.0 800x600 60.3 640x480 60.0 59.9 修改: gksudo gedit /etc/X11/xorg.conf 修改後如下: Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" SubSection "Display" Virtual 2304 1024 #左右擴充雙屏,2304=1280+1024,1024=max(1024,768) EndSubSection EndSection 注意:Ubuntu 8.04中的xorg.conf已經非常精簡,Subsection "Display" 可能要自己添加,別忘記 EndSubSection xrandr 命令列可以很方便地切換雙屏,常用方式如下,其他的可以自己探索: xrandr --output VGA --same-as LVDS --auto 開啟外接顯示器(最高解析度),與筆記本液晶螢幕顯示同樣內容(複製) xrandr --output VGA --same-as LVDS --mode 1024x768 開啟外接顯示器(解析度為1024x768),與筆記本液晶螢幕顯示同樣內容(複製) xrandr --output VGA --right-of LVDS --auto 開啟外接顯示器(最高解析度),設定為右側擴充螢幕 xrandr --output VGA --off 關閉外接顯示器 xrandr --output VGA --auto --output LVDS --off 開啟外接顯示器,同時關閉筆記本液晶螢幕(只用外接顯示器工作) xrandr --output VGA --off --output LVDS --auto 關閉外接顯示器,同時開啟筆記本液晶螢幕 (只用筆記本液晶屏) 方案二: 開啟xorg.conf gksudo gedit /etc/X11/xorg.conf 修改Section “Device”如下: Section "Device" Identifier "Configured Video Device" Option "TwinView" "True" #開啟雙顯支援 Option "TwinViewOrientation" "Clone" #複製模式,Relative為擴充模式 Option "UseEdidFreqs" "True" #開啟重新整理頻率設定 Option "Metamodes" "1024x768_60, 1024x768; 1024x768_60,800x600" #重新整理頻率模式,指明這兩個裝置的解析度,逗號前的第一個是本機顯示裝置,逗號後的第二個是外部裝置,分號分隔開多套模式,可以設兩套方案或更多。 EndSection 儲存。串連好投影儀,重新啟動Xwindows(Ctrl+Alt+Backspace)就OK了。