1:查看显示器连接
因为我是笔记本外接显示器的,一般都只用外接显示器的,所以尝试去关闭笔记本的显示屏
ming@ming:~$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected (normal left inverted right x axis y axis)
1366x768 60.0 +
1360x768 59.8 60.0
1280x720 60.0
1024x768 60.0
1024x576 60.0
960x540 60.0
800x600 60.3 56.2
864x486 60.0
640x480 59.9
720x405 60.0
680x384 60.0
640x360 60.0
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
VGA1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
1920x1080 60.0*+
1600x900 60.0
1280x1024 75.0 60.0
1152x864 75.0
1024x768 75.1 60.0
800x600 75.0 60.3
640x480 75.0 60.0
720x400 70.1
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
ming@ming:~$
可以看到是连接了俩个显示器的
2:设置双屏幕显示:
(1)打开外接显示器,双屏幕显示相同的内容--克隆,(auto为最高分辨率)
xrandr --output VGA-0 --same-as DVI-D-0 --auto
(2)若要指定外接显示器的分辨率可以使用下面的命令(1280*1024):
xrandr --output VGA-0 --same-as DVI-D-0 --mode 1280x1024
(3)打开外接显示器,设置为右侧扩展
xrandr --output VGA-0 --right-of DVI-D-0 --auto
(4)关闭显示器
xrandr --output VGA-0 --off
(5)打开VGA-0接口显示器,关闭DVI-D-0接口显示器
xrandr --output VGA-0 --auto --output DVI-D-0 --off