How to Install and Setup SLiM on Debian 9

The full form of SLiM is Simple Login Manager. It is a very lightweight login manager for Linux. It is very customizable and very easy to configure. The SLiM login manager also has many themes. The themes are very attractive and with a little bit of research you can even create your own SLiM themes.

The SLiM project is discontinued at the time of this writing. The last version of SLiM was released on 2013 according to Arch Wiki.

In this article, I will show you how to install and setup SLiM on Debian 9 Stretch. Let’s get started.

Installing SLiM:

SLiM is available in the official package repository of Debian 9 Stretch. So it is very easy to install.

First update the APT package repository cache with the following command:

$ sudo apt update

The APT package repository cache should be updated.

Now install SLiM on your Debian 9 Stretch machine with the following command:

Now select <OK> and then press <Enter>.

Most probably you will have other login managers such as GDM, KDM or LightDM installed. But you can’t have multiple login manager enabled. So you must disable the one you’re using and enable SLiM. Just select slim and select <OK> and then press <Enter> as marked in the screenshot below to enable SLiM and disable other login managers, in my case it’s LightDM.

SLiM login manager should be installed.

Now reboot your computer with the following command:

$ sudo reboot

Once your computer boots, you should see SLiM login manager. Now type in your username and press <Enter>.

Now type in your password and press <Enter>.

You should be logged in to your desktop environment as you can see from the screenshot below.

Configuration Files of SLiM:

The SLiM configuration file is /etc/slim.conf

You can add or remove options in the /etc/slim.conf file to configure SLiM login manager the way you like. I will talk about some of the options later in this article.

Installing SLiM Themes:

The default SLiM theme on Debian 9 Stretch is not that fancy or good looking. The good news is you can install new SLiM themes.

To install a new Slim theme, just download the theme and put the theme directory in the /usr/share/slim/themes directory. That’s it. Very simple.

After searching for a while, I found a GitHub repository adi1090x/slim_themes of SLiM themes. In this section, I will show you how to install all the SLiM themes from adi1090x/slim_themes GitHub repository.

First, install Git with the following command:

$ sudo apt install git

Now press y and then press <Enter>.

Git should be installed.

Now navigate to your ~/Downloads directory:

$ cd ~/Downloads

Now clone the adi1090x/slim_themes GitHub repository with the following command:

$ git clone

It should be cloned.

Now navigate to the slim_themes/ directory with the following command:

$ cd slim_themes

As you can see, there’s a themes/ directory and inside of that directory there are many subdirectories. Each of these subdirectories represent a SLiM theme. The name of the theme is the same as the name of the subdirectory.

You can install all the themes or install the one you like. To preview a theme before applying it, you can run the following command:


Let’s say you want to preview the overlay theme, run the following command from the slim_themes/ directory:

$ slim -p themes/overlay

As you can see, the overlay theme is being previewed.

Now to install only the overlay theme, run the following command from the slim_themes/ directory:

$ sudo cp -Rv themes/overlay /usr/share/slim/themes

overlay theme should be installed.

To install all the themes, run the following command from the slim_themes/ directory:

$ sudo cp -Rfv themes /usr/share/slim

All the themes should be installed as you can see from the screenshot below.

Now to activate the theme that you like, let’s say the overlay theme, open the /etc/slim.conf configuration file with the following command:

$ sudo nano /etc/slim.conf

Now find the following line that starts with current_theme and as you can see that debian-softwaves is the currently active theme.

Change debian-softwaves to overlay and save the file.

NOTE: You can put a comma separated list of themes here as well. If you do that, then a random theme will be selected each time your computer boots.

Now reboot your computer with the following command:

$ sudo reboot

When your computer boots, the new SLiM theme should show up as you can see from the screenshot below.

Making Your Own SLiM Themes:

The SLiM themes are easy to make as well. If you’re good at graphics, you can easily create a new SLiM theme by looking at how other SLiM themes are made.

A SLiM theme have only 3 files:

  1. jpg – It is a JPEG image indicating the background of the SLiM login manager.
  2. jpg – It is a JPEG image indicating the login panel of the SLiM login manager.
  3. theme – It is the text based configuration file. In here you specify the mapping of where the panel.jpg will be placed on the background.jpg, positions of where the username and password field and login button is on the panel.jpg image.

An example configuration file slim.theme of SLiM login manager theme:

Common SLiM Configuration Options:

In this section, I am going to talk about some of the common SLiM configuration options. The options can be changed in the /etc/slim.conf file to change the behavior of SLiM.

hidecursor – It can be either true or false. By default, the mouse cursor is hidden in the SLiM login window. To enable mouse cursor, set hidecursor to false.

default_user – By default, you have to type in your username every time you log in. To have a default username set, uncomment this option and set your default username.

focus_password – If default_user is set, then setting focus_password to yes will focus on the password field.

auto_login – If set to yes, then you will be logged in as the default_user, you won’t have to type in a password. For this to work, the default_user must be set.

Happy SLiMing and thanks for reading this article.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.