我在一台机器上安装了 Ubuntu 12.04,我总是从 VNC 远程使用它。当我将显示器连接到这台机器时,我可以在以下行中更改 VNC 查看器的分辨率:
$vnc4server --geometry 1440x900
Run Code Online (Sandbox Code Playgroud)
这对我有用,但我总是远程使用这台机器,我拔掉显示器并重新启动。并且上面的命令行不再起作用。
然后我尝试了xrandr
SZ: Pixels Physical Refresh
*0 1024 x 768 ( 260mm x 195mm ) *60
Current rotation - normal
Current reflection - none
Rotations possible - normal
Reflections possible - none
Run Code Online (Sandbox Code Playgroud)
只有一个选项可用,所以我尝试添加一个新选项。
$cvt 1440 900
# 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
Modeline "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
$xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 …Run Code Online (Sandbox Code Playgroud)