SLiM

Simple Log-in Manager (SLiM), is a lightweight log-in manager common for use with window managers, such as Fluxbox. SLiM also works great with standard desktop environments such as Xfce, KDE or Gnome.

Version
This document uses following software versions
 * version 1.3.2-r6

Installation
To install SLiM simply:

If you would like, Gentoo also has a SLiM Themes package:

Start on boot
Now you need to have XDM start on boot:

And then make SLiM your display manager in :

Preparing for multiple sessions
Now SLiM will start on boot and login to your default session. As of version 1.3.2, SLiM is configured to provide support for multiple sessions out of the box for any session scripts found in. At the login screen, press to cycle through the available sessions. Included in these options is the 'Xsession' script, which will explicitly run your user's own. SLiM also honors the value of the XSESSION environment variable, as per the Gentoo X Server Configuration HOWTO.

To use SLiM in this way, make sure the following lines are preserved in :

If your window manager hasn't added an entry already, add a script to with the name of your WM. For example:

And make sure to make it executable: chmod +x /etc/X11/Sessions/wmii

If you are running more than one desktop environment, and would like to have more control over your sessions, try one of the following variants. If you prefer the old method of session management, take a look at the old variants.

Variant A: Per-user default session
Set your to either include the command of the session you want to run, or to be a symlink to a file in /etc/X11/Sessions/. Alternatively, you can specify a complete script to be 'exec'd.

Examples:

or:

or:

Variant B: Global default session
Global / all users at once

Set the default session via the XSESSION global variable. To set a global session variable create the file:

Remember to run env-update after changing 90xsession.

Preparing for multiple sessions (Old Setups)
The following are included for historical purposes. Although some of the support which works in the default setup, such as consolekit, is left to the user to figure out, they still work.

Variant A
Per user approach.

First edit. You'll need it to look something like this:

The settings in that file will override what you have in so you do not need to worry about what is in there. To avoid potential complications, be sure to use quotes, as in. If omitted, SLiM may not correctly load the desired session.

Now, you'll need to edit and make sure it is aware of the sessions you want to be able to select.

Variant B
Global / all users at once

The XSESSION variable gets evaluated by SLiM Xsession script. Launch script instead of the standard xinitrc. This is configured in the :

To set a global session variable create the file:

Turning on numlock
If you would like to have numlock turned on before you enter your desktop make sure your SLiM configuration file is setup properly.

Creating and rotating the log file
By default, during install, SLiM's logfile is set to. If you would like to have a log file you simply need to edit like so

Now that you have SLiM setup to write to its log file, it will continue to write to this file until it reaches ~2G in size; at which point SLiM will fail because it cannot write to a file that large. It is for that reason that the logfile is, by default in Gentoo, set to. In order to prevent this first install logrotate

Then, assuming your log file is in the standard place, create the file and place this inside:

Now every time your log file becomes greater than 1024k it will be rotated preventing errors and saving space on your hard drive.

It doesn't switch between my sessions when I press F1 at login
If SLiM is spitting out what appears to be a line of bash code from your slim.conf file instead of proper sessions names (i.e. Fluxbox, Gnome, etc.) then you'll need to comment out the bottom two lines of your.

Links
SLiM homepage

SLiM