How to install Kodi media player to Ubuntu 18.04 (Bionic Beaver) Desktop

Kodi Startup Logo

We recently wanted to install the Kodi media player software to a system running Ubuntu 18.04 desktop.  Here is the procedure we followed.  Not all of these steps are necessary, and we will tell you which ones are optional.

1. Optional – Install openssh-server and/or vino

If you install openssh-server you will be able to ssh into your system from another computer on your network (which gets you to a Linux command prompt, similar to running the Terminal program), and this will make things easier if you wish to do any of the installation steps from a different system. Similarly, vino allows you to use any VNC client to remotely access the desktop on your system. If you plan to do all the configuration directly on the Ubuntu desktop system then you do not need either of these. To install openssh-server do this:

sudo apt install openssh-server

If you want to install vino there is a two step process, and the second step must be done directly from the system running Ubuntu 18.04 desktop – you cannot do it through a ssh connection. The first step is probably only necessary if you did a minimal install of Ubuntu, but you can try it anyway just to make sure it’s installed:

sudo apt install vino

Then, to make it possible to connect from a remote client (particularly one running on a non-Linux system), open a Terminal window on the Ubuntu system and enter this:

gsettings set org.gnome.Vino require-encryption false

Note that “Vino” is capitalized in the above line – it won’t work if the V is lowercase. After doing this you should be able to set up Screen Sharing from the System Settings menu. If you aren’t familiar with that process, see this tutorial.

2. Optional – Set a static IP address

If this is going to be primarily a media center or home theater computer, you may want to be able to always find it at the same IP address on the network. If that is the case, consider giving it a static IP address. This is done by clicking on the Network icon in the upper right of the desktop and changing the settings associated with the correct network interface. If you are not familiar with this process, see this page but scroll down to the section headed “Ubuntu Desktop” – it’s where you will find the first screenshot on the page.

3. Optional – If you are using wired Ethernet, disable the Wi-Fi interface

While you are in the network settings, it’s a good idea to disable the Wi-Fi interface if you don’t plan on using it. If you try to connect to any type of streaming content, such as YouTube, you will generally have a far more reliable connection if only a wired connection is available.

4. Install Kodi

Now that we have the preliminaries out of the way, it is time to install Kodi. The process is quite simple and can be found at their page, HOW-TO:Install Kodi for Linux but it is so easy we can tell you how to do it here. Just open a terminal window or ssh session and enter the following. The first line is probably not needed, because the “software-properties-common” package appears to be already installed in Ubuntu, but just to be on the safe side you may want to run it anyway:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install kodi

5. Optional – If you run a backend system such as Tvheadend in order to use the Live TV and PVR features of Kodi, install the appropriate PVR client add-on. Instructions can be found on this page. If you don’t know what a backend system is, you can skip this step for now, but at some point you may want to read up on Tvheadend and how it is used with Kodi.

At this point you should find the icon for Kodi among your applications, and you should be able to launch it and control it with your keyboard. You will want to go through the settings and set it up the way you like. Also, if you installed a PVR add-on, you will need to configure and enable it. And, you may want to install some additional Kodi add-ons, which can be found on this page.

PLEASE NOTE: The add-ons at the above link are free and legal addons from the official Kodi site. We STRONGLY recommend that you DO NOT install add-ons from any other site. If an add-on has not been accepted into the official Kodi repository, there is a good chance it is illegal in many parts of the world, and that it could irreparably damage your Kodi installation or even your system. In the worst case, it may contain a virus or a “trojan horse” program designed to steal your personal information and passwords. There are a few benign Kodi add-ons from third-party sites, mostly ones still in the development stage where the author hopes to get them accepted into the official Kodi repository, but unless you are knowledgeable enough to figure out which add-ons can damage your system and which cannot, we’d recommending avoiding add-ons from third-party sites like the plague. If you have ever read any negative articles about “illegal Kodi boxes”, these are boxes that have been pre-loaded with illegal and often poor quality add-on software, that are usually sold at a highly inflated price and that contain apps that will stop working in a matter of days or weeks, at which point you find out the seller has left town never to be seen again. Kodi itself is a free and legal program, as are the add-ons that are found at the official Kodi site.

6. Optional – Make a Windows MCE compatible remote work correctly in Kodi

If you have a Windows Media Center Edition compatible remote attached to your system and you have its infrared receiver connected, you will probably find that some buttons (such as ENTER or OK) do not work in Kodi. In past versions of Ubuntu the simple solution was to install a program called LIRC, but the version of LIRC in the Ubuntu 18.04 repository is buggy and doesn’t work correctly. The fix for that is found in our previous article, Make LIRC work in Ubuntu 18.04, so that you can use your infrared remote in Kodi.

7. Optional, for users with Intel graphics only – Create a Xorg configuration for smoother video playback (this section added October 2, 2018):

We’ve been watching a thread on the Kodi forum called “v18 – Is there a guide to perfect playback in Ubuntu 18.04 Deskop using VAAPI graphics?” that you may want to read.  But the gist of it seems to be that starting in Ubuntu 18.04, by default the video driver used is not the best driver for use with Kodi.  As user “yasij” wrote:

…Xorg has been the default in every [Ubuntu] release except 17.10, which has Wayland.

In 16.10, Ubuntu switched to using the modesetting driver with glamor on Intel gen4 graphics and newer instead of xserver-xorg-video-intel.

But Kodi works best with the xserver-xorg-video-intel driver – Team-Kodi Developer “FernetMenta” wrote:

You really should create a xorg.conf that forces intel driver. Otherwise it would use modeset driver that causes stuttering on most hardware.

And in an earlier message he wrote:

Make sure you have TripleBuffer disabled in xorg.conf. This is enabled by default

If you don’t already have a Xorg configuration file, the easiest way to do this seems to be this:

sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp /usr/share/doc/xserver-xorg-video-intel/xorg.conf /etc/X11/xorg.conf.d/10-intel.conf

(Note there are only two lines above; if the second one wraps on your screen it’s still all one line.)

Then edit the 10-intel.conf file – this shows using nano, but feel free to use another text editor if you prefer:

sudo nano /etc/X11/xorg.conf.d/10-intel.conf

Right after the existing line Driver "intel" add this new line:

Option "TripleBuffer" "false"

Check to make sure you have not made any mistakes. At this point it should look something like this (the commented out line may or may not be present):

Section "Device"
        Identifier "Intel"
        Driver "intel"
        Option "TripleBuffer" "false"
#       Option "AccelMethod" "uxa"
EndSection

Press Ctrl-X to exit, and save the file.

It might be a good idea at this point to make sure you can ssh into your system, just in case your hardware is different and this change prevents the desktop from starting up.

Reboot the system, and after it comes back up you should hopefully find that video playback in Kodi is steadier.  If for any reason this change has caused problems, simply remove the new file:

sudo rm /etc/X11/xorg.conf.d/10-intel.conf

And reboot. Note that if your desktop won’t start up, you’ll need to do this in a ssh session or from a command prompt. If the desktop won’t start, it may mean you have incompatible hardware (are you certain you have Intel graphics?).

Also, if you are an AMD user, you may have to perform some additional steps – see at least the second post in this thread. At the very minimum, it appears you may need to use Kodi version 18 (Leia) and do this (again, this is for AMD users only):

AMD users that want to use kodi v18 with vaapi (Take care: v17 won’t work), you need to install mesa 18.0.1 or later. You can do this via Paulo’s ppa:

sudo add-apt-repository ppa:paulo-miguel-dias/pkppa
sudo apt-get update
sudo apt-get dist-upgrade

We are not AMD users, so you are kind of on your own with the instructions in that thread – good luck!

8. Optional – Install Gnome Tweaks

One other thing you may wish to do is install Gnome Tweaks if you have not done so already. Just go to the Ubuntu Software Center and search for “Gnome Tweaks” and install it, and you will have more control over how your desktop looks and operates. For example, if you want to remove the trashcan icon from the desktop, see this article. But a better use might be to turn off animations, which could slow down an underpowered system and which some users find annoying. You can turn off animations in the Gnome Tweaks Appearance tab.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.