歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> linux連接投影機

linux連接投影機

日期:2017/2/27 16:03:54   编辑:Linux教程

方案一:

一般來說,需要筆記本當前使用的分辨率和投影儀的分辨率相同,才能在投影儀上顯示筆記本的X。那麼,可以先運行這個命令:

$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 90
Current rotation - normal
Current reflection - none
Rotations possible - normal
Reflections 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了。
Copyright © Linux教程網 All Rights Reserved