I want to change the resolution / geometry of my VNC session dynamically without affecting the programs running inside it.
I referred: Changing the resolution of a VNC session in linux. I don't have root permission to update the newer vncserver version, so following command doesn't work as of now:
vncserver -geometry 1280x1024 -randr 1280x1024,1280x800
For now, whenever I want to change the screen size from one monitor to other, I kill the session and restart it with modified
-geometry option. Due to this I have to loose the programs inside it.
Is there any way to hack the file which stores the geometry and change the values for changing the resolution? I couldn't find such file. In my home folder, I see below files:
mgandhi@starbase:~/.vnc$ ll total 12 -rwxr-xr-x 1 mgandhi bc 334 Jun 25 10:32 xstartup -rw------- 1 mgandhi bc 8 Jun 25 10:32 passwd -rw-r--r-- 1 mgandhi bc 6 Jun 25 11:08 starbase.radisys.com:23.pid -rw-r--r-- 1 mgandhi bc 1664 Jun 25 11:08 starbase.radisys.com:23.log
The contents of
xstartup file doesn't help:
#!/bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & line remains constant for any resolution.
[Note: I see that
xrandr is installed in the linux machine.]