Linux(Ubuntu )下切换显示器指令

这两天开发想用大屏幕,所以找了写命令,在win7下很简单,Fn+F7 就能选择屏幕是克隆还是扩展,但是在linux下,有人说要执行一段自己写的脚本来运行,觉得麻烦,后来找到xrandr这个命令,觉得太好用了!


"Xrandr  is  used  to set the size, orientation and/or reflection of the  outputs for a screen. It can also set the screen size."


根据这位朋友的博客:http://goodnight0003.sinaapp.com/?p=271 指令介绍地很详细,使用的时候要注意“—” 换成“-” 而且个别参数前面是“--” 不是“-”。

屏幕扩展:

xrandr --output VGA --right-of LVDS  --auto


出错:

warning: output LVDS not found; ignoring

warning: output VGA not found; ignoring

(VGA 介绍:http://wenku.baidu.com/view/345e71b069dc5022aaea00a1.html 

    LVDS介绍:http://www.cnpdb.com/doc/2007-01/1168608929d2302.shtml  当科普了~)

后来找到这个链接:

http://ubuntuforums.org/showthread.php?t=1610085


执行xrandr

Screen 0: minimum 320 x 200, current 2464 x 900, maximum 8192 x 8192

LVDS1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 246mm x 185mm

   1024x768       50.0*+   60.0     40.0  

   800x600        60.3     56.2  

   640x480        60.0     59.9  

VGA1 connected 1440x900+1024+0 (normal left inverted right x axis y axis) 408mm x 255mm

   1440x900       59.9*+   75.0  

   1280x1024      75.0     60.0  

   1280x960       60.0  

   1152x864       75.0  

   1024x768       75.1     70.1     60.0  

   832x624        74.6  

   800x600        72.2     75.0     60.3     56.2  

   640x480        72.8     75.0     66.7     60.0  

   720x400        70.1  


于是把指令改成

xrandr --output VGA1  --right-of LVDS1 --auto


屏幕就扩展了~


猜你喜欢

转载自lilyenjoyinglife.iteye.com/blog/1569689