I am having trouble getting omxplayer to automatically play a video after a small delay after powerup, AND be able to use the keyboard controls.

I am adding the omxplayer command to the /etc/rc.local to play a video immediately after boot, but none of the keyboard inputs will work.

I think it has to do with the /etc/rc.local not having "scope" or something to the terminal. I tried calling the omxplayer command from lxterminal -e but this never seems to start the playback.

Any suggestions?


1 Answer 1


This is linked to Auto-login into LXDE and auto-start video-player (omxplayer) which gives the answer:

lxterminal -e "omxplayer -b --loop --no-osd /home/pi/Videos/MyVideoFile.mp4"

This has always worked well on Jessie, but I get what you describe when I try this on Stretch. The solution appears to be adding the -l (login shell option)

lxterminal -l -e "omxplayer -b --loop --no-osd /home/pi/Videos/MyVideoFile.mp4"

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.