0

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

1

You are overriding VNCSERVERS variable. Doc in file says "The VNCSERVERS variable is a list of display:user pairs.".

You should use this form instead:

VNCSERVERS="2:abc 3:root"
VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERVERARGS[3]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.