If you followed the instructions in my previous post about starting Firefox from inside XBMC you’ll probably have realised by now that with Launcher you have to navigate through the ‘Programs’ main menu etc etc to find the shortcut.
Ideally, I wanted it in my XBMC main menu – using the beautiful Aeon skin. I got it set up so it launched from the menu as per the picture below:
Background wallpaper pinched from Geekpedia (see footnote for link)
If you’d like to know how I did it just follow the steps below.
Please note that this is a ‘quick and dirty’ method, as you’re editing an existing menu item (in this case, ‘ASSISTANT’):
- To change the text on the main menu, open ‘~/.xbmc/skin/Aeon/language/English/strings.xml’.
On a Mac this is in ‘/userfolder/library/Application Support/XBMC/skin/Aeon/language/English/strings.xml’)
- Find the ‘ASSISTANT’ entry which looks like
and change it to
- Make a note of the string id (in this case ‘31021’)
- Open ‘~/.xbmc/userdata/favourites.xml’ and locate the Launcher shortcut you created for Firefox. It should look something like ‘plugin://programs/Launcher/?Firefox’
- Now we need to change what happens when you click the link in the menu to the shortcut to Firefox (above), and this is dictated by ‘~/.xbmc/skin/Aeon/720p/Includes_MainMenu.xml’
Find the entry in the file that refers to the string id you modified in strings.xml file (in our case, ‘31021’). It should look something like this:
- You’ll need to change the ‘onclick’ entry to use the shortcut from your ‘favourites/xml’ file:
- Save the ‘Includes_MainMenu.xml’ file and your modified shortcut should fire up Firefox and return to XBMC when closed
Remember, if you want to change the backdrop for your new shortcut, change the ‘ASSISTANT’ entry as you modified the behaviour of that menu entry. These menu hacks are limited to entries you don’t use, but if I find a way of creating new menu items I’ll be sure to post here.
Footnote: I pinched the ‘Internet’ menu background image from Geekpedia. I found it by searching for ‘Firefox’ in Google images, set to ‘Large’
One essential thing I wanted to be able to do with my HTPC is surf the web. The front-end that I am running, XBMC, doesn’t have any kind of built-in browser as it was originally built on the meagre XBox hardware, so it’d be best to go back to the Ubuntu 9.10 OS to start Firefox. To do this I’d have to suffer the almighty indignity of closing the XBMC application and having to restart it after I’d finished browsing.
Obviously this wasn’t a particularly elegant solution.
So after a little digging around I found the ‘launcher‘ plugin via the XBMC forums. Follow the instructions below to launch Firefox from XBMC. When you close Firefox, XBMC returns to the main menu automatically:
- Install the Launcher plugin by copying the folder in the .zip file to the plugins folder of XBMC (in Ubuntu it’s located in ‘/home/username/.xbmc/programs/plugins’).
- Run this command in a terminal (I have absolutely no idea what it does but it’s in the installation instructions):
sudo ln -sf /usr/lib/libcurl.so.4 /usr/lib/libcurl.so
- Then I had to create a symlink for Firefox to my home folder (as inexplicably Launcher couldn’t see higher than that level). I did this by typing:
sudo ln -sf /usr/bin/firefox /home/mark/Documents/Firefox
Note: There were actually two entries: ‘Firefox’ and ‘Firefox 3.5’. To find out which one is used by the OS, type ‘
which Firefox‘ at the terminal and you can get the path to your application here.
To run the launcher plugin you need to use a skin that has the ‘Programs’ menu option on the menu. I changed from Aeon, my normal skin, to Confluence to do this next bit.
- On your XBMC, go to ‘Programs’ – ‘Program Plugins’ – ‘Launcher’. I hit ‘c’ on my keyboard to get the context menu and went to ‘Add new launcher’ – ‘Standalone (normal PC executable)’.
Here’s where Launcher presented me with only 2 options, ‘Home Folder’ or ‘Profile Folder’. As I’d already created a symlink to Firefox in my Documents folder I navigated to it and clicked ‘OK’.
Before closing Launcher I right-clicked the ‘Firefox’ entry I just created, added it to my favourites and also downloaded a nice big icon for it (using ‘Get Thumb’), all through the context menu (you have to select ‘Get Thumb’ first otherwise your icon won’t show).
- Once this is done (and still using the Confluence skin), I went back to the main menu and chose the little icon in the bottom left-hand corner of the screen that looks like a list. Firefox popped up and sure enough it worked.
*note* if Firefox is starting ‘behind’ XBMC, ensure you haven’t already got an instance (of Firefox) running.
The next step was to make Firefox launch from the main menu, with the Aeon skin.
At the moment with Boxee’s beta, there’s no option or download for the latest version of Ubuntu (9.10). The below was pinched online somewhere, but I lost the link!.
You can still install it on your 9.10 Karmic using its Jaunty repository; deb http://apt.boxee.tv jaunty main – copy and paste in your /etc/apt/sources.list (System -> Administration -> Software Sources).
Grab and install these 3 dependencies
before installing with sudo apt-get install boxee – from the command-line. This is enough to get Boxee up and running roughly – whilst waiting for the official repository for Ubuntu Karmic.
So far my experience with getting XBMC in Ubuntu 9.10 hasn’t been too painful. Everything is set up quite nicely and I just decided to tackle the last piece of the puzzle to enable full girlfriend compatibility: the remote control.
I had an old MCE remote control left over from an old HTPC system I had, along with IR receiver so I thought I’d try to use that. I think it’s an aftermarket MCE copy remote – looks nearly exactly the same bar the missing Microsoft logo at the bottom (see other remotes here).
This is what I did, with significant help from this post on the XBMC forums:
‘lirc‘ (Linux Infrared Remote Control) is the software Linux uses to recognise commands from your IR control/remote. To install it I opened a terminal window and typed:
sudo apt-get install lirc
The configuration takes place in the terminal window. Unfortunately I hadn’t a clue what I was doing and skipped the configuration. I restarted it by opening a terminal window and typing:
sudo dpkg-reconfigure lirc
The first screen will be for remotes, I chose
“Windows Media Center Transceivers/Remotes (all)”
For Receivers I chose
“Microsoft Windows Media Center V2 (usb) : Direct TV Receiver”
Don’t worry about the Direct TV part, it just references the mceusb2 driver that you need.
To check what configuration you have type
lsmod | grep lirc*
The first time I did it nothing was output, so I knew something was amiss (I reran the configuration as above)
Install the USB receiver
When I plugged in the USB receiver, the red light came on, but how did I know it worked? First, I tested the remote AND the receiver on my Windows 7 box. The Media Center interface started up correctly so I knew the batteries were good and everything was OK. After some Googling I discovered this command:
This lists the connected USB devices. I could see
Bus 004 Device 002: ID 0471:0815 Philips eHome Infrared Receiver
so I knew the receiver was working OK.
After that, a reboot and quick test in XBMC confirmed everything was working. Stoked.
Next job is to get the HTPC suspending (sleeping) and resuming (waking up) using the MCE remote control only.