How to install Kodi on Ubuntu Server 14.04

I have a small Shuttle Barbebone computer which I’m mainly using as a KVM hypervisor on top of Ubuntu Server 14.04 to run a few VMs. Since the Barebone also sports a HDMI port and the CPU comes with an integrated Intel HD GPU I thought it would be a great Kodi (ex XBMC) mediacenter as well. However, I’ve been unable to find a working walk-through on how to install it on Ubuntu Server. Most likely because nobody ever does this on a server OS. Anyway, here’s how to install the latest Kodi release on Ubuntu Server 14.04 including hardware acceleration for the Intel HD GPU.

apt-get install python-software-properties pkg-config software-properties-common
add-apt-repository ppa:team-xbmc/unstable
apt-get update
apt-get install kodi xinit xserver-xorg-video-intel
adduser --disabled-password --disabled-login --gecos "" kodi

You could also use ppa:team-xbmc/xbmc-nightly for bleeding edge releases.

usermod -a -G audio kodi
usermod -a -G video kodi
usermod -a -G input kodi
usermod -a -G dialout kodi
usermod -a -G plugdev kodi
usermod -a -G tty kodi

Edit /etc/X11/Xwrapper.config and replace allowed_users=console with allowed_users=anybody

Create a /etc/init/kodi.conf with following contents:

# kodi-upstart
# starts Kodi on startup by using xinit.
# by default runs as kodi, to change edit below.
env USER=kodi
 
description     "Kodi-barebones-upstart-script"
author          "Matt Filetto"
 
start on (filesystem and stopped udevtrigger)
stop on runlevel [016]
 
# tell upstart to respawn the process if abnormal exit
respawn
 
script
  exec su -c "xinit /usr/bin/kodi --standalone -- -nocursor :0" $USER
end script

(Upstart script from http://kodi.wiki/view/HOW-TO:Autostart_XBMC_for_Linux)

Now you should be ready to start Kodi using service kodi start

If you’re having any problems to start Kodi, have a look at the log files in /home/kodi/.kodi/temp.

18 thoughts on “How to install Kodi on Ubuntu Server 14.04

  1. I know this is not exactly on the topic…. but..
    I want to run VirtualBox on my ubuntu 14.04LTS headless server with Windows 7 as a guest. Now the application I need to run on Windows guest requires 3d graphic acceleration(kodi). VirtualBox has an option to allow VM to use graphic card from the host for simple 3d acceleration but since I run ubuntu server without graphic drivers this option is not available (grayed out) in VirtualBox.

    I thought maybe by installing xserver (apt-get install xinit xserver-xorg-video-intel) it will be possible for VirtualBox to access graaphic card.

    I have sucessfully installed xinit and xserver-xorg-video-intel but I have no idea how to make VirtualBox use it to gain this access.

    Any ideas ?

    Thx in advance.

  2. After following the tutorial when I do “service kodi start” this is what I am getting. Any thoughts?

    start: Rejected send message, 1 matched rules; type=”method_call”, sender=”:1.29″ (uid=1000 pid=14278 comm=”start kodi “) interface=”com.ubuntu.Upstart0_6.Job” member=”Start” error name=”(unset)” requested_reply=”0″ destination=”com.ubuntu.Upstart” (uid=0 pid=1 comm=”/sbin/init”)

  3. Hello,

    root@xyz:~# usermod -a -G input kodi
    usermod: group ‘input’ does not exist

    What could be the reason for this info ?
    The group “input” belongs to what ?

  4. Hi Jan !
    it doesn’t work for me on my odroid c1.
    I’ve the last image installed from april 2015, but kodi screen doesn’t appear.

    my /etc/init/kodi.conf is :
    # kodi-upstart
    # starts Kodi on startup by using xinit.
    # by default runs as kodi, to change edit below.
    env USER=odroid

    description “Kodi-barebones-upstart-script”
    author “Matt Filetto”

    start on (filesystem and stopped udevtrigger)
    stop on runlevel [016]

    # tell upstart to respawn the process if abnormal exit
    respawn

    script
    exec su -c “xinit /usr/local/bin/kodi –standalone — -nocursor :0” $USER
    end script

    and when I look at the process :
    root@odroid:~# ps -ef|grep kodi
    root 466 1 0 01:00 ? 00:00:00 su -c xinit /usr/local/bin/kodi –standalone — -nocursor :0 odroid
    odroid 479 466 0 01:00 ? 00:00:00 xinit /usr/local/bin/kodi –standalone — -nocursor :0
    odroid 689 479 0 01:00 ? 00:00:00 /bin/sh /usr/local/bin/kodi –standalone
    odroid 691 689 43 01:00 ? 00:04:33 /usr/local/lib/kodi/kodi.bin –standalone
    root 1795 1771 0 01:10 pts/0 00:00:00 grep –color=auto kodi

    when I start manually via the Ubuntu menu :
    root@odroid:~# ps -ef |grep kodi
    odroid 1846 1132 0 01:08 ? 00:00:00 /bin/sh /usr/local/bin/kodi
    odroid 1848 1846 51 01:08 ? 00:00:11 /usr/local/lib/kodi/kodi.bin
    root 1887 1626 0 01:08 pts/1 00:00:00 grep –color=auto kodi
    –> so we see that kodi is started by “odroid” user (that’s why I set en USER=odroid in the kodi.conf)

    what is wrong ???

    regards

    • Yes, you need to change a policy file and then you get all sorts of new entries like exit, reboot, restart and so on. You should be able to find the required changes on Google or on my Kodi & Odroid-C1 post here on this very site.

      Cheers,
      Jan

  5. Thanks Jan,
    it works.
    But if I try to shut down the Kodi Server (the button on the bottom left), the Kodi Server restart manually. Is this a bug?

    Regards
    Chris

  6. Hi, I follow your your tutorial too, but I can not find any files in the home directory. I have an ubuntu 14.04 LTS without a desktop and I tried to change the guisettings.xml to configure remote access, but I can’t find it…
    Thanks for your reply

    • If you’re using the Ubuntu 14.04.1 server image to create a pristine installation and use my instructions the Kodi config files will be in /home/kodi/.kodi after Kodi started up successfully for the 1st time. As I said in my post, check for errors in the log files if Kodi doesn’t start.

      Cheers,
      Jan

  7. These are the only steps required to install Kodi on a freshly installed 14.04 server with Intel HD 4000 graphics. However, I don’t really understand what you mean by “sepearte installations”.

    Cheers,
    Jan

  8. Hi, if i follow your tutorial i will not need to create a separate database? i currently struggle a lot to install a xbmc server and do not want separate installations or whathever, thanks for your reply

Comments are closed.