User Tools

Site Tools


unix:desktops:xfce:kodi

Use xfce4 for Kodi

I wanted a minimal install of xfce4 on an old NUC so I could run Kodi on it. This is an alternative to using the excellent LibreElec (a “just enough OS for Kodi” appliance), as I also wanted a web browser for YouTube and PBS.

Initial Install

To do this, I did a XFCE4 Minimal Install and added Firefox and Chrome. I also wanted remote control of the desktop via VNC, so I installed x11vnc, and also set the slim login manager to auto-login my user.

I don't need the latest and greatest of Kodi, so I'll use the package maintainers version on my distribution (Devuan in this case).

apt install -y kodi x11vnc

Set auto login

Now, edit /etc/slim.conf. Change auto_login to yes and default_user to the username you want automatically logged in (in this case, username acme). The focus_password stanza was left in for context; you do not change it.

# default user, leave blank to not pre-load the username.
default_user        acme
 
# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password      no
 
# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
auto_login          yes

Remote VNC Connection

If you want the ability to remotely log in to the desktop (not just kodi's web interface), x11vnc is a good package for that. NOTE: this will significantly affect video playback on lower end machines, but only while you are actually connected.

  1. Log into the user account kodi will be run as (the auto-login above, if you set that)
  2. Add a startup option
    1. Applications Menu
    2. Settings | Session and Startup
    3. Go to Applications Autostart tab
    4. Uncheck Screensaver, if desired. This does nothing for this kind of machine
    5. Click the Add button to add a new option
    6. Name: VNC Server
    7. Description: Local VNC Server for remote control
    8. Command: x11vnc -rfbport 5900 -display :0 -forever
    9. Trigger: on login (default)
    10. Click Ok
  3. restart the computer (to test)
  4. Make a vnc connection to the server on port 5900, ie
    /usr/bin/vncviewer kodi:5900

Name and Description can be whatever you want; I just put in some decent defaults.

You should connect to the server and see the UI. Again, Caution, when you have an active connection, there will be stuttering on video playback on older hardware.

Autostart Kodi

Autostarting kodi can be accomplished the same was as the x11vnc above. Just change the command to kodi

Importing configuration

See Replicate Kodi Instance for instructions for copying the configuration from an old installation to the new server.

Screen Resolution

If your output device is an older TV, there may be problems with screen resolution. Not just when in kodi, but when in the UI itself. Fixing this is a black art, but I have put some notes (not solutions) in Unix Desktop Quick Reference

Expansion

The only reason not to use LibreELEC is if you want your media player to be a multi function machine. In my case, I wanted to watch YouTube and PBS, both of which are problematic under Kodi.

I first installed a couple of web browsers. While Firefox seamlessly integrates with Linux, Chromium offers an alternative. I then created URL Links on my Desktop for the sites I frequented, allowing me to use the Minix Neo remote I integrated with Kodi. Turns out, the pointer works acceptably to start one of the links, and several of the keys work with the video playback, so I was happy.

unix/desktops/xfce/kodi.txt · Last modified: 2025/01/18 01:21 by rodolico