Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the vncserver default geometry?

I'm using Ubuntu 12.04 (I think it's desktop...) and running vncserver to connect to it remotely. I can successfully set the resolution if I use the -geometry flag when starting the server, but I want this to be the default so I don't have to include the flag on the command line. The vncserver man page suggests to use the $HOME/.vnc/xstartup file so I made the following change:

#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-terminal-emulator -geometry 1400x850 -ls -title "$VNCDESKTOP Desktop" &

As you can see I tried to make the default '1400x850', a resolution which worked just fine when supplied by the command line. I've even tried setting this resolution in some other files which were the solutions on other OS's, but that didn't work either. I'm also curious about whether it has something to do with my X configuration

This should be a fairly straightforward thing, what is going wrong here?

like image 404
s g Avatar asked Oct 21 '14 15:10

s g


People also ask

What is the default VNC port?

The actual system port on which VNC server is listening for connections is obtained by adding a VNC base port (default: port 5900) and a VNC X-display number (24 in above case).

How do I change VNC?

Go to VPS Management Page, click on "VNC Password". To change your VNC Password, enter your new password and again retype the same new password for confirmation and then click on "Change VNC Password". Your VNC Password will be changed successfully.

Where are VNC settings stored?

/etc/vnc. conf is the site wide configuration file for tigervncserver(1), the free X server for Virtual Network Computing (VNC). It can be used to change the behavior of the server at startup time, although for all values suitable defaults are preset.


1 Answers

I needed to make a $HOME/.vncrc file with this entry: $geometry = "1400x850";

Details can be found in the documentation here (note that this is not what the man page suggested):

/usr/share/doc/vnc4server/examples/vnc.conf.gz

like image 88
s g Avatar answered Sep 23 '22 21:09

s g