我知道gnome-control-center display会更改文件~/.config/monitors.xml。但是当我重新启动我的机器时,gnome-control-center display不记得我以前对双监视器的设置。
因此,我对monitors.xml进行了备份,并在系统启动时将备份复制到~/..config/nanors.xml。
但是现在我需要一种方法来应用这个设置,而不需要重新启动lightdm/gdm或退出当前会话,就像gnome-control-center display一样。
PS:我想做一个脚本,为我的双监视器设置设置正确的设置,而不需要每次启动PC时打开gnome-control-center display,并再次设置所有选项(累人)。
发布于 2014-02-11 12:51:05
我就这样解决了我的问题:
首先,我将监视器配置设置为
gnome-control-center display
然后我保存了,并应用了这些更改。
所以我跑了
xrandr -q
才能得到我现在的配置。就像这样:
Screen 0: minimum 320 x 200, current 1920 x 1980, maximum 8192 x 8192
LVDS1 connected 1600x900+0+1080 (normal left inverted right x axis y axis) 0mm x 0mm
1600x900 60.1*+
1440x900 59.9
1360x768 59.8 60.0
1152x864 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 475mm x 267mm
1920x1080 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
DP1 disconnected (normal left inverted right x axis y axis)使用此设置,我在~/bin/monitors-configure中创建了一个脚本
#!/bin/bash
xrandr --output LVDS1 --mode 1600x900 --pos 0x1080 --rotate normal --output VGA1 --off --output DP1 --off --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate normal现在我只运行monitors-configure
https://askubuntu.com/questions/417401
复制相似问题