Three options:

  1.  You could set the DISPLAY variable before Supervisor is started.
  2.  You could add environment=DISPLAY=:0 is the global section, and then 
supervisor add that to its own environment before forking the child processes.
  3.  You could add environment=DISPLAY=:0 in the [program:xxx] stanzas, where 
it affects only those program that need it.

Then your command= lines need only invoke xclock directly, because the DISPLAY 
environment variable would already be set.


Hope it helps, t

From: 
<[email protected]<mailto:[email protected]>>
 on behalf of Lennart Ramberg 
<[email protected]<mailto:[email protected]>>
Date: Sunday, September 20, 2015 at 12:22 PM
To: 
"[email protected]<mailto:[email protected]>"
 
<[email protected]<mailto:[email protected]>>
Subject: [Supervisor-users] Unable to launch my programs. Error: Can't open 
display

Hello,

I'm new here and I ask for help, please.

I experiment with Buildroot with Supervisord.
I am unable to start applications like, say, xclock with supervisord.
For now, I think I can do without a window manager (like twm or Fluxbox).

I let supervisord launch X using startx, so in supervisord.conf
   command=/usr/bin/startx

If my programs are in startx, they launch all right.
Also, with xterm in startx, I can launch my programs from there, say xclock, 
with
   DISPLAY=:0 xclock

But I want supervisord to handle my programs individually
so I tried, in supervisord.conf, (after startx) a bunch of variations of
   command="DISPLAY=:0 xclock"
   autostart=true
   autorestart=true
giving error 'Can't find command' in /var/log/supervisor/supervisord.log

Just
   command=xclock
   autostart=true
   autorestart=true
gives 'Error: Can't open display' in /var/log/supervisor/xclock-stderr--....log

What should that
   command=????
look like?

Thanks in advance
Lennart
_______________________________________________
Supervisor-users mailing list
[email protected]
https://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to