I've setted up Rasp to start in Destktop mode and launch a video in loop mode. The script, called by:


is the seguent:

while true; do
if ps ax | grep -v grep | grep $SERVICE > /dev/null
    omxplayer -o hdmi /home/pi/movie.mov &

The problem is that, on each video loop, run also an instance of dbus-daemon

dbus-daemon --fork --print-address 5 --print-pid 6 --session

In this way Rasp could crash.

What can I do to resolve this problem? Why is there this behaviour?

  • there's "add comment" button if you want to ask for a clarification or just comment
    – lenik
    May 12, 2014 at 15:17
  • sorry I've just wrong button! May 12, 2014 at 15:50
  • no problem, mistakes are easy to make =)
    – lenik
    May 12, 2014 at 16:13

1 Answer 1


first, check how you call your loop script from /etc/rc.local, for example if your script is called omx-loop it should be called as omx-loop &, so the /etc/rc.local can continue execution until the end.

second, if it still does not work, try python solution (not mine):

#!/usr/bin/env python

import subprocess

while True :
    subprocess.call( [ 'omxplayer', '/home/pi/movie.mov' ] )

This definitely should not call any dbus-daemon, just don't forget to make it executable with chmod +x omx-loop.py.

Or there's more advanced "seamless" player in python available here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.