Ubuntu下实现双屏独立切换

在编码时,总觉得屏幕大小不够,要是能多个屏多好,可以这样

把你的显示器连接到你的电脑,然后开启一个终端

输入:xrandr

显示如下:

 

LVDS1 connected 1366x768+1024+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1366x768       60.0*+
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024      59.9 +   75.0  
   1024x768       75.1     70.1     60.0* 
   800x600        72.2     75.0     60.3     56.2  
   640x480        72.8     75.0     60.0  
   720x400        70.1  
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)


我的效果是这样的,其中

 

         LVDS1是笔记本laptop的显示器名字,

         VGA1是我接入的显示器名称

然后,编写一个文件如:.xprofile

 

xrandr --output LVDS1  --primary --auto --pos 0x240 
xrandr --output VGA1 --rotate normal --pos 1680x0 --left-of LVDS1


解释一下,第一条命令为设置输出显示器LVDS1为主显示器,

 

第二条命令设置第二个显示器VGA1为扩展的显示器,不旋转,在主显示器的左边,这个看你怎么放

置你的显示器了,如果放在右边,则为--right-of LVDS!

然后运行该文件,

输入命令:sh .xprofile

就ok了


注意:每次启动电脑后,最好运行一下xrandr检测一下,因为可能显示器的名字被更改了,我的常变为

LVDS2和VGA2,对应的把.xprofile文件修改了就ok了


 

posted @ 2013-09-02 18:11  pangbangb  阅读(2168)  评论(0编辑  收藏  举报