1. Home
  2. Linux
  3. Enable automatic login to kodi on linux

How To Enable Automatic Login To Kodi On Linux

Setting up a traditional Linux desktop environment to automatically launch Kodi is a lot better than using the special Kodi session that comes with the software. Enabling automatic login to Kodi has its benefits; for starters, you’re not stuck with just using Kodi. Want to browse the web? Simply minimize the media center and come back to it later.

Install XFCE4

If you’re looking to set up a media center computer with a traditional Linux distribution, you’ll need a desktop environment to start with. Generally, XFCE4 is a great choice as it’s lightweight, yet not too lightweight to the point where it has graphical issues.

Not using a Linux distribution with XFCE installed? You’ll need to manually install it and configure it. To do this, open up a terminal window and enter the commands that correspond with your Linux distribution.


Ubuntu has several spins, including an XFCE one. For the best experience, it’s best to install the meta package for Xubuntu. This will convert a normal Ubuntu installation into a Xubuntu one.

sudo apt install xubuntu-desktop

Installing the Xubuntu desktop meta package will no doubt take awhile as there are many programs and configuration files to grab. Please be patient.

Not interested in using Xubuntu? Don’t worry, if you prefer a vanilla XFCE setup for your Kodi PC, try out this installation command instead:

sudo apt install xfce4*

Running this command will install all available XFCE4 packages in the Ubuntu repo without the need to specify every package.


Debian chooses XFCE4 as one of its main desktop environments for ISO releases, so there’s a good chance you may already be using it. However, if your Debian Kodi setup is using another desktop environment, you’ll need to manually install XFCE4. Do this in the package manager with apt.

sudo apt install xfce4*

Arch Linux

Arch users can quickly install the XFCE4 desktop environment by getting the XFCE4 meta package.

sudo pacman -S xfce4


If you’re building a Fedora-powered Kodi PC, it’s a good idea to grab the Fedora XFCE4 spin as a starting point. If not, use this command to install a complete environment on Fedora Linux.

sudo dnf install @xfce-desktop-environment


OpenSUSE mainly lets users go with Gnome Shell or KDE 5, so the chances that XFCE4 is installed aren’t great. As a result, you’ll need to get it manually. Open up a terminal and use the Zypper package manager to get it working.

sudo zypper -n in patterns-openSUSE-xfce

Other Linuxes

XFCE4 is one of the most popular lightweight desktop environments in all of Linux. There shouldn’t be any trouble finding it on even the most obscure of Linux distributions. To install it, just search “XFCE4” in the package manager. Alternatively, check out the official website to learn how to get it.

Autostarting Kodi

The first step in automatically starting Kodi is logging into your new XFCE4 installation. Click “log out” in your current desktop environment to go to the login screen. On the login screen, look for “session,”  and click on it. Under the sessions menu, look for “XFCE,” “XFCE4,” “Xubuntu,” etc.

Now that the new session is selected, click on your username and login. If the XFCE4 desktop environment was installed on your Linux PC correctly, you’ll be able to use XFCE4.

Inside XFCE, look for “settings” and open it. Inside the settings area, find “Sessions and Startup” and select it.

The Sessions and Startup area allows users to modify what programs automatically launch when the XFCE desktop starts. To ensure that Kodi does this when the PC is logged in, select the “Application Autostart” tab in the Sessions and Startup area.

To add Kodi as a startup entry for XFCE, click the “Add” button. Clicking “Add” brings up a blank “Add application” window. In this window, fill out “Kodi” under the name section, “Kodi Autostart” under description, and “kodi” in the command area. When everything looks good, select “OK” to add it.

Restart your Linux PC. Next time you log into XFCE4 Kodi will launch right away!

Other Desktop Environments

If you’re not a fan of XFCE4 but still want to set up your Linux PC to automatically start Kodi, there’s a way. It starts off by opening up a terminal window. In the terminal, use the CD command to move to /usr/share/applications.

cd /usr/share/applications

From here, use the mkdir command to create the autostart directory.

Note: if you already have an autostart folder the command will fail.

mkdir ~/.config/autostart

Next, use the ls command to find the Kodi Media Center shortcut filename.

ls | grep kodi

Running ls with grep should reveal the name of the Kodi desktop shortcut. To finish up, copy this file to your ~/.config/autostart folder.

cp kodi.desktop ~/.config/autostart

1 Comment

  1. Thanks very much for the tips on how to autostart Kodi – very useful! However, could you please elaborate on this part of your tips, which I don’t understand (not quoted verbally, so I’m using ):

    My confusion arises, because ~/.config/autostart creates a directory in the Home folder (~), not in the folder /usr/share/applications. So, the reason for cd /usr/share/applications is presumably only to locate the Kodi desktop shortcut, not to actually create an autostart folder as a sub-folder from there?

Leave a Reply

Your email address will not be published. Required fields are marked *

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