- 论坛徽章:
- 0
|
我这儿有一个应用运行在SOLARIS8或SOLARIS9上,应用运行前要以root用户登陆SUN服务器,使用#xhost + & 命令启动xhost,执行后用#xhost查看当前状态为:“access control disabled, clients can connect from any host”,这样就可以了。但是运行xhost + 命令的root用户不能退出(而且是必须是在本机登陆执行才有效),否则再用#xhost 命令查看当前状态时,系统显示:“access control enabled, only authorized clients can connect”,为什么呢?
为了使机器在每次重新启动时不需要以root登陆,就能自动执行xhost + 命令,我在/etc/rc2.d中加入了一个S99xhost可执行shell,内容仅一行:“su - root -c /usr/X/bin/xhost + &”,(不加“&”也是一样),机器重启后,从本机以root登陆后,用#xhost查看当前状态为:“access control enabled, only authorized clients can connect”,为什么呢?
这个问题实在头疼,好长时间了也未解决,哪位老兄帮助测试解决一下,OK? |
|