Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an Ubuntu server with no physical access to it, only via ssh/vnc.

It is stuck on a 1680x1050 resolution and in the system display settings the menus are disabled since there is no detected real display connected.

I need to lower the resolution to e.g. 800x600.

When I try:

$ xrandr --output VGA1 --mode 800x600

I'm getting:

xrandr: cannot find mode 800x600

The results are the same even if I first try:

$ xrandr --newmode "800x600_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync

The props are:

$ xrandr --prop
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 4096 x 4096
VGA1 disconnected 1680x1050+0+0 (normal left inverted right x axis y axis) 593mm x 371mm
  1680x1050 (0x43)  146.2MHz
        h: width  1680 start 1784 end 1960 total 2240 skew    0 clock   65.3KHz
        v: height 1050 start 1053 end 1059 total 1089           clock   60.0Hz

Any ideas?

share|improve this question
    
Please provide info from xorg.conf –  Andrew Bolster Sep 10 '10 at 22:31
    
For another alternative: superuser.com/questions/270608/… –  Wtower Dec 19 at 9:41

3 Answers 3

It sounds like you are using the vino server to share the desktop via VNC. Although I think you can change your /etc/X11/xorg.conf, or whatever the X config file is now, I have another suggestion. Leave the X config alone and create another session for your vnc.


Install vnc

$ sudo apt-get install vnc4server

Create vnc start and stop scripts

vnc.sh

#!/bin/sh

vncserver :12 -name "My-Server" -geometry 1600x1100

vnc-kill.sh

#!/bin/sh

vncserver -kill :12

12 is just an arbitrary display number. You will use this when you connect to the server. It can be any number except 0. That is what the vino server uses by default (I think). Don't forget to chmod +x the scripts.

Optional: Start vnc session on boot

Add the vnc.sh to your /etc/rc.local so that the session will start when the computer starts. sudo vi /etc/rc.local and add this to the end before the "exit 0"

su - YourUserName -c "/home/YourUserName/bin/vnc.sh"

I run the vnc server as a user here. I don't want the server to run under the root context. Replace the "YourUserName", of course. Alternatively, you do not need to put this here, you could ssh in and run the "vnc.sh" script manually. Your call.

Set your vnc password

(this is separate from the other vnc desktop password)

$ vncpasswd

Edit your vnc session file

$ vi ~/.vnc/xstartup

Comment out everything and put this at the end

gnome-session &

Test it

Run your vnc.sh script and connect from another computer.

vncviewer.exe -connect Server:12
share|improve this answer
2  
Thanks, it works great for a new desktop. However, I need to use an existing desktop with various open windows already there. Is there a way I can connect to the original display :0 with a different geometry? –  GJ. Sep 26 '10 at 18:43
    
... alternatively is there a way to move all windows in a single batch operation from the the main display to this new VNC display? –  GJ. Sep 26 '10 at 18:44
    
Although I have not tried it yet, I believe that you can use "x11vnc" in the place of the "vncserver" above, with a specific -geometry parameter. This should give you access to the :0 display. I looked for parameters to the gnome vino server, but could not find any. –  SuperJames Sep 27 '10 at 19:36

You could consider changing the resolution on the VNC server? I'm not sure of your setup but if the VNC server is on the virtualized machine you could check the vncserver instantiation point and change the -geometry flag there?

Alternatively, I would look at xorg.conf and add the mode you are looking for, since xrandr is saying its not availiable. This article covers the basics of xorg.conf editing

share|improve this answer

I'm able to change my vncserver resolution at will with the following command:

vncconfig -set randr=1552x1175 ; xrandr -s 1552x1175

( HT Matt D.)

share|improve this answer
    
What is vncconfig? You mean vnc4config? –  Wtower Dec 19 at 9:42
    
Suse calls it vncconfig. –  Ross Rogers Dec 19 at 16:45
    
Ah, right then :) –  Wtower Dec 20 at 11:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.