[mythtv-users] mirobridge and dbus-launch

Joey Morris rjmorris at nc.rr.com
Mon Nov 8 00:32:28 UTC 2010


I got Miro Bridge up and running last night, but I had to do something
a little different from what's described on the wiki page
(http://www.mythtv.org/wiki/MiroBridge) regarding dbus-launch. When I
first ran Miro Bridge under cron, it didn't work, and I got the
messages listed in the wiki. I tried the suggested cron command that
runs dbus-launch before running mirobridge and then kills the
dbus-daemon:

env dbus-launch sh -c 'trap "kill $DBUS_SESSION_BUS_PID" EXIT; /the path to mirobridge/mirobridge.py -V'  > "/tmp/mirobridge.log" 2>&1

This fixed the problem with mirobridge, but it didn't kill the
dbus-daemon. For some reason the DBUS_SESSION_BUS_PID variable was
undefined when the kill command executed. After some trial and error,
I used this command:

env dbus-launch sh -c '/usr/share/mythtv/imports/mirobridge/mirobridge.py -V; kill $DBUS_SESSION_BUS_PID' > /tmp/mirobridge.log 2>&1

Now mirobridge is running fine and the dbus-daemon is being killed. My
shell knowledge isn't that great, so I'm not sure why the first
command didn't work but this one did, but I thought I'd mention it in
case anyone else has problems with it. For the record, I also tried
using the --exit-with-session argument to dbus-launch, but this didn't
help:

dbus-launch --exit-with-session /usr/share/mythtv/imports/mirobridge/mirobridge.py -V > /tmp/mirobridge.log 2>&1

I'm on debian unstable with MythTV 0.23.1 (from debian-multimedia),
Miro 3.0.3, and Miro Bridge 0.5.8.


More information about the mythtv-users mailing list