在我的rhel5系统中有以root身份运行的cronjob脚本,需要export DISPLAY 。
我在/etc/sysconfig/vncservers添加了以下/etc/sysconfig/vncservers行,在用户的某些显示器上启动vncserver。
VNCSERVERS="3:root" VNCSERVERARGS[3]="-geometry 800x600 -nolisten tcp -nohttpd -localhost" VNCSERVERS="2:abc" VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
但是当我运行/etc/ini.d/vncserver start它只会开始显示2用户abc
您正在覆盖VNCSERVERSvariables。 文件中的文件显示“ VNCSERVERSvariables是显示:用户对的列表 ”。
你应该使用这个forms,而不是:
VNCSERVERS="2:abc 3:root" VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost" VNCSERVERARGS[3]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"