I typically use shell access on all my linux servers but sometimes I need to load X and use GNOME or KDE in either Ubuntu or Redhat/Fedora/Cent OS. The problem is that the vncserver file resides in different places depending upon the distribution you are using. I like to modify the vncserver file to increase the resolution of the virtual server to match my 20” monitor.
edit the global variable to tweak the vncserver resolution.
$geometry = "1280x1024";
Different variables to tweak how the vncserver daemon runs. Tweak the variable below to adjust the resolution.
Read the comments at the beginning of each distributions vncserver file for other settings and tweaks.
Want KDE or GNOME to load when your virtual terminal loads. Then you need to edit the .xstartup file for the user that the vncserver will run as.
For instance if you login to your linux box with “Fred” then you need to go to edit the xstartup file in the .vnc folder in your home directory. I like the joe editor but vi works also.
make sure this is at the end of the file for GNOME
exec gnome-session &
for KDE use the following
If you see
you will need to either remove it or comment it out.