I changed my /etc/conf.d/irexec to fit my settings: IREXEC_OPTS and IREXEC_USER(not root) and when I press buttons to start some application, nothing happens. I removed --daemon options from /etc/init.d/irexec for watching what's wrong. When I press buttons i can see something like this in terminal: Execing command "xdtv" This is xdtv 2.2.0 running on Linux/i686 (2.6.24-gentoo-r8). Error: Can't open display: Execing command "gnomeradio" (gnomeradio:5590): Gtk-WARNING **: cannot open display: Execing command "audacious" audacious: cannot open display: Try `audacious --help' for more information. When I start irexec as a regular user it works perfectly. Reproducible: Always Steps to Reproduce: 1.Just start /etc/init.d/irexec start
This is an ugly bug. irexec works fine when invoked in a terminal. When invoked as a service using "/etc/init.d/irexec start" it insists on using the environment that was used when the system was booted. In my case that is a framebuffer. The environment has a bunch of framebuffer related scripts. irexec tries to run the application (mythfrontend in my case) in that environment. It crashes so hard even the emergency CTL-ALT-SYSRQ-b can not reboot. In the .lircrc file I use: begin remote = DVICO_MCE button = dtv prog = irexec repeat = 0 config = export DISPLAY=:0.1; mythfrontend end This allows me to start mythfrontend on my secondary display connected to a big HDTV. It works fine when irexec is started from a terminal on my computer monitor (DISPLAY=:0.0). It fails when irexec is started with "/etc/init.d/irexec start" As a test I tried" config = export DISPLAY=:0.1; printenv >/home/wmichaels1/log 2>&1 "printenv" worked normally. The exported "DISPLAY=:0.1" was not listed in the log file created. Instead it was "DISPLAY=:0.0" with a bunch of framebuffer functions in the environment. Something is doing a wholesale replacement of the environment just before running printenv.
(In reply to comment #1) Please disregard the above comment #1 as it is about a different bug (#283340). Although the start-stop-daemon sets the IREXEC_USER user id as specified, it may not set the IREXEC_USER environment when starting irexec with the /etc/init.d/irexec script. A couple of suggestions for your problem: 1) It may be possible to add some arguments to xdtv so it can find the display. (I know nothing about xdtv, but mythfrontend has a -display argument.) 2) Consider writing a script that is started by a command in the .lircrc file. This script can export "DISPLAY=:0.0" and any other variables that are expected by xdtv. 3) The fix in bug #283340 may solve your problem.
Try to reproduce it with new version, because this one in masked