# Launching apps from XBMCbuntu Eden

I just replaced an old Ubuntu install with the fresh live CD carrying XBMC. It has now been named XBMCbuntu, noting its inheritance a bit more than earlier. While running XBMCbuntu has its benefits with a pre-made nicely working setup of XBMC, it lacks direct access to applications like a web browser and for instance Spotify. One can boot up the LXDE desktop environment when logging in instead of starting XBMC in full screen, but that is kind of tedious if one wants the default behaviour to be a full screen home theatre PC.

Luckily there is an add-on called Advanced Launcher that you’ll find under “System > Settings > Add-Ons > Get more” in XBMC, but even though this includes a Chromium launcher by default, it fails to launch anything properly. Chromium is for instance launched without the maximize and close buttons, and on my first attempt, the URL bar was even gone. The reason is simple; when launching a command using the Advanced Launcher, it has not yet opened a window manager such as Openbox, which I believe is default in LXDE. The solution for me was found in this blog post, over at Setup Guides, where James Cole suggests adding a script that launches openbox before launching Chromium. And kills Openbox when Chromium is closed.

However, the solution proposed there works only for Chromium and you’ll have to set up a similar script for all applications you’d like to launch from XBMC. That isn’t too much work, but I figured one could make the script from Setup Guides a bit more general, taking the application to launch as an argument instead.

So the setup goes as follows:

2. Create a script with the following contents and save it somewhere in your home folder (to make it easily accesible from XBMC)
#!/bin/bash
openbox &
$1 killall -9 openbox  3. Start the Advanced Launcher add-on 4. Right click (or press C on the keyboard) and select “Create New Launcher” 5. Select your script as the executable 6. Type the command you want to run as the argument. This could for instance be “chromium-browser” or “spotify” 7. Enjoy your new launcher! To launch Spotify you’ll of course have to install that first. To do so, you might add a launcher to lxterm and follow the instructions on Spotify’s webpages. Thanks to James @ Setup Guides for posting the original script. ## 15 thoughts on “Launching apps from XBMCbuntu Eden” 1. Great work, thanks for the linkback. I’ll point my future guides involving adding custom launchers to this post. 1. Thanks to you too. I don’t know if I’d thought OpenBox was the problem if I hadn’t seen your post. I tried adding a comment on your post by the way, but it seems it got lost somehow. Maybe OpenID and Blogger don’t play too well together after all… Anyways, keep up the good work! I’m impressed at the amount of guides you have made available. 2. Keith says: Hi, Thanks for the tip. Mine seems to work fine but Chromium is still about an inch larger than my screen. Any ideas? Thanks 1. I think Chromium accepts the command line option -start-maximized which might help you out. If it is still larger than your screen it might be because of oversampling. Is it a TV-screen? Reducing oversampling is usually done through the TV’s own menus or perhaps in the display settings in XFCE. 3. Gubben Noa says: Takk for guiden. Jeg oppgraderte fra XBMC-live til XBMCbuntu, og dette var en av tingene som ikke funket. Det ser ut som den gamle installasjonen brukte fluxbox, så da behøver jeg bare å bytte ut fluxbox med openbox i scriptene. Oppgradering funket faktisk overraskende bra. Bootet fra XBMCbuntu-CD og valgte installer, og oppgrader ubuntu. Nesten alle innstillinger ble beholdt. Trengte bare å sette fast ip og dns, så var alt oppe og gikk. Mediebiblioteket var på plass som før. 4. guigouz says: Nice one, you could use$* instead of \$1 to allow more parameters on the command line

5. varazir says:

I just get the mouse X icon and it goes back to XBMC.
Is there a way I can test it to see the error msg ?

1. varazir says:

Nvm , forgot to install openbox, now I just need some fine tuning 🙂

6. T-One says:

Do you have sound in chrome (flash)? i don’t have any, same for spotify with this starting method.

1. varazir says:

I recommend spotimc to play spotify
I reinstalled my system an haven’t tested this setup any more after that

1. Hi,

I’m afraid openbox will decorate all windows with tile bars with this method. I don’t know how to avoid that, but perhaps you can search for possibilities to customize openbox?

7. jeff says:

Is this still working for people using Kodibuntu Helix?

I tried this in the default Kodi session, but the apps seem to be launched behind the GUI. I played around with Chromium being launched… I could only see Chromium by telling Advanced Launcher to be windowed, but it wouldn’t give up the focus. Chromium was behind the smaller Kodi GUI.

Thanks!