Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

How to change the screen resolution in VNC viewer for Ubuntu 12.04 without a monitor?

Writer Mia Lopez

I have Ubuntu 12.04 installed on a machine and I always use it remotely from VNC. When I have monitor connected to this machine, I can change the resolution of my VNC viewer in the following line:

$vnc4server --geometry 1440x900

This worked for me, but I always use this machine remotely, I unplug the monitor and reboot. and the above command line not work anymore.

Then I tried 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

There is only one option available, so I tried to add a new one.

$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 900 903 909 934 -hsync +vsync
$xrandr --addmode S2 "1440x900_60.00"

then I checked with xrandr again and can't see the new mode added.

I try to execute the following command and get error says my RandR is too old.

$xrandr --output S2 --mode 1440x900_60.00
xrandr: Server RandR version before 1.2

but this does not make sense to me, if I plug in the monitor back and run the xrandr command, it works again! It seems that Ubuntu must conntect to a real monitor before I can change my resolution in my VNC viewer.

Can anyone help?

UPDATE:Finally I solved this problem by changing to tightvncserver

$tightvncserver -geometry 1440x900 

works for me.

Thanks everything answered my question

4

2 Answers

You can change resolution when you connect to monitor-less PC via VNC by executing the following command:

xrandr --fb 1280x1024

Source:

2

Looking at the documentation for xrandr, it relies on getting information from the display for supported resolutions. With no monitor connected, xrandr has no information to draw on for setting a display resolution and most likely draws from the resolution set in your Display preferences for the VNC connection. No display = no screen resolution changing.

6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy