linux连接投影机方法介绍


点评:一般来说,需要笔记本当前使用的分辨率和投影仪的分辨率相同,才能在投影仪上显示笔记本的X,接下来将详细介绍
方案一:
一般来说,需要笔记本当前使用的分辨率和投影仪的分辨率相同,才能在投影仪上显示笔记本的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了。

相关内容