Preventing Menu from Automatically appearing on boot?
#1
Long story short:
I have my pi set up to automatically start a playlist that opens a stream, but the main menu appears until I push escape. How can I get the main menu to stay hidden on startup until it's needed?

Full Story:
I sold my boss on using the raspberry pi version of XBMC to make set up some infomation TVs. They're powered by the USB port on the TV and use the wireless network to connect to a PC that is live-streaming a windows 7 desktop. So far I've got everything working perfectly except for one thing: When the TV is turned on, XBMC loads, starts to show the stream, then the home menu appears covering up the video until I push escape on the keyboard (which I'd rather not have connected unless necessary) or use the remote app on my tablet.
I'd like to have it set up so all the end user has to do is turn on the TV and let xbmc load automatically into the stream without having to deal with the home menu. I've tried the kiosk mode and different skins, but none have done what I needed. I'm currently using the Confluence skin.
Reply
#2
Should be easy

I don't know the code to do it, but what you need is a keypress (the esc key) when the video starts.

There are topics on simulating keypresses. I'd build a script to simulate a keypress that runs in CRON.
CRON has a Reboot argument, meaning it will run a script upon reboot.

So you time how long from the time the video starts until the menu comes up, build a script that sleeps that many seconds (+1 or 2) and
then sends the keypress.
Reply
#3
Welcome to the XBMC forums, RocketSquid.

Instead of using the XBMC option to launch a playlist at startup, you can try creating an autoexec.py file in your userdata (wiki) directory with the following contents:
Code:
import xbmc
xbmc.executebuiltin( "PlayMedia(special://profile/playlists/video/your-playlist.m3u)" )
  • Adjust the path and name of your playlist file accordingly
  • Be sure to make autoexec.py executable
When you launch XBMC, the homepage appears briefly and then the autoexec.py will start playing your playlist in fullscreen mode in the foreground.
Reply
#4
Bug? I don't think it's supposed to do that.
Reply
#5
Thanks, artrafrael! That's helped out immensely. The only problem I'm having right now is that I'm not quite sure what "Make executable" means. I've been learning some python along the way but I'm still not up to speed.
Reply
#6
chmod +x on the python file to make it executable.
יונתן בן-חיים
Reply
#7
(2013-04-30, 18:10)RocketSquid Wrote: Thanks, artrafrael! That's helped out immensely. The only problem I'm having right now is that I'm not quite sure what "Make executable" means. I've been learning some python along the way but I'm still not up to speed.
Code:
chmod +x autoexec.py
Reply

Logout Mark Read Team Forum Stats Members Help
Preventing Menu from Automatically appearing on boot?0