SLiM

SLiM (Simple Login Manager) is a desktop-independent graphical login manager for X11. Being fast and having only a few dependencies, it is a popular choice amongst users of lightweight window managers.

= Installation = You can install SLiM using the following command:

Additional themes can also be installed:

To make SLiM start automatically after boot, set the DISPLAYMANAGER in /etc/conf.d/xdm to slim:

You will also need to add xdm to the default runlevel:

= Configuration = Most global configuration is done in /etc/slim.conf

Default configuration - no default session
By default, SLiM is configured to make all sessions in /etc/X11/Sessions/ accessible -- you can cycle through them by pressing the key. This behavior is acquired by setting the options below:

When no other changes are made, users will need to press while logging-in to select the desired session. In following sections there are described several methods of setting one session as the default one.

Setting a global default session
You can set a default session for all users of the computer, by setting the XSESSION variable. To do this, create and edit file /etc/env.d/90xsession

After saving the file run env-update:

Setting a default session for one user
Besides (or instead of) setting a global default session, you can let every user choose his default session.

There are three approaches - you can either:
 * use the SLiM session script (/usr/share/slim/Xsession) to trigger session script from /etc/X11/Sessions/
 * use the SLiM session script to trigger user-created session script
 * force users to take care of setting everything by themselves

The first and second possibilities are generally preferred. However, if - for any reason - you do not want to set any defaults, you may choose the third approach.

Per-user default session using bundled session files
The simplest way to set a default session for one user is to make a symbolic link from the session file to ~/.xsession

An alternative is to put session command in the ~/.xsession file:

You will only need to make sure the file is executable:

Per-user default session using the customized ~/.xsession file
Sometimes you need to customize the launcher script - e.g. to run other programs before starting the window manager or to start WM with a customized command.. The method above does not allow such modifications, but it can be achieved by using default session script (instead of the one provided by window manager) and launching WM through the ~/.xsession file.

To run your sessions this way, make sure you have no global default session set (or set it to XSESSION="custom" in /etc/env.d/90xsession like described above). Then edit your ~/.xsession file, putting your WM launcher at the end.

The file may look e.g. like this:

You may also look at the WM session files in /etc/X11/Sessions/ to find "how things are done".

Finally, remember to make sure the file is executable:

Per-user default session without using any default session files
If you do not like any defaults from /usr/share/slim/Xsession and /etc/X11/Sessions/Xsession, you can let your users set everything by themselves. It is generally not a good idea, but sometimes you may need it.

Start by editing /etc/slim.conf in the following way

In the sessions line you may put the names of window managers you are planning to use.

Then create and edit ~/.xinitrc file, which may look as below:

Finally make sure the file is executable:

Theme selection
Theme selection is done by changing the following line:

You can easily find what themes are available on your system:

NumLock state on login
The NumLock key can be turned on or off by default:

= See Also = SLiM Homepage Enabling consolekit and policykit