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:

  1. Install XBMC and the Advanced Launcher add-on
  2. Create a script with the following contents and save it somewhere in your home folder (to make it easily accesible from XBMC)
    openbox &
    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.

Published by

Svenn-Arne Dragly

I'm a physicist and programmer, writing about the stuff I figure out as I go.

15 thoughts on “Launching apps from XBMCbuntu Eden”

    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.

    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.

  1. 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.

  2. 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.


Leave a Reply