如何使xrandr更改持久化?

什么时候

我运行以下命令以允许我在屏幕之间移动窗口:

xrandr --auto

这个魔术命令可以为我修复屏幕(在运行此第二个监视器之前,我只是一个可以移动鼠标的空白区域)。重新启动后,如何使此命令卡住?除了重新运行此命令外,我对修复我的配置更感兴趣,但是我对如何实现这一点一无所知。

我有2个监视器,DFP 5和DFP6。运行xrandr结果如下:

DFP1 disconnected (normal left inverted right x axis y axis)
DFP2 disconnected (normal left inverted right x axis y axis)
DFP3 disconnected (normal left inverted right x axis y axis)
DFP4 disconnected (normal left inverted right x axis y axis)
DFP5 connected 1680x1050+1680+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.0*+
   1400x1050      60.0  
   1280x1024      75.0     60.0  
   1440x900       60.0  
   1280x960       75.0     60.0  
   1280x800       75.0     60.0  
   1152x864       60.0     75.0  
   1280x768       75.0     60.0  
   1280x720       75.0     60.0  
   1024x768       75.0     60.0  
   800x600        75.0     60.3  
   640x480        75.0     59.9  
DFP6 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.0*+
   1400x1050      60.0  
   1280x1024      75.0     60.0  
   1440x900       60.0  
   1280x960       75.0     60.0  
   1280x800       75.0     60.0  
   1152x864       60.0     75.0  
   1280x768       75.0     60.0  
   1280x720       75.0     60.0  
   1024x768       75.0     60.0  
   800x600        75.0     60.3  
   640x480        75.0     59.9  
CRT1 disconnected (normal left inverted right x axis y axis)

我已经使用Displaysdebian中菜单将DFP 6设置为DFP 5的右侧这是我的xorg.conf文件:

Section "ServerLayout"
        Identifier     "aticonfig Layout"
        Screen      0  "aticonfig-Screen[0]-0" 0 0
EndSection

Section "Module"
EndSection

Section "Monitor"
        Identifier   "aticonfig-Monitor[0]-0"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
EndSection

Section "Device"
        Identifier  "aticonfig-Device[0]-0"
        Driver      "fglrx"
        BusID       "PCI:4:0:0"
EndSection

Section "Screen"
        Identifier "aticonfig-Screen[0]-0"
        Device     "aticonfig-Device[0]-0"
        Monitor    "aticonfig-Monitor[0]-0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                virtual 3360 1050
        EndSubSection
EndSection

它似乎配置为将所有内容都变成一个屏幕,并且xrandr --auto以某种方式对其进行了修复。有什么方法可以窥见此命令将结果保存到xorg.conf的功能吗?您通常如何使用xrandr使结果持久化?

如果我搜索这个我要么告知要修改我的xorg.conf文件(我不知道该怎么办,因为我不知道什么 xrandr --auto如何运行实际上是在做),或说明xrandr在启动时,我敢猜测是没有必要的,但我可能是错的。

什么时候

我创建了以下文件:

/etc/X11/Xsession.d/45custom_xrandr-settings 并将此行放入其中:

xrandr --output DFP6 --primary

这样可以使正确的监视器成为主要监视器,并在登录时启动。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章