分享

桌面银河麒麟V10 SP1 xrandr命令行方式设置双屏显示

朵儿爸 2021-10-9 10:22:30 发表于 已解决 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 1 6527
<p>使用xrandr命令查看显示屏及分辨率设置,如下图为命令输出截图,从截图看有<b>eDP-1</b>(笔记本自带屏幕)、<b>HDMI-1</b>(通过HDMI接口连接的外置显示器)</p><p><img style="max-width:100%" src="https://cdn2.cnxclm.com/187_20211009101115_1.jpg?imageView2/0/q/75|watermark/1/image/aHR0cHM6Ly9jZG4yLmNueGNsbS5jb20vaW1hZ2Uvc3lsb2dvL3N5bG9nby1uZXc2LnBuZw==/dissolve/39/gravity/SouthEast/dx/10/dy/10" alt="Image"><br></p><p><br></p><p>(1)打开外接显示器,双屏幕显示相同的内容--克隆,(auto为最高分辨率)<br></p><p>
  1. $ xrandr --output HDMI-1 --same-as eDP-1 --auto
复制代码
<p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-word;"><p class="_2Uzcx_" style="box-sizing: border-box; position: relative; overflow: hidden;"><button class="VJbwyy" type="button" aria-label="复制代码" style="box-sizing: border-box; touch-action: manipulation; margin: 0px; color: rgb(204, 204, 204); font-size: 14px; font-family: inherit; line-height: inherit; overflow: visible; text-transform: none; appearance: button; cursor: pointer; user-select: none; position: absolute; top: 6px; right: 6px; display: flex; justify-content: center; align-items: center; width: 32px; height: 24px; padding: 0px; border: none; border-radius: 6px; background-color: rgba(230, 230, 230, 0.2); box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 0px 0px; opacity: 0; visibility: hidden; transition: opacity 0.2s ease-in-out 0s, visibility 0.2s ease-in-out 0s; z-index: 1; orphans: 2; white-space: normal; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><i aria-label="icon: copy" class="anticon anticon-copy" style="box-sizing: border-box; display: inline-block; color: inherit; font-style: normal; line-height: 0; text-align: center; text-transform: none; vertical-align: -0.125em; text-rendering: optimizelegibility; -webkit-font-smoothing: antialiased;"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button></p></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; word-break: break-word;">(2)指定外接显示器的分辨率可以使用下面的命令(1280*1024):--mode参数</p>
  1. $ xrandr --output HDMI-1 --same-as eDP-1 --mode 1280x1024
复制代码
<p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-word;"><p class="_2Uzcx_" style="box-sizing: border-box; position: relative; overflow: hidden;"><button class="VJbwyy" type="button" aria-label="复制代码" style="box-sizing: border-box; touch-action: manipulation; margin: 0px; color: rgb(204, 204, 204); font-size: 14px; font-family: inherit; line-height: inherit; overflow: visible; text-transform: none; appearance: button; cursor: pointer; user-select: none; position: absolute; top: 6px; right: 6px; display: flex; justify-content: center; align-items: center; width: 32px; height: 24px; padding: 0px; border: none; border-radius: 6px; background-color: rgba(230, 230, 230, 0.2); box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 0px 0px; opacity: 0; visibility: hidden; transition: opacity 0.2s ease-in-out 0s, visibility 0.2s ease-in-out 0s; z-index: 1; orphans: 2; white-space: normal; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><i aria-label="icon: copy" class="anticon anticon-copy" style="box-sizing: border-box; display: inline-block; color: inherit; font-style: normal; line-height: 0; text-align: center; text-transform: none; vertical-align: -0.125em; text-rendering: optimizelegibility; -webkit-font-smoothing: antialiased;"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button></p></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; word-break: break-word;">(3)打开外接显示器,设置为右侧扩展</p>
  1. $ xrandr --output HDMI-1 --right-of eDP-1 --auto
复制代码
<p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-word;"><p class="_2Uzcx_" style="box-sizing: border-box; position: relative; overflow: hidden;"><button class="VJbwyy" type="button" aria-label="复制代码" style="box-sizing: border-box; touch-action: manipulation; margin: 0px; color: rgb(204, 204, 204); font-size: 14px; font-family: inherit; line-height: inherit; overflow: visible; text-transform: none; appearance: button; cursor: pointer; user-select: none; position: absolute; top: 6px; right: 6px; display: flex; justify-content: center; align-items: center; width: 32px; height: 24px; padding: 0px; border: none; border-radius: 6px; background-color: rgba(230, 230, 230, 0.2); box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 0px 0px; opacity: 0; visibility: hidden; transition: opacity 0.2s ease-in-out 0s, visibility 0.2s ease-in-out 0s; z-index: 1; orphans: 2; white-space: normal; widows: 2; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><i aria-label="icon: copy" class="anticon anticon-copy" style="box-sizing: border-box; display: inline-block; color: inherit; font-style: normal; line-height: 0; text-align: center; text-transform: none; vertical-align: -0.125em; text-rendering: optimizelegibility; -webkit-font-smoothing: antialiased;"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></i></button></p></p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; word-break: break-word;">(4) 关闭显示器</p>
  1. $ xrandr --output HDMI-1 --off
复制代码
<p><p style="margin-bottom: 20px; box-sizing: border-box; word-break: break-word;">(5) 关闭显示器(不是on参数,而是auto参数)</p></p><p>
  1. $ xrandr --output HDMI-1 --auto
复制代码
<p>(6)打开<span style="font-family: Consolas, Monaco, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 17.6px; white-space: pre;">HDMI-1</span>接口显示器,关闭<span style="font-family: Consolas, Monaco, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 17.6px; white-space: pre;">eDP-1</span>接口显示器<br></p><p>
  1. $ xrandr --output HDMI-1 --auto --output eDP-1 --off
复制代码
<p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-word;">(7)设置<span style="font-family: Consolas, Monaco, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 17.6px; white-space: pre;">HDMI-1</span>为主屏幕</p>
  1. $ xrandr --output HDMI-1 --auto --primary
复制代码
<p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-word;">(8)<span style="color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">设置</span><span style="font-family: Consolas, Monaco, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 17.6px; white-space: pre;">eDP-1</span><span style="background-color: rgb(255, 255, 255); color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">在</span><span style="font-family: Consolas, Monaco, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 17.6px; white-space: pre;">HDMI-1</span><span style="background-color: rgb(255, 255, 255); color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;">的右面</span></p>
  1. $ xrandr --output eDP-1 --right-of HDMI-1 --auto
复制代码
<p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-word;"><br></p><p style="box-sizing: border-box; margin-bottom: 20px; word-break: break-word;"><span style="background-color: rgb(255, 255, 255); color: rgb(64, 64, 64); font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;"><br></span></p><p class="_2Uzcx_" style="box-sizing: border-box; position: relative; overflow: hidden;"><button class="VJbwyy" type="button" aria-label="复制代码" style="touch-action: manipulation; color: rgb(204, 204, 204); font-size: 14px; user-select: none; position: absolute; top: 6px; right: 6px; display: flex; justify-content: center; align-items: center; width: 32px; height: 24px; border-width: initial; border-style: none; border-color: initial; border-radius: 6px; background-color: rgba(230, 230, 230, 0.2); box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 0px 0px; opacity: 0; visibility: hidden; transition: opacity 0.2s ease-in-out 0s, visibility 0.2s ease-in-out 0s; z-index: 1;"><span aria-label="icon: copy" class="anticon anticon-copy" style="box-sizing: border-box; display: inline-block; color: inherit; line-height: 0; vertical-align: -0.125em; text-rendering: optimizelegibility; -webkit-font-smoothing: antialiased;"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></span></button></p></p><p><br></p><p class="_2Uzcx_" style="box-sizing: border-box; position: relative; overflow: hidden;"><button class="VJbwyy" type="button" aria-label="复制代码" style="touch-action: manipulation; color: rgb(204, 204, 204); font-size: 14px; user-select: none; position: absolute; top: 6px; right: 6px; display: flex; justify-content: center; align-items: center; width: 32px; height: 24px; border-width: initial; border-style: none; border-color: initial; border-radius: 6px; background-color: rgba(230, 230, 230, 0.2); box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 0px 0px; opacity: 0; visibility: hidden; transition: opacity 0.2s ease-in-out 0s, visibility 0.2s ease-in-out 0s; z-index: 1;"><span aria-label="icon: copy" class="anticon anticon-copy" style="box-sizing: border-box; display: inline-block; color: inherit; line-height: 0; vertical-align: -0.125em; text-rendering: optimizelegibility; -webkit-font-smoothing: antialiased;"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></span></button></p><p></p></p><p class="_2Uzcx_" style="box-sizing: border-box; position: relative; overflow: hidden;"><button class="VJbwyy" type="button" aria-label="复制代码" style="touch-action: manipulation; color: rgb(204, 204, 204); font-size: 14px; user-select: none; position: absolute; top: 6px; right: 6px; display: flex; justify-content: center; align-items: center; width: 32px; height: 24px; border-width: initial; border-style: none; border-color: initial; border-radius: 6px; background-color: rgba(230, 230, 230, 0.2); box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 0px 0px; opacity: 0; visibility: hidden; transition: opacity 0.2s ease-in-out 0s, visibility 0.2s ease-in-out 0s; z-index: 1;"><span aria-label="icon: copy" class="anticon anticon-copy" style="box-sizing: border-box; display: inline-block; color: inherit; line-height: 0; vertical-align: -0.125em; text-rendering: optimizelegibility; -webkit-font-smoothing: antialiased;"><svg viewBox="64 64 896 896" focusable="false" class="" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg></span></button></p></p>

版权说明:论坛帖子主题均由合作第三方提供并上传,若内容存在侵权,请进行举报

已有(0)人评论

跳转到指定楼层
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系在线客服