Official Debian packages

Debian provides multiple Kodi packages:

# apt search --names-only kodi

kodi/stable 2:19.1+dfsg2-2+deb11u1 amd64
  Open Source Home Theatre (executable binaries)

kodi-addons-dev/stable 2:19.1+dfsg2-2+deb11u1 amd64
  Open Source Home Theatre (addon development package)

kodi-addons-dev-common/stable,stable 2:19.1+dfsg2-2+deb11u1 all
  Open Source Home Theatre (architecture-independent addon development package)
...

Installing the base package with apt:

# sudo apt install kodi

This usually also installs kodi-repository-kodi, which allows access to the official Kodi add-on repository.

Once installed, Kodi can be started manually like this:

# kodi

Window systems

Kodi supports different windowing systems:

x11 seems to be the most feature rich at present. You can select which one to use on the command line:

# kodi --windowing=<system>

Starting Kodi using a display manager

You can start Kodi from the command line or from the Start menu. Alternatively you can start a Kodi session from a display manager. There are multiple display managers available in Debian. For an overview please see the related article here.

Usually a display manager offers a menu where you can select the session you want to run. You should find Kodi in the list. It will launch a standalone session.

Automatic start of a Kodi session from a display manager

You can configure your display manager to automatically launch a Kodi session as well. We'll use LightDM as an example. For a LightDM introduction please see here.

To enable the automatic login of your user and the subsequent start of the Kodi session, you can update the LightDM configuration as follows:

[Seat:*]
user-session=kodi
autologin-user=<put your username here>

Note: If you want to make LightDM your default display manager, please see the LightDM article linked above. It shows how to do that.

Let's say LightDM is your default display manager and your default boot target is graphical. Then when you start up your computer, LightDM will run and it will automatically login your user into a Kodi session.

Starting/stopping the display manager and Kodi with your remote control

If you prefer to not start the display manager during boot automatically, but instead want to start Kodi (via the display manager) manually later, you can reconfigure the default boot target.

To check your current default boot target:

# systemctl get-default
graphical.target

To change your default boot target to multi-user (command line prompt):

# sudo systemctl set-default multi-user.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /lib/systemd/system/multi-user.target.

Likely you don't want to call

# sudo systemctl start display-manager

from your keyboard to start your display manager. If you have a remote configured via Lirc, you can configure irexec to launch your display manager.

irexec example configuration (/etc/lirc/irexec.lircrc):

begin
    prog   = irexec
    button = KEY_WAKEUP
    config = /usr/local/bin/display-manager-toggle.sh
end

The script (/usr/local/bin/display-manager-toggle.sh):

SYSCTL=/usr/bin/systemctl
CHVT=/usr/bin/chvt
SERV=display-manager.service

DISPLAY_MANAGER=$($SYSCTL is-active $SERV)

case "$DISPLAY_MANAGER" in
  active)
    $SYSCTL stop $SERV
    # switch back to tty1
    $CHVT 1
    ;;
  inactive)
    $SYSCTL start $SERV
    ;;
  *)
    echo "No idea what is happening."
    ;;
esac

Don't forget to make it executable.

Running the script will result in the display manager being started or stopped, depending on its current state (started or stopped). And with irexec running in the background, once the Wakeup key is pressed on the remote control, it will call this script and either start the display manager and then Kodi, or stop Kodi and the display manager.

Building Kodi from source

/!\ Kodi is available in jessie-backports, so it is better to install it from there. This page may be updated to describe the building and installation of newer versions of Kodi.

This page describes how to build Kodi 15 (Isengard) for Debian jessie (amd64, may work for i386 too).

Install packages for building

sudo apt-get install git build-essential equivs

Download Isengard sources

git clone -b Isengard git://github.com/xbmc/xbmc.git

Install build dependecies

First create a text file control with the following content:

Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: kodi-15-build-deps
Depends: autoconf, automake, autopoint, autotools-dev, cmake, curl, default-jre, gawk, gperf, libao-dev, libasound2-dev, libass-dev (>= 0.9.8), libavahi-client-dev, libavahi-common-dev, libbluetooth-dev, libbluray-dev (>= 0.7.0), libboost-dev, libboost-thread-dev, libbz2-dev, libcap-dev, libcdio-dev, libcec-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev, libcwiid-dev, libdbus-1-dev, libfontconfig-dev, libfreetype6-dev, libfribidi-dev, libgif-dev (>= 4.1.6), libgl1-mesa-dev | libgl-dev, libglew-dev, libglu1-mesa-dev | libglu-dev, libiso9660-dev, libjasper-dev, libjpeg-dev, libltdl-dev, liblzo2-dev, libmicrohttpd-dev, libmodplug-dev, libmpcdec-dev, libmpeg2-4-dev, libmysqlclient-dev, libnfs-dev, libogg-dev, libpcre3-dev, libplist-dev, libpng12-dev | libpng-dev, libpulse-dev, librtmp-dev,libsdl2-dev, libsmbclient-dev, libsqlite3-dev, libssh-dev, libssl-dev, libswscale-dev, libtag1-dev (>= 1.8), libtiff-dev, libtinyxml-dev (>= 2.6.2), libtool, libudev-dev, libusb-dev, libva-dev, libvdpau-dev, libvorbis-dev, libxinerama-dev, libxml2-dev, libxmu-dev, libxrandr-dev, libxslt1-dev, libxt-dev, libyajl-dev (>=2.0), lsb-release, nasm, python-dev, python-imaging, python-support, swig, unzip, uuid-dev, yasm, zip, zlib1g-dev
Description: List of packages that are used to build Kodi.
 List of packages that are used to build Kodi.

Then create and install a package that will automatically install all Kodi build dependencies:

equivs-build control
sudo gdebi kodi-15-build-deps_1.0_all.deb

You can remove kodi-15-build-deps after you built Kodi and then run sudo apt-get autoremove to remove all installed build dependencies.

Configure sources

cd xbmc
./bootstrap
./configure --prefix=$HOME/local/

--prefix=$HOME/local/ instructs the installation program to install Kodi into local subdirectory of your home directory.

Compile

make -j4

-j4 starts 4 parallel compilation processes (the more processes, the faster is the compilation). For a dual core set it to 2.

Install Kodi

make install

Kodi will be installed in the directory specified during the configuration (See Configure sources)

Run Kodi

If Kodi was installed into $HOME/local/ you can run it with the following command:

$HOME/local/bin/kodi

Linux build guide

https://github.com/xbmc/xbmc/blob/master/docs/README.Linux.md


CategorySoftware CategorySound CategoryVideo