[CentOS] VNCServer Startup Config

Thu Oct 2 00:59:43 UTC 2014
Emmett Culley <lst_manage at webengineer.com>

On 10/01/2014 02:17 PM, Igal @ getRailo.org wrote:
> hi all,
> 
> I've inherited a server with CentOS 6.4
> 
> the VNC Server starts up with the OS and its screen resolution is set to
> 800x600.
> 
> I found that I can set the resolution by specifying the -geometry
> switch, but I can't find where the call to start the vncserver is set in
> order to change it.
> 
> I know that it's not in /etc/xinetd.d  (the only file there is rsync)
> 
> here are the contents of  ~/.vnc/xstartup
> 
> #!/bin/sh
> 
> [ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
> export LANG
> export SYSFONT
> vncconfig -iconic &
> unset SESSION_MANAGER
> unset DBUS_SESSION_BUS_ADDRESS
> OS=`uname -s`
> if [ $OS = 'Linux' ]; then
>    case "$WINDOWMANAGER" in
>      *gnome*)
>        if [ -e /etc/SuSE-release ]; then
>          PATH=$PATH:/opt/gnome/bin
>          export PATH
>        fi
>        ;;
>    esac
> fi
> if [ -x /etc/X11/xinit/xinitrc ]; then
>    exec /etc/X11/xinit/xinitrc
> fi
> if [ -f /etc/X11/xinit/xinitrc ]; then
>    exec sh /etc/X11/xinit/xinitrc
> fi
> [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
> xsetroot -solid grey
> xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
> twm &
> 
> any thoughts?  TIA
> 
Look in /etc/sysconfig for vncservers.  That file contains vnc server startup definitions. Once you have modified /etc/sysconfig/vncservers you can start and stop your vnc server(s) using ]# service vncserver start.

To make it start automatically upon reboot, run ]# chkconfig vncserver on.

Emmett