Hi all, we've got an issue that I need help figuring out. We are
running some SLES 11 SP1 servers that run a service on startup that
opens an xterm window for interation on the server monitor.

The service runs as root and it calls a script that does an "su -
otheruser" and then calls another script that runs as the other user.
This last script is the one that actually contains the xterm commands.

When the service runs at startup, the xterm window will not open. We
can output the errors to a log file and the error say:
NO PROTOCOL SPECIFIED
XSET: UNABLE TO OPEN DISPLAY ":0.0"

If I open a console prompt and issue "xhost +" and then run SUDO
SERVICE servicename START, the service starts and opens the xterm window
perfectly. If I run "xhost -" and stop and restart the service, it
fails again.

So seems clear to me that I need to run the "xhost +" command prior to
starting the service but I have not been able to get this to work. I
tried adding the command in the /etc/init.d/xdm script but it didn't
work. I then created another script that does nothing but runs that
single command and set it up as a service to run between xdm and our
original service but that doesn't work either.

So my question is this: how do I automate the issuing of the "xhost +"
command. OR, is there something different I should be looking at? I
googled these errors and it led me off down rabbit trails chasing things
such as xauthentication and magic cookies which I don't fully
understand.

Thanks


--
jgosney
------------------------------------------------------------------------
jgosney's Profile: http://forums.novell.com/member.php?userid=1513
View this thread: http://forums.novell.com/showthread.php?t=449053