Posts Tagged ‘digital signage’

Xibo and MythTV

April 14th, 2010

W’e've got a new room at work for our older students which has a TV mounted on the wall for Digital Signage.

What we wanted to do was provide a live/recorded TV function for breaks and lunchtime and then an easy way to switch over to our Digital Signage solution (Xibo) at other times.

It turned out to be reasonably simple.

First we installed and configured a new MythBuntu frontend (we already had the myth backend server running from a different project). I then installed the Xibo Python client (1.1.0a21) and made a small modification to the code to allow it to exit by remote control button press (our Media Centre remote sends a backspace character when you press the back button):

if e.scancode == 22:
    log.flush()
    self.parent.downloader.running = False
    self.parent.downloader.collect()
    self.parent.scheduler.running = False
    self.parent.scheduler.collect()

    log.log(5,"info",_("Blocking waiting for Scheduler"))
    self.parent.scheduler.join()
    log.log(5,"info",_("Blocking waiting for DownloadManager"))
    self.parent.downloader.join()
    log.log(5,"info",_("Blocking waiting for Player"))
    self.player.stop()
    os._exit(0)

That block was added after line 2852 appropriately indented of course :D

It’s then a simple enough job to add a Xibo button to the MythTV menu.

As your mythfrontend user (ie the user that automatically logs in to Mythbuntu on boot), do the following:

mkdir ~/.mythtv
cp /usr/share/mythtv/themes/defaultmenu/mainmenu.xml ~/.mythtv

You then edit ~/.mythtv/mainmenu.xml and add in a block like this:

<button>
    <type>SETTINGS_VIDEO</type>
    <text>Xibo Digital Signage</text>
    <action>EXEC /opt/xibo/pyclient/client/python/run.sh</action>
</button>

Then restart mythfrontend. You should have a new icon on the menu system that launches Xibo. Once Xibo is running, the client should quit when you press the back button on your remote control and drop you back in to MythTV.

Here’s a short video to show the system in action!