Posts: 3
Joined: Sat Sep 15, 2012 2:01 am

XBMC on Raspbian How-to

Sat Sep 15, 2012 8:48 pm

Building XBMC
Follow the directions at This build will take several hours.

Fixing Console After Exiting
After running XBMC for the first time, you will notice after exiting, you are left with a black console screen. To fix it we need to add a call to fbset after XBMC. Lets create a simple script to run XBMC:

Code: Select all

sudo pico /usr/bin/xbmc-rpi
Place the following into it:

Code: Select all

sudo /usr/lib/xbmc/xbmc.bin
fbset -depth 16 -xres 1360 -yres 768
exit 0
Then make the script executable:

Code: Select all

sudo chmod +x /usr/bin/xbmc-rpi
Now we can launch XBMC and when it exits, we have a functioning console.

Auto Starting XBMC on boot
To start XBMC on boot without having to login first, we simply need to modify /etc/rc.local:

Code: Select all

sudo pico /etc/rc.local
Add the following line to it before exit 0:

Code: Select all

And reboot

Code: Select all

sudo reboot
Now XBMC will launch automatically without having to login. When you exit XBMC you will be at a console login.

Posts: 24
Joined: Thu Jan 03, 2013 2:42 pm

Re: XBMC on Raspbian How-to

Fri Oct 04, 2013 4:11 pm

hi, thanks for your script to prevent blank screen after xbmc exit but I had to change your line script 4

Code: Select all

fbset -depth 16 -xres 1360 -yres 768

Code: Select all

fbset -depth 8 && fbset -depth 16
to fix issue.

Posts: 2
Joined: Fri Oct 04, 2013 9:51 am

Re: XBMC on Raspbian How-to

Sat Oct 05, 2013 5:30 pm

Nice attempt but it did not work for me in Xbian. I'm still looking for a good solution that will not force me to change OS. Mainwhile, I should just enjoy the black screen on exit :mrgreen:

Posts: 2
Joined: Fri Oct 04, 2013 9:51 am

Re: XBMC on Raspbian How-to

Mon Oct 07, 2013 5:14 am

I just figured out a solution in my case. Starting from xbmc main menu, go system > settings > input devices > Peripherals. Then chose the one you are using in the list. I have one called CEC Adapter. Go in that and change 'device to power off when stopping xbmc' to none if you do not wish exiting xbmc turns your TV to standby mode which is what troubled me. Also untoggle 'send inactive source when stopping xbmc' just to make going back to desktop a little smoother. This way after exiting xbmc I still got to a blackscreen, but with TV staying active. I can press

ctrl + alt + F2

This sends you back to command line screen and you will see it asks you for login and password. Ignore it and press

ctrl + alt + F7

You should find yourself back on Desktop again.

I did this with the solution provided in the beginning of the thread. Then I removed the xbmc-rpi file, even rebooted. Did it my way again and it still worked. So I comfirmed that the script in this thread did not help my case. If you find exit of xbmc shuts your TV and put your in blackscreen, try the key combinations I suggested. Good luck!

Posts: 37
Joined: Fri Feb 22, 2013 6:59 am

Re: XBMC on Raspbian How-to

Mon Oct 07, 2013 2:03 pm


thank you very much,,,

now the only problem is i cant airplay from my ipad3,,,(i can airplay if i using Raspbmc)

Posts: 2
Joined: Wed Aug 28, 2013 3:37 pm

Re: XBMC on Raspbian How-to

Wed Oct 09, 2013 5:07 pm

In my experience it's easier to change RaspBMC into Raspbian than change Raspbian into RaspBMC.

RaspBMC has the APT system installed and

Code: Select all

sudo apt-get install xfce4 tightvncserver synaptic
will give you a workable system containing the latest version of XBMC, tvheadend etc. and

Code: Select all

vncserver :1 -name xfce4 -geometry 1280x720 -depth 16 -pixelformat rgb 565
enables you to vnc to it from another machine to give you headless control. You can substitute LXMD for XFCE4 if you prefer; I haven't tried it but it should work.

When I tried the reverse process I found XBMC in the repositories to be broken (I had to import it from elsewhere) and tvheadend wasn't there at all (I had to compile it from scratch). In addition, RaspBMC always has a very up-to-the-minute version of these - for better or worse - and the performance is much better.

Posts: 1
Joined: Wed May 07, 2014 9:45 am

Re: XBMC on Raspbian How-to

Wed May 07, 2014 10:03 am


First I want to say "Thank you for your HowTo"!

I am a complete newbie in the raspberry pi/xbmc world and I am just making my first steps.
Instead of compiling xbmc for my own I used the the prebuild version from Michael Gorven from the link you've posted.

Regarding the "black screen / no console after xbmc exit" issue:
I don't know if this is generic, but with my prebuild version of xbmc I have in addition to "/usr/bin/xbmc" the start-script "/usr/bin/xbmc-standalone" which already consideres the fbset problem/solution.
It reads the current fbset config before it starts xbmc and set it again after you exit xbmc.
With this script there is no need to create your own start script.

So, if you also have this xbmc-standalone startscript, the solution could be simply "use it" :-)

Posts: 1
Joined: Sat Feb 28, 2015 5:16 pm

Re: XBMC on Raspbian How-to

Sat Feb 28, 2015 6:46 pm

Thank you brainbug! That's a brilliantly simple solution. Worked for me using the Kodi "flavoured" XBMC (i.e. newer builds, specifically "Helix").

I had to use "/usr/bin/kodi-standalone" instead of "/usr/bin/xbmc-standalone"

Posts: 23421
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: XBMC on Raspbian How-to

Sat Feb 28, 2015 7:04 pm

aegisk wrote:Thank you brainbug! That's a brilliantly simple solution. Worked for me using the Kodi "flavoured" XBMC (i.e. newer builds, specifically "Helix").

I had to use "/usr/bin/kodi-standalone" instead of "/usr/bin/xbmc-standalone"
There is an updated how to encompassing the RPi2 B ... 66&t=99866
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

Posts: 9
Joined: Thu Oct 31, 2013 12:40 pm

Re: XBMC on Raspbian How-to

Tue Mar 17, 2015 3:11 pm

For me the he black screen when exiting xbmc/kodi wasn't fixed by creating that script. The only solution that worked for me was to change to a different tty and then back the main one again. So I did CTRL+ALT+F2 then I do CTRL+ALT+F1 then I am back at the prompt

Edit: just noticed Brainbugs solution and just tested running kodi-standalone and sure enough when I exit this it take me back to the prompt fine. Curious how does kodi-standalone differ from kodi?

Posts: 10
Joined: Sun Sep 27, 2015 8:22 pm

Re: XBMC on Raspbian How-to

Tue Oct 27, 2015 6:42 pm

Thank you. Althogh I have Kodi from official repository this worked for me. I only added the following lines at the end of my kodi-standalone script in /usr/bin/kodi-standalone

Code: Select all

fbset -depth 16 -xres 1360 -yres 768
exit 0

Return to “Media centres”