SLIM
From ArchWiki
| i18n |
|---|
| English |
| 简体中文 |
| Italiano |
Contents |
[edit] 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.
[edit] Installation
SLiM is available from the /extra repositories:
# pacman -S slim
There is also a themes package:
# pacman -S slim-themes
[edit] Configuration
[edit] Enabling SLiM
Refer to Adding a login manager (KDM, GDM, or XDM) to automatically boot on startup.
[edit] Single Environments
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) # exec [session-command]
- Note: If you do not have have a ~/.xinitrc file, you can create one (with, for example, nano).
Replace [session-command] with the appropriate session command. For example:
To launch Openbox:
# Openbox exec openbox-session
To launch Fluxbox:
# Fluxbox exec fluxbox # Either fluxbox or startfluxbox is acceptable
To launch Xfce:
# Xfce exec startxfce4
To launch GNOME:
# GNOME exec gnome-session
To launch KDE:
# KDE exec startkde
If your environment is not listed here, refer to the documentation provided by your software.
[edit] 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 and edit the sessions variable in /etc/slim.conf. You can choose the session at login time by pressing F1. Note that this feature is experimental
# 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
Slim documentation: http://slim.berlios.de/manual.php
[edit] Themes
Install the slim-themes package:
pacman -S slim-themes archlinux-themes-slim
The archlinux-themes-slim packages contains several different themes. Check /usr/share/slim/themes to see the available variations and other themes available.
Edit the current_theme line in /etc/slim.conf from "default" to one of your choice:
nano /etc/slim.conf
#current_theme default current_theme archlinux-simplyblack
To preview a theme, run:
slim -p /usr/share/slim/themes/<theme name>
[edit] Tips & Tricks
[edit] Slim and Desktop share a theme
A simple way of sharing wallpaper between Slim and your desktop is to create a symbolic link from your desktop wallpaper file to the default Slim theme:
mv /usr/share/slim/themes/default/background.jpg /usr/share/slim/themes/default/background.old.jpg ln -s /path/to/mywallpaper.jpg /usr/share/slim/themes/default/background.jpg
Now your Slim theme and desktop wallpaper will be the same, smoothing the transition while loading the desktop. (Obviously you must keep the default theme setting in /etc/slim.conf for the above trick to work.)
[edit] 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))