How to add multiple extra geometry's when starting vncserver

1,151 views
Skip to first unread message

Bo Langgaard Lind

unread,
Sep 16, 2020, 7:56:22 AM9/16/20
to TigerVNC User Discussion/Support
Stock, tigervnc supports a list of common resolutions, maxing out at 1920x1200.

I wish to add multiple resolutions, let's say 2560x1600 and 3840x2160. I've tried with:

-geometry 2560x1600 -geometry 3840x2160

as suggested elsewhere, but only the last geometry option is honored.

Is there a good way to add resolutions to the stock list? System-wide is fine.

Thanks in advance!

DRC

unread,
Sep 16, 2020, 9:56:09 AM9/16/20
to tigervn...@googlegroups.com

In a TigerVNC session:

1. Use cvt to generate a new modeline (in this case, for 3840 x 2160 x 60 Hz-- you can always specify 60 Hz with VNC):

   $ cvt 3840 2160 60
   # 3840x2160 59.98 Hz (CVT 8.29M9) hsync: 134.18 kHz; pclk: 712.75 MHz
Modeline "3840x2160_60.00"  712.75  3840 4160 4576 5312  2160 2163 2168 2237 -hsync +vsync

2. Create a new mode with that modeline.

   $ xrandr --newmode "3840x2160"  712.75  3840 4160 4576 5312  2160 2163 2168 2237 -hsync +vsync

3. Add the new mode.

   $ xrandr --addmode VNC-0 3840x2160

4. Verify that the new mode was added.

   $ xrandr
   Screen 0: minimum 32 x 32, current 1024 x 768, maximum 32768 x 32768
   VNC-0 connected 1024x768+0+0 0mm x 0mm

      1024x768      60.00*+

      1920x1200     60.00 

      1920x1080     60.00 

      1600x1200     60.00 

      1680x1050     60.00 

      1400x1050     60.00 

      1360x768      60.00 

      1280x1024     60.00 

      1280x960      60.00 

      1280x800      60.00 

      1280x720      60.00 

      800x600       60.00 

      640x480       60.00 

      3840x2160     59.98 

5. Select the new mode.

   $ xrandr -s 3840x2160
   $ xrandr
   Screen 0: minimum 32 x 32, current 3840 x 2160, maximum 32768 x 32768
   VNC-0 connected 3840x2160+0+0 0mm x 0mm
      1024x768      60.00 +
      1920x1200     60.00 
      1920x1080     60.00 
      1600x1200     60.00 
      1680x1050     60.00 
      1400x1050     60.00 
      1360x768      60.00 
      1280x1024     60.00 
      1280x960      60.00 
      1280x800      60.00 
      1280x720      60.00 
      800x600       60.00 
      640x480       60.00 
      3840x2160     59.98*

--
You received this message because you are subscribed to the Google Groups "TigerVNC User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tigervnc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tigervnc-users/6549b1c0-4592-4b42-97d9-18cef1b72fa6n%40googlegroups.com.

Bo Langgaard Lind

unread,
Sep 16, 2020, 11:31:48 PM9/16/20
to TigerVNC User Discussion/Support
Thank you, I had been down that path before, but didn't realize one had to run the --newmode, then also --addmode.

This is on a system that servers multiple users, sometimes even multiple VNC sessions per user. I'm seeing some issues with the "VNC-0" part of the addmode command. Is that specific to a VNC session? If so, how do I dig out this information?

DRC

unread,
Sep 18, 2020, 12:44:54 AM9/18/20
to tigervn...@googlegroups.com

Yes, VNC-0 is the name of the virtual display for the first virtual screen.  If there are multiple Xinerama screens, then you might also have VNC-1.  Those display names are VNC-specific.  (TurboVNC also uses the same convention.)

Reply all
Reply to author
Forward
0 new messages