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

ivcode
  • 1,062
  • 1
  • 9
  • 13

1 Answers1

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"
LatinSuD
  • 901
  • 1
  • 8
  • 17