如何使用 xrandr 在 Linux 中复制桌面?

Dar*_*ber 9 xrandr display deepin

目前,我使用的是 Deepin OS 15.4。

默认情况下,Deepin 在连接投影仪时将桌面设置为扩展模式,但我想要的是复制我的屏幕。

我在控制中心配置中找不到它,但我在这个问题中偶然发现了

上面用 xrandr 扩展了监视器,

如何使用 xrandr 将我的桌面复制到投影仪?

rlf*_*rlf 18

首先找出每个显示器的名称,例如使用xrandr --current. 然后以下命令应该可以复制它们。

 $ xrandr --output <projector> --same-as <desktop>
Run Code Online (Sandbox Code Playgroud)

  • 如果显示器具有不同的分辨率,则效果不佳。 (2认同)

Geo*_*iou 12

我使用此命令将桌面与外部 VGA 镜像:

$ xrandr --output LVDS-1 --mode 1366x768 --scale 1x1 --output VGA-1 --same-as LVDS-1 --mode 1920x1080 --scale 0.711x0.711
Run Code Online (Sandbox Code Playgroud)

LVDS-1 是笔记本电脑屏幕,本机工作在 1366x768。

VGA-1 是我的外部 VGA 显示器,原始分辨率为 1920x1080,缩放到 0.711,接近 1366x768(笔记本电脑分辨率)。

结果对我来说很好。您可以尝试使用这些选项。

同样,我将这个用于扩展桌面:

$ xrandr --output VGA-1 --mode 1920x1080 --scale 1x1 --output LVDS-1 --mode 1366x768 --scale 1x1 --left-of VGA-1
Run Code Online (Sandbox Code Playgroud)

您只需运行即可检测屏幕名称 xrandr