[Discuss] runlevel 5 service cannot connect to display

Rich Pieri richard.pieri at gmail.com
Wed Jan 30 19:33:43 EST 2013


On Wed, 30 Jan 2013 13:37:08 -0800
William Chan <wichan at adobe.com> wrote:

> Actually, the service is just a JMS consumer, it doesn't require UI.
> When it receive a message, it calls an external application which
> needs X11. There is actually nothing shows on display.

It's still not a service. Rather, it may be a Java service but it isn't
a system service. It's a bit like... imagine a web server (your JMS
consumer) that pushes web pages into a browser (the X11 server) and
won't start if the browser won't let you talk to it or isn't running
or some such. You can't have system services dependent on non-system
applications and expect them to work reliably. Or, realistically, at
all.

Regarding Jerry's workaround, I'd use VNC to create a private X11
server for the application instead of mucking around with X client
files and worrying about which process owns what.

I maintain that the best solution is to refactor the JMS consumer as a
proper service. Make the X11 client depend on it rather than have the
consumer depend on the X11 client. It's backwards the way you've
implemented it. The two workarounds don't fix that.

-- 
Rich P.



More information about the Discuss mailing list