3

I have looked through through parts of the code, and the places obvious to me, but I have not found the place that I can add legal geometries for a vncserver that I can set using xrandr.

I have tried editing the vncserver script, but Xvnc takes only 1 geometry, more just confuse it.

Something must change it, because I have a larger menu than I used to.

Here is what I get:

$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1680 x 1050, maximum 2400 x 1500
default connected 1680x1050+0+0 0mm x 0mm
   1920x1200      60.0  
   1920x1080      60.0  
   1600x1200      60.0  
   1680x1050      60.0* 
   1400x1050      60.0  
   1360x768       60.0  
   1280x1024      60.0  
   1280x960       60.0  
   1280x800       60.0  
   1280x720       60.0  
   1024x768       60.0  
   800x600        60.0  
   640x480        60.0  
   2400x1500      60.0  

When I try to set a geometry not in the list, I get:

$ xrandr -s 1600x1000
Size 1600x1000 not found in available modes

Any hints on setting a mode that is not in the list?

I am running the X session in a Vnc window (I guess I already said that.)

running CENTOS06 with Xvnc:

Xvnc TigerVNC 1.1.0 - built Oct 30 2014 12:46:27
Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11500000, The X.Org Foundation
Anthon
  • 78,313
  • 42
  • 165
  • 222
ElderDelp
  • 333
  • 2
  • 7
  • 1
    Welcome to U&L. As you write it, it sounds like you looked for a place on stackexchange where you could put your geometries ;-) . In general we try to leave out comment like "I googled all day", thanks, etc that don't contribute to understanding the question (that you looked at the source code however *is* useful info) – Anthon Apr 02 '16 at 19:43
  • Thank you for the greeting and the gracious correction and edit. – ElderDelp Apr 02 '16 at 23:04

1 Answers1

0

The answer to the question of:

When I try to set a geometry not in the list, I get:

$ xrandr -s 1600x1000
Size 1600x1000 not found in available modes

Any hints on setting a mode that is not in the list?

The command I found: gtf it works nicely. It provides the proper settings to feed to xrandr in the script below. It takes three calls to xrandr:

--newmode
--addmode
--output

The script below shows the sequence that will set up a new geometry.

width=1600
height=1000

declare -a mdline=( $(gtf ${ip[0]} ${ip[1]} 60 | grep Modeline) )
mdname=$(echo ${mdline[1]} | sed -e 's/"//' -e 's/_.*//')
xrandr --newmode ${mdname} ${mdline[@]:2}
xrandr --addmode VNC-0 ${mdname}
xrandr --output VNC-0  --mode ${mdname}

the command gtf:

gtf - calculate VESA GTF mode lines

is called like this:

gtf h-resolution v-resolution refresh [-v|--verbose] [-f|--fbmode] [-x|--xorgmode]
ElderDelp
  • 333
  • 2
  • 7