Install Kodi on Raspbian: An amazing multimedia experience

kodi
Spread the love

This tutorial will install Kodi on Raspbian operating system. So that you can launch Kodi while your machine is already booted up.

So let us start.

sudo rasps-config

Now you can expand your file system. If you have used NOOBS then it is not required.
 Now expand your GPU memory

Open Raspbian Start Menu -> Preferences -> Raspberry Pi Configuration ->Performance 

If you are using Raspberry Pi 3 – change this to 256 and reboot.
Let us update the repository first

sudo apt-get update

Now lets install kodi

sudo apt-get install kodi

Now let us create a desktop shortcut to run kodi

sudo nano /pi/local/bin/startkodi

Now paste this script in the file

#!/bin/bash
fbset_bin=`which fbset`
xset_bin=`which xset`
xrefresh_bin=`which xrefresh`
if [ ! -z $fbset_bin ]; then
DEPTH2=`$fbset_bin | head -3 | tail -1 | cut -d " " -f 10`
fi
kodi "$@"
if [ ! -z $fbset_bin ]; then
if [ "$DEPTH2" == "8" ]; then
DEPTH1=16
else
DEPTH1=8
fi
$fbset_bin -depth $DEPTH1 > /dev/null 2>&1
$fbset_bin -depth $DEPTH2 > /dev/null 2>&1
fi
if [ ! -z $xset_bin ] && [ ! -z $xrefresh_bin ]; then
if [ -z $DISPLAY ]; then
DISPLAY=":0"
fi
$xset_bin -display $DISPLAY -q > /dev/null 2>&1
if [ "$?" == "0" ]; then
$xrefresh_bin -display $DISPLAY > /dev/null 2>&1
fi
fi
VT="$(fgconsole)"
if [ "$VT" ]; then
sudo chvt 7
sudo chvt "$VT"
fi

Now make this file executable
 

For More Reading:
VNC Server on Raspberry PI
Share your files with Samba server

sudo chmod a+x /usr/local/bin/startkodi
Now let us go to desktop folder and make an icon over there
sudo nano ~/Desktop/KODI
Now paste the following script to run Kodi from desktop
[Desktop Entry]
Name=KODI
Comment=KODI MEDIA CENTER
Exec=/usr/local/bin/startkodi
Icon=/usr/share/kodi/media/icon256x256.png
Terminal=false
Type=Application
Categories=Sound;Video;
StartupNotify=true

So now you may run Kodi from your desktop and without a black screen when you exit Kodi.

For more reference please refer the video below.

Please share your valuable comments.

Leave a Reply