2

EDIT: Already posted in serverfault forum but no answers after 2 months so I try in stackoverflow... https://serverfault.com/questions/558300/realvnc-server-enterprise-5-0-how-to-manage-parameter-as-there-is-no-more-vncco

I just would like to know with new VNC version 5.0, how we can access and change the running parameters by command line ?

Indeed using RealVNC 4.x, it was possible using vncconfig, for example:

%> vncconfig -set RandR=1600x1200,1280x1024
%> vncconfig -get RandR
1600x1200,1280x1024
%> xrandr
SZ:    Pixels          Physical       Refresh
*0   1920 x 1200   ( 488mm x 305mm )  *0   
 1   1600 x 1200   ( 406mm x 305mm )   0   
 2   1280 x 1024   ( 325mm x 260mm )   0    

But since 5.0 there is no more vncconfig executable... as explained into ReleaseNote:

"5.0.0, released 7th June 2012 VNC Server no longer requires a separate vncconfig utility in order to permit configuration and operations such as file transfer and copy and paste text. "

But even if we can still change RandR parameter "manually" through graphic utility called "vncserverui" -> Options -> Expert -> RandR but it seems, there is no more possibility to change it through command line like it was in 4.x with vncconfig !?!

However I tried to use new executables like that but without any success :

%> vncserverui -set RandR=1024x768
VNC(R) Server 5.0.5 (r106461)
Built on Mar  4 2013 12:57:36
Copyright (C) 2002-2013 RealVNC Ltd.
This program is not intended to be run directly.
The server starts it as needed.

or

%> vncserver-virtuald RandR=1024x768
Unknown parameter: RandR=1024x768
VNC(R) Virtual Server Daemon 5.0.5 (r106461) 
Built on Mar  4 2013 12:57:39

So How can we do ?

Thanks, Cyril

Community
  • 1
  • 1
CyrilR
  • 41
  • 1
  • 6

1 Answers1

2

Well after months of errancy, I answer to myself... because I finally have solutions.

In fact, in v5.0 it seems there was no more possibility to manage VNC variables/parameters directly from command line :-(

But since RealVNC v5.1 there is an unofficial way to do that using "Xvnc -setconfig" in the following way:

echo RandR=1920x1200,1600x1200,1280x1024 | Xvnc -setconfig -

So for csh an interesting alias to resize session could be:

alias vnc-resize 'echo RandR=1920x1200,1600x1200,1280x1024 | Xvnc -setconfig -; xrandr; echo -n 
"Please enter the wanted resolution:"; xrandr -s $<'

Another way is to update "~/.vnc/config.d/Xvnc" file and then reload server:

 Xvnc -reload
CyrilR
  • 41
  • 1
  • 6