linux一机双屏命令大全
1个回答
展开全部
楼主:
RandRX11扩展协议允许重启X情况修改输些参数并使效xrandr该协议命令行界面功能用设置双屏显示
缺省情况外接显示器後启用屏幕复制模式即两屏幕显示完全相同内容使用命令xrandr -q查看前输状态:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm 1280x800 60.0+ 60.0 50.0
1024x768 75.1 70.1 60.0
800x600 72.2 75.0 60.3 56.2
768x576 75.0 72.0 60.0
640x480 72.8 75.0 60.0 59.9
VGA1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm 1920x1080 60.0+ 1680x1050 60.0
1280x1024 75.0 60.0
1440x900 59.9
1280x960 60.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
HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis)
见笔记本电脑屏幕输(LVDS1)显示辨率1280x800外接显示器输(VGA1)辨率1920x1080两输整虚拟屏幕(名称:Screen 0;前:1920x1080;:8192x8192)坐标都+0+0所外接显示器看屏幕左角1280x800辨率屏幕
屏幕复制模式用於外接投影仪现我需要两屏幕别显示各自显示器并两屏幕显示同内容(Windows设置双屏显示选择扩展模式)
由於我笔记本电脑放外接显示器左边所操作自使用命令xrandr --output VGA1 --right-of LVDS1外接显示器输虚拟屏幕位置设置笔记本电脑输右边示意图:
两显示器显示同内容由於属於同虚拟屏幕窗口跨边界显示器拖另显示器再使用命令xrandr -q查看现输状态:
Screen 0: minimum 320 x 200, current 3200 x 1080, maximum 8192 x 8192 LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm 1280x800 60.0+ 60.0 50.0
1024x768 75.1 70.1 60.0
800x600 72.2 75.0 60.3 56.2
768x576 75.0 72.0 60.0
640x480 72.8 75.0 60.0 59.9
VGA1 connected 1920x1080+1280+0 (normal left inverted right x axis y axis) 509mm x 286mm 1920x1080 60.0+ 1680x1050 60.0
1280x1024 75.0 60.0
1440x900 59.9
1280x960 60.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
HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis)
使用xrandr做设置前X效重启後恢复原使设置持久化修改xorg.conf或设置自执行命令据说些图形界面封装xrandr前端完善桌面环境GNOMEKDE应该图形界面设置我所使用XFCE目前似乎能启用/禁用复制模式支持图形界面设置扩展模式
面脚本用简化双屏显示设置:
#!/bin/bash
# Restart trayer and cairo-dock which I use on my desktop
restart_widget()
{
killall trayer
killall cairo-dock
# Another script which starts trayer and set some options
mytrayer
cairo-dock &
}
set_dualhead()
{
xrandr --output LVDS1 --auto
xrandr --output VGA1 --auto
xrandr --output VGA1 --right-of LVDS1
restart_widget
}
set_lvds()
{
xrandr --output VGA1 --off
xrandr --output LVDS1 --auto
restart_widget
}
set_vga()
{
xrandr --output LVDS1 --off
xrandr --output VGA1 --auto
restart_widget
}
if [ $# -eq 0 ]; then
set_dualhead
exit
fi
case "$1x" in
"lvdsx") set_lvds;;
"vgax") set_vga;;
*) echo 'Unknown parameter !';;
esac
RandRX11扩展协议允许重启X情况修改输些参数并使效xrandr该协议命令行界面功能用设置双屏显示
缺省情况外接显示器後启用屏幕复制模式即两屏幕显示完全相同内容使用命令xrandr -q查看前输状态:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm 1280x800 60.0+ 60.0 50.0
1024x768 75.1 70.1 60.0
800x600 72.2 75.0 60.3 56.2
768x576 75.0 72.0 60.0
640x480 72.8 75.0 60.0 59.9
VGA1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm 1920x1080 60.0+ 1680x1050 60.0
1280x1024 75.0 60.0
1440x900 59.9
1280x960 60.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
HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis)
见笔记本电脑屏幕输(LVDS1)显示辨率1280x800外接显示器输(VGA1)辨率1920x1080两输整虚拟屏幕(名称:Screen 0;前:1920x1080;:8192x8192)坐标都+0+0所外接显示器看屏幕左角1280x800辨率屏幕
屏幕复制模式用於外接投影仪现我需要两屏幕别显示各自显示器并两屏幕显示同内容(Windows设置双屏显示选择扩展模式)
由於我笔记本电脑放外接显示器左边所操作自使用命令xrandr --output VGA1 --right-of LVDS1外接显示器输虚拟屏幕位置设置笔记本电脑输右边示意图:
两显示器显示同内容由於属於同虚拟屏幕窗口跨边界显示器拖另显示器再使用命令xrandr -q查看现输状态:
Screen 0: minimum 320 x 200, current 3200 x 1080, maximum 8192 x 8192 LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm 1280x800 60.0+ 60.0 50.0
1024x768 75.1 70.1 60.0
800x600 72.2 75.0 60.3 56.2
768x576 75.0 72.0 60.0
640x480 72.8 75.0 60.0 59.9
VGA1 connected 1920x1080+1280+0 (normal left inverted right x axis y axis) 509mm x 286mm 1920x1080 60.0+ 1680x1050 60.0
1280x1024 75.0 60.0
1440x900 59.9
1280x960 60.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
HDMI1 disconnected (normal left inverted right x axis y axis) DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis)
使用xrandr做设置前X效重启後恢复原使设置持久化修改xorg.conf或设置自执行命令据说些图形界面封装xrandr前端完善桌面环境GNOMEKDE应该图形界面设置我所使用XFCE目前似乎能启用/禁用复制模式支持图形界面设置扩展模式
面脚本用简化双屏显示设置:
#!/bin/bash
# Restart trayer and cairo-dock which I use on my desktop
restart_widget()
{
killall trayer
killall cairo-dock
# Another script which starts trayer and set some options
mytrayer
cairo-dock &
}
set_dualhead()
{
xrandr --output LVDS1 --auto
xrandr --output VGA1 --auto
xrandr --output VGA1 --right-of LVDS1
restart_widget
}
set_lvds()
{
xrandr --output VGA1 --off
xrandr --output LVDS1 --auto
restart_widget
}
set_vga()
{
xrandr --output LVDS1 --off
xrandr --output VGA1 --auto
restart_widget
}
if [ $# -eq 0 ]; then
set_dualhead
exit
fi
case "$1x" in
"lvdsx") set_lvds;;
"vgax") set_vga;;
*) echo 'Unknown parameter !';;
esac
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询