In my rhel5 system there are cronjob scripts that are running as root which requires export DISPLAY
.
I have added below lines in /etc/sysconfig/vncservers
to start vncserver on certain displays for users.
VNCSERVERS="3:root"
VNCSERVERARGS[3]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERVERS="2:abc"
VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
but when I run /etc/ini.d/vncserver start
it only starts dispaly 2 for user abc