HOWTO SLiM setup
From Gentoo Linux Wiki
Contents |
[edit] Introduction
SLiM - Simple Login Manager - is a desktop-independent graphical login manager for X11. It offers enough functionality to be considered a viable alternative to XDM. As it does not depend on KDE or Gnome libraries, it is well-suited for use with light-weight desktop environments like Xfce or Fluxbox.
[edit] Installation
echo "x11-misc/slim ~x86" >> /etc/portage/package.keywords echo "x11-themes/slim-themes ~x86" >> /etc/portage/package.keywords emerge -av slim slim-themes
[edit] Post-installation configuration
[edit] Start SLiM automatically
If you wish SLiM to start automatically, you'll have to edit /etc/conf.d/xdm and xdm to your runlevel.
Set SLiM as display manager in /etc/conf.d/xdm:
| File: /etc/conf.d/xdm |
DISPLAYMANAGER="slim" |
Add xdm to your default runlevel: rc-update add xdm default
[edit] Window manager
By default, SLiM will use default XSESSION value set in /etc/rc.conf.
Set your desired window manager. Valid options are for example "fluxbox", "kde", "gnome", "wmii", "xfce4":
| File: /etc/rc.conf |
XSESSION="wmii" |
Edit your xinitrc to start your window manager of choice. If you do not use Fluxbox, this line will be different (e.g. "exec startkde" for KDE and "exec pekwm" for PekWM). Also examine SLiM's xinitrc.sample and "man xinit" as they might be of some use.
echo "exec startfluxbox" > ~/.xinitrc
[edit] Change theme
Specify the theme in the configuration. You can find the installed themes in /usr/share/slim/themes:
nano /etc/slim.conf
To preview a theme, run:
slim -p /usr/share/slim/themes/<theme name>/
[edit] Tips
[edit] Select different sessions with SLiM
First we edit our slim.conf file to set which sessions we want to choose from.
nano /etc/slim.conf
| File: /etc/slim.conf |
... # Command run on login login_cmd exec /bin/bash - ~/.xinitrc %session ... # Specify sessions here sessions GNOME,KDE,XFCE4,ICEWM,FLUXBOX |
Next we edit our users .xinitrc to match with the variables listed in slim.conf and execute the proper session.
nano ~/.xinitrc
| File: ~/.xinitrc |
#!/bin/bash
DEFAULTSESSION=startxfce4
case "$1" in
"GNOME")
exec gnome-session
;;
"KDE")
exec startkde
;;
"XFCE4")
exec startxfce4
;;
"ICEWM")
exec icewm-session
;;
"FLUXBOX")
exec startfluxbox
;;
*)
exec $DEFAULTSESSION
;;
esac
|
Once SLiM loads simply hit F1 to cycle between sessions. Not hitting F1 will execute the DEFAULTSESSION.
Starting Xfce4
If you find that your Xfce session isn't saved upon logout using the startxfce4 command, change your ~/.xinitrc a bit
| File: ~/.xinitrc |
#exec startxfce4 exec xfce4-session |
[edit] Trouble with Xfce4
If you are having trouble getting slim to load with non-root accounts try adding this to your slim.conf
| File: /etc/slim.conf |
login_cmd exec /bin/bash -login /etc/X11/xinit/xinitrc |
