SLiM is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of GNOME or KDE and can help make a lighter system for users that like to use lightweight desktops like Xfce, Openbox, and Fluxbox.

If your environment is not listed here, refer to the appropriate wiki page.

PolicyKit

If you have problems with PolicyKit, use ConsoleKit's Template:Codeline by changing the login_cmd line of your /etc/slim.conf to:

login_cmd exec ck-launch-session /bin/bash -login ~/.xinitrc %session

and leave your ~/.xinitrc as plain as possible; for instance:

#!/bin/sh
exec startxfce4 # or the window manager of your choice

Autologin

To make SLiM automatically login as a specified user (without having to type a password) the following lines in /etc/slim.conf should be changed.

# default_user simone

Uncomment this line, and change "simone" to the user to be logged into automatically.

# auto_login no

Uncomment this line and change the 'no' to 'yes'. This enables the auto login feature.

Multiple environments

To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.

Put a case statement similar to this one in your Template:Filename file and edit the sessions variable in Template:Filename to match the names that trigger the case statement. You can choose the session at login time by pressing F1. Note that this feature is experimental.

SLiM init error with rc.d daemon

If you initialize SLiM with Template:Filename inside the DAEMONS array and it fails to initialize it's most likely a lock file issue. SLiM creates a lock file in Template:Filename on each initialization, however, in most cases the lock folder in /var does not exist preventing SLiM from initializing. Check to make sure Template:Filename exists, if it does not you can create it by typing the following:

# mkdir /var/lock/

Power-off error with Splashy

If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your Template:Filename and Template:Filename; set the DEFAULT_TTY=7 same as xserver_arguments vt07.

Power-off tray icon fails

If your power off tray icon fails, it could be due to not having root privileges. To start a tray icon with root privileges, be sure to have SLiM start the program. Edit Template:Filename as follows:

sessionstart_cmd /path/to/tray/icon/program &

Login information with SLiM

By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your Template:Filename as follows:

SLiM and Gnome Keyring

If you are using SLiM to launch a Gnome session and have trouble accessing your keyring, for example not being automatically authenticated on login, add the following lines to /etc/pam.d/slim (as discussed here).

As of GNOME 3, simply adding dbus-launch after ck-launch-session will work, without needing to edit /etc/pam.d/slim.

SLiM and Environment Variables

If you have trouble with environment variables changing after a session is started, one cause could be the module pam_env.so, by default, reads the file Template:Filename and sets up the environment accordingly.

For example: I use SLiM, which fires up a XFCE4 session upon valid authentication. When this is done my terminal(xfterm4) can't print Unicode characters(LC_* environment variables has been defaulted/altered to "POSIX"). But when I start XFCE4 manually, like so: Template:Codeline, Unicode characters on my terminal works fine.

Where <yourfile> is the name of the file you want PAM to recognize as your default environment file, when starting a new session from SLiM.

Setting DPI with SLiM

The Xorg server generally picks up the DPI but if it doesn't you can specify it to SLiM. If you set the DPI with the argument -dpi 96 in Template:Filename it will not work with SLiM. To fix this change your Template:Filename from:

xserver_arguments -nolisten tcp vt07

to

xserver_arguments -nolisten tcp vt07 -dpi 96

Use a random theme

Use the current_theme variable as a comma separated list to specify a set from which to choose. Selection is random.

Move the whole session to another VT

Lets say you have commented out tty terminals 3-6 as you may not use them. (You may use screen and therefore only need one terminal)
So, to move the X-Server you need to change one number in the /etc/slim.conf file. Just a few lines down you should see:

xserver_arguments -nolisten tcp vt07

Simply change the vt07 to lets say vt03 as there is no agetty started there.