SLiM - Simple Login Manager

Latest release: 1.3.1

Sections: Home Page | Documentation | Themes | Themes HowTo | Authors

SLiM manual

1. Compilation and installation

Starting from version 1.2.3 slim is shipped with a separate Makefile for each supported OS. On Linux (default Makefile), you may need to adjust the includes and library paths to your distribution.

The rest of this guide will assume a default installation in /usr; replace the references with your custom path if you specified one during configuration.

2. Configuration

2.1 Global Options

The global configuration of SLiM is stored in the /usr/etc/slim.conf file; this contains settings that are common for all users.
Here is the complete list of configurable options with a brief explanation of their meaning and possible values.

Option Default Value Explanation
default_path ./:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin The default pat initialized when a user logs in
default_xserver /usr/X11R6/bin/X The X server binary to launch
xserver_arguments (commented) Optional arguments to pass to the X server
halt_cmd /sbin/shutdown -h now The command executed to shutdown the machine
reboot_cmd /sbin/shutdown -r now The command executed to reboot the machine
console_cmd /usr/X11R6/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login" The command executed to start a X11 terminal
suspend_cmd /usr/sbin/suspend The command executed to suspend the machine
login_cmd exec /bin/sh -login ~/.xinitrc %session The command executed upon succesful login. The session variable contains the name of the chosen session (see sessions). See the xinitrc.example file as an example on how to activate session choosing. Note that this frature is experimental. Another implemented variable is %theme, which contains the name of the slim theme in use. This is useful if you want to customize the way your window manager starts according to the active slim theme.
sessions icewm,wmaker,blackbox A list of available session names. You can choose the session at login time by pressing F1. Note that this feature is experimental
screenshot_cmd import -window root /slim.png The command to take a screenshot of SLiM with F11 (requires imagemagick)
welcome_msg Welcome to %host The welcome message to display. %host is replaced with the host name, %domain with the domain name
shutdown_msg The system is halting... Message displayed during shutdown
reboot_msg The system is rebooting... Message displayed during reboot
default_user (commented) The default user to load when slim starts. If you put a username here you get it automatically loaded into the username field, and focus is placed on the password
current_theme default The theme to use. Either a single theme name or a list of comma-separated theme names; if you specify more then one theme, SLiM will select a random one from the list
lockfile /var/run/slim.lock The file used to ensure only one copy of slim is running
logfile /var/log/slim.log The file in which the log messages are written

2.2 Running SLiM at boot time

Running SliM autmatically at boot time is just a matter of creating an init script accroding to the documentation found in your Operating System. In this section we present a couple of common situations as an example.

BSD-style init

Here's a simple script you can use on a system which uses BSD-style init script (tipically you would place it in /etc/rc.d/)

#!/bin/sh
#
# /etc/rc.d/slim: start/stop slim
#

case $1 in
start)
	/usr/bin/slim -d
	;;
stop)
	killall /usr/bin/slim
	;;
restart)
	$0 stop
	sleep 2
	$0 start
	;;
*)
	echo "usage: $0 [start|stop|restart]"
	;;
esac

# End of file

Directly from inittab

Another option is to launch slim directly from inittab: edit /etc/inittab and add the following line at the end:

x:5:respawn:/usr/bin/slim >& /dev/null

This could be a bit different depending on your Operating System.

3. Special user names: reboot

You may shutdown, reboot, suspend, exit or even launch a terminal from the SLiM login screen. To do so, enter the appropriate value in the username field, and the root password in the password field:

3.1 Alternative methods for multi-user setups

While special user names may be useful on a single user setup, on a tipical multi-user installation you don't want to share the root password with the users; here's a couple of suggested methods to overcome the problem:

Note: this may change in future releases, where some more flexible reboot/shutdown option could be added to the login screen.

4. Themes

By default themes are placed in /usr/share/slim/themes; detailed information on how to create or modify themes is collected in the SLiM Themes HowTo.

5. Common problems and FAQs

Q: The fonts look too small/big!
A: Try to set the dpi variable in the xserver_arguments option, for example '-dpi 75'

Q: The keyboard doen not respond!
A: If you don't specify a virtual terminal to use for the X server, SLiM by default binds to vt7. If vt7 is already used by another program try specifying an unused terminal in the xserver_arguments option, for example 'vt08'

kindly hosted by
BerliOS Logo