XBMC Boxee UI Switcher

I bind this script to a button on my LIRC remote to easily switch between XBMC and Boxee on my HTPC. XBMC’s interface using the Rapier skin and fanart is much more attractive, but Boxee offers great social network integration (read: Youtube).

#/bin/bash
# Switch between XBMC and Boxee
if ps ax | grep -v grep | grep xbmc.bin > /dev/null
then
	echo "XBMC running, killing process"
	kill `pidof xbmc.bin`
	sleep 7
	echo "running Boxee"
	/usr/bin/runBoxee &
elif ps ax | grep -v grep | grep Boxee > /dev/null
then
	echo "Boxee running, killing process"
	kill `pidof Boxee`
	sleep 7
	echo "running XBMC"
	/usr/bin/runXBMC &
else
	echo "No UI running, starting XBMC"
	/usr/bin/runXBMC &
fi

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>