SLiM

From ArchWiki
Revision as of 20:36, 6 November 2007 by Thayer (Talk | contribs) (Single Environment)

Jump to: navigation, search


Introduction

SLiM is an acronym for Simple Login Manager (SLiM). SLiM is simple, lightweight and easily configurable allowing it be used on low and high end systems with relative ease. SLiM is also very convenient for those who want a login manager without the dependencies of Gnome or KDE making it perfect for users running Xfce, Openbox, Fluxbox, etc.

Installation

SLiM is available from the standard repositories:

# pacman -S slim

Start on boot

Refer to Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup

Configuration

Single Environment

To configure SLiM to load a particular environment, simply edit ~/.xinitrc to look like the following:

#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

# Environment
exec session-command

Replace Environment with the appropriate name (e.g. Openbox), and replace session-command with the appropriate application. For example:

To launch Openbox:

# Openbox
exec openbox-session

To launch GNOME:

# GNOME
exec gnome-session

To launch KDE:

# KDE
exec startkde

Multiple Environments

If you require the ability to load multiple desktop environments, SLiM can be setup to log you into whichever you choose.

Put a case statement similar to this one in your /etc/X11/xinit/xinitrc file:

# The following variable defines the session which is started if the user doesn't explicitly select a session

DEFAULT_SESSION=twm

case $1 in
kde)
	exec startkde
	;;
xfce4)
	exec startxfce4
	;;
icewm)
	icewmbg &
	icewmtray &
	exec icewm
	;;
wmaker)
	exec wmaker
	;;
blackbox)
	exec blackbox
	;;
*)
	exec $DEFAULT_SESSION
	;;
esac

Source for sample: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample

FAQ

Shutdown, Reboot, Suspend, Exit, Launch Terminal from SLiM

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:

  • To launch a terminal, enter console as the username (defaults to xterm which must be installed separately... edit /etc/slim.conf to change terminal preference)
  • For shutdown, enter halt as the username
  • For reboot, enter reboot as the username
  • To exit to bash, enter exit as the username
  • For suspend, enter suspend as the username (Suspend is disabled by default, edit /etc/slim.conf as root to uncomment the suspend_cmd line and, if necessary modify the suspend command itself (e.g. change /usr/sbin/suspend to sudo /usr/sbin/pm-suspend))