https://wiki.archlinux.org/api.php?action=feedcontributions&user=Rezlam&feedformat=atomArchWiki - User contributions [en]2024-03-28T12:32:58ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=SLiM&diff=228529SLiM2012-10-14T00:59:20Z<p>Rezlam: /* SLiM and Gnome Keyring */</p>
<hr />
<div>[[Category:Display managers]]<br />
[[cs:SLiM]]<br />
[[es:SLiM]]<br />
[[fr:SLiM]]<br />
[[hu:SLiM]]<br />
[[it:SLiM]]<br />
[[ko:SLiM]]<br />
[[pt:SLiM]]<br />
[[ru:SLiM]]<br />
[[sk:SLiM]]<br />
[[tr:SLiM]]<br />
[[zh-CN:SLiM]]<br />
[[zh-TW:SLiM]]<br />
{{Article summary start}}<br />
{{Article summary text|Provides an overview of the Simple Login Manager.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Display Manager}}<br />
{{Article summary end}}<br />
<br />
[http://slim.berlios.de/ SLiM] is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of [[GNOME]] or [[KDE]] and can help make a lighter system for users that like to use lightweight desktops like [[Xfce]], [[Openbox]], and [[Fluxbox]].<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{pkg|slim}} from the [[official repositories]].<br />
<br />
== Configuration ==<br />
<br />
=== Enabling SLiM ===<br />
<br />
SLiM can be loaded on startup by modifying {{ic|/etc/inittab}}: see [[Display Manager#Loading the display manager]] for detailed instructions. If you use [[systemd]], just enable {{ic|slim.service}}. [[Dbus]] appears to be required since version 1.3.3 of SLiM.<br />
<br />
=== Single environments ===<br />
<br />
To configure SLiM to load a particular environment, edit your {{ic|~/.xinitrc}} to load your desktop environment:<br />
<br />
{{bc|<br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec <session-command><br />
}}<br />
<br />
Replace {{ic|<session-command>}} with the appropriate session command. Some examples of different desktop start commands:<br />
<br />
{{bc|<br />
exec awesome<br />
exec dwm<br />
exec startfluxbox<br />
exec fvwm2<br />
exec gnome-session<br />
exec openbox-session<br />
exec startkde<br />
exec startlxde<br />
exec startxfce4<br />
exec enlightenment_start<br />
}}<br />
<br />
For detailed instructions on how to start the various environments, refer to the appropriate wiki pages.<br />
<br />
SLiM reads the local {{ic|~/.xinitrc}} configuration and then launches the desktop according to what is in that file. If you do not have a {{ic|~/.xinitrc}} file, you can use the skeleton file by:<br />
<br />
$ cp /etc/skel/.xinitrc ~<br />
<br />
Remember to make {{ic|~/.xinitrc}} executable:<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
{{Note|{{pkg|slim}} is ConsoleKit capable since version 1.3.3. Unless you happen to run an old version, you must '''no''' longer include {{ic|ck-launch-session}} in your {{ic|.xinitrc}} or {{ic|slim.conf}} {{ic|login_cmd}}. You should still have {{ic|dbus-launch}} (see [[#SLiM_and_Gnome_Keyring]]) since this gives subprocesses of your session the correct permissions (e.g. to mount something with [[Wikipedia:GVFS|gvfs-mount]], like [[Pcmanfm]] does).}}<br />
<br />
=== Autologin ===<br />
<br />
To make SLiM automatically login as a specified user (without having to type a password) the following lines in {{ic|/etc/slim.conf}} should be changed.<br />
# default_user simone<br />
<br />
Uncomment this line, and change "simone" to the user to be logged into automatically.<br />
<br />
# auto_login no<br />
<br />
Uncomment this line and change the 'no' to 'yes'. This enables the auto login feature.<br />
<br />
=== Zsh ===<br />
<br />
The default login command will not initialize your environment correctly [http://www.edsel.nu/2010/06/04/slim-simple-login-manager-on-freebsd/ [source]]. Change the login_cmd line to:<br />
<br />
#login_cmd exec /bin/sh - ~/.xinitrc %session<br />
login_cmd exec /bin/zsh -l ~/.xinitrc %session<br />
<br />
=== Multiple environments ===<br />
<br />
To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.<br />
<br />
Put a case statement similar to this one in your {{ic|~/.xinitrc}} file and edit the sessions variable in {{ic|/etc/slim.conf}} to match the names that trigger the case statement. You can choose the session at login time by pressing F1. Note that this feature is experimental.<br />
<br />
{{bc|1=<br />
# The following variable defines the session which is started if the user doesn't explicitly select a session<br />
# Source: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample<br />
<br />
DEFAULT_SESSION=twm<br />
<br />
case $1 in<br />
kde)<br />
exec startkde<br />
;;<br />
xfce4)<br />
exec startxfce4<br />
;;<br />
icewm)<br />
icewmbg &<br />
icewmtray &<br />
exec icewm<br />
;;<br />
wmaker)<br />
exec wmaker<br />
;;<br />
blackbox)<br />
exec blackbox<br />
;;<br />
*)<br />
exec $DEFAULT_SESSION<br />
;;<br />
esac<br />
}}<br />
<br />
Note that, in this script, the default option simply executes, e.g., exec icewm (if that is the default session), without icewmbg and icewmtray. You may want simply to repeat everything you've put under, e.g., icewm) again under *). When done use F1 to cycle through sessions in SLiM.<br />
<br />
=== Themes ===<br />
<br />
Install the {{Pkg|slim-themes}} package:<br />
<br />
# pacman -S slim-themes archlinux-themes-slim<br />
<br />
The {{Pkg|archlinux-themes-slim}} packages contains several different themes. Look in the directory of {{ic|/usr/share/slim/themes}} to see the themes available. Enter the theme name on the {{ic|current_theme}} line in {{ic|/etc/slim.conf}}:<br />
<br />
#current_theme default<br />
current_theme archlinux-simplyblack<br />
<br />
To preview a theme run while an instance of the Xorg server is running by:<br />
<br />
$ slim -p /usr/share/slim/themes/<theme name><br />
<br />
To close, type "exit" in the Login line and press Enter.<br />
<br />
Additional theme packages can be found in the [[AUR]].<br />
<br />
==== Dual screen setup ====<br />
<br />
You can customize the slim theme in {{ic|/usr/share/slim/themes/<your-theme>/slim.theme}} to turn these percents values. The box itself is 450 pixels by 250 pixels:<br />
<br />
input_panel_x 50%<br />
input_panel_y 50%<br />
<br />
into pixels values:<br />
<br />
# These settings set the "archlinux-simplyblack" panel in the center of a 1440x900 screen<br />
input_panel_x 495<br />
input_panel_y 325<br />
<br />
# These settings set the "archlinux-retro" panel in the center of a 1680x1050 screen<br />
input_panel_x 615<br />
input_panel_y 400<br />
<br />
If your theme has a background picture you should use the background_style setting ('stretch', 'tile', 'center' or 'color') to get it correctly displayed. Have a look at the [http://slim.berlios.de/themes_howto.php very simple and clear official documentation about slim themes] for further details.<br />
<br />
== Other options ==<br />
<br />
A few things you might like to try.<br />
<br />
=== Changing the cursor ===<br />
<br />
If you want to change the default X cursor to a newer design, the {{AUR|slim-cursor}} package is available.<br />
<br />
After installing, edit {{ic|/etc/slim.conf}} and uncomment the line:<br />
<br />
cursor left_ptr<br />
<br />
This will give you a normal arrow instead. This setting is forwarded to {{ic|xsetroot -cursor_name}}. You can look up the possible cursor names [http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/lib/X11/cursorfont.h?rev=HEAD&content-type=text/plain here] or in {{ic|/usr/share/icons/<your-cursor-theme>/cursors/}}.<br />
<br />
To change the cursor theme being used at the login screen, make a file named {{ic|/usr/share/icons/default/index.theme}} with this content:<br />
<br />
[Icon Theme]<br />
Inherits=<your-cursor-theme><br />
<br />
Replace <your-cursor-theme> with the name of the cursor theme you want to use (e.g. whiteglass).<br />
<br />
=== Match SLiM and Desktop Wallpaper ===<br />
<br />
To share a wallpaper between SLiM and your desktop, rename the used theme background, then create a link from your desktop wallpaper file to the default SLiM theme:<br />
<br />
# mv /usr/share/slim/themes/default/background.jpg{,.bck}<br />
# ln -s /path/to/mywallpaper.jpg /usr/share/slim/themes/default/background.jpg<br />
<br />
=== Shutdown, reboot, suspend, exit, launch terminal from SLiM ===<br />
<br />
You may shutdown, reboot, suspend, exit or even launch a terminal from the SLiM login screen. To do so, use the values in the username field, and the root password in the password field:<br />
<br />
* To launch a terminal, enter '''console''' as the username (defaults to xterm which must be installed separately... edit {{ic|/etc/slim.conf}} to change terminal preference)<br />
* For shutdown, enter '''halt''' as the username<br />
* For reboot, enter '''reboot''' as the username<br />
* To exit to bash, enter '''exit''' as the username<br />
* For suspend, enter '''suspend''' as the username (suspend is disabled by default, edit {{ic|/etc/slim.conf}} as root to uncomment the {{ic|suspend_cmd}} line and, if necessary modify the suspend command itself (e.g. change {{ic|/usr/sbin/suspend}} to {{ic|sudo /usr/sbin/pm-suspend}}))<br />
<br />
=== SLiM init error with rc.d daemon ===<br />
<br />
If you initialize SLiM with {{ic|/etc/rc.conf}} inside the DAEMONS array and it fails to initialize it's most likely a lock file issue. SLiM creates a lock file in {{ic|/var/lock}} on each initialization, however, in most cases the lock folder in {{ic|/var}} does not exist preventing SLiM from initializing. Check to make sure {{ic|/var/lock}} exists, if it does not you can create it by typing the following:<br />
<br />
# mkdir /var/lock/<br />
<br />
=== Power-off error with Splashy ===<br />
<br />
If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your {{ic|/etc/slim.conf}} and {{ic|/etc/splash.conf}}; set the {{ic|1=DEFAULT_TTY=7}} same as {{ic|xserver_arguments vt07}}.<br />
<br />
=== Power-off tray icon fails ===<br />
<br />
If your power off tray icon fails, it could be due to not having root privileges. To start a tray icon with root privileges, be sure to have SLiM start the program. Edit {{ic|/etc/slim.conf}} as follows:<br />
sessionstart_cmd /path/to/tray/icon/program &<br />
<br />
=== Login information with SLiM ===<br />
<br />
By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your {{ic|slim.conf}} as follows:<br />
<br />
sessionstart_cmd /usr/bin/sessreg -a -l $DISPLAY %user<br />
sessionstop_cmd /usr/bin/sessreg -d -l $DISPLAY %user<br />
<br />
=== Custom SLiM Login Commands ===<br />
<br />
You can also use the sessionstart_cmd/sessionstop_cmd in {{ic|/etc/slim.conf}} to log specific infomation, such as the session, user, or theme used by slim:<br />
<br />
sessionstop_cmd /usr/bin/logger -i -t ASKAPACHE "(sessionstop_cmd: u:%user s:%session t:%theme)"<br />
sessionstart_cmd /usr/bin/logger -i -t ASKAPACHE "(sessionstart_cmd: u:%user s:%session t:%theme)"<br />
<br />
Or if you want to play a song when slim loads (and you have the beep program installed)<br />
<br />
sessionstart_cmd /usr/bin/beep -f 659 -l 460 -n -f 784 -l 340 -n -f 659 -l 230 -n -f 659 -l 110<br />
<br />
=== SLiM and Gnome Keyring ===<br />
If you are using SLiM to launch a Gnome session and have trouble accessing your keyring, for example not being automatically authenticated on login, add the following lines to {{ic|/etc/pam.d/slim}} (as discussed [http://bugs.archlinux.org/task/18637 here]).<br />
auth optional pam_gnome_keyring.so<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
You also have to add to {{ic|/etc/pam.d/passwd}}:<br />
password optional pam_gnome_keyring.so<br />
<br />
If you use a screensaver you also have to add <br />
auth optional pam_gnome_keyring.so<br />
to {{ic|/etc/pam.d/gnome-screensaver}} for example (replace {{ic|gnome-screensaver}} with {{ic|slimlock}}, {{ic|slock}}, whatever you use). If you don't do that, your keyring is locked when screen is locked by your screensaver and not unlocked again after logging back in.<br />
<br />
However, this fix alone no longer works since Gnome 2.30. Further changes are necessary as described [http://bugs.archlinux.org/task/18930 here]. Modifying the {{ic|login_cmd}} line in {{ic|/etc/slim.conf}}:<br />
login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
<br />
As of GNOME 3, simply adding {{ic|dbus-launch}} after {{ic|ck-launch-session}} will work, without needing to edit {{ic|/etc/pam.d/slim}}.<br />
<br />
As of GNOME 3.1, you need to add {{ic|dbus-launch}} after {{ic|ck-launch-session}} and edit {{ic|<nowiki>/etc/pam.d/{slim,passwd}</nowiki>}}, otherwise the keyring will not be automatically unlocked. I never tried it on 3.0, so maybe the above information about GNOME 3 is wrong.<br />
<br />
As of GNOME 3.4, you need to edit {{ic|<nowiki>/etc/pam.d/{slim,passwd}</nowiki>}} as mentioned above, so that {{ic|<nowiki>/etc/pam.d/slim</nowiki>}} looks like:<br />
#%PAM-1.0<br />
auth requisite pam_nologin.so<br />
auth required pam_env.so<br />
auth required pam_unix.so<br />
auth optional pam_gnome_keyring.so<br />
account required pam_unix.so<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
session optional pam_gnome_keyring.so auto_start<br />
password required pam_unix.so<br />
and {{ic|<nowiki>/etc/pam.d/passwd</nowiki>}}<br />
#%PAM-1.0<br />
password required pam_unix.so sha512 shadow nullok<br />
password optional pam_gnome_keyring.so<br />
As of 2012-10-13, {{ic|<nowiki>/etc/pam.d/gnome-screensaver</nowiki>}} already contains the {{ic|<nowiki>pam_gnome_keyring.so</nowiki>}} instruction.<br />
<br />
The correct positioning of the {{ic|<nowiki>pam_gnome_keyring.so</nowiki>}} instructions were taken from [http://live.gnome.org/GnomeKeyring/Pam here].<br />
<br />
After editing the above files, you need to edit {{ic|<nowiki>/etc/inittab</nowiki>}}. The above mentioned code<br />
login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
will work, but when you try to power off or reboot the system from GNOME menu it will drop you into the SLiM screen. To solve this problem, use the code below<br />
login_cmd exec dbus-launch --exit-with-session /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
{{ic|<nowiki>ck-launch-session</nowiki>}} is no longer necessary as stated [https://bbs.archlinux.org/viewtopic.php?pid=1099742#p1099742 here].<br />
<br />
The solutions mentioned here and also further information are found [http://live.gnome.org/GnomeKeyring/Pam here].<br />
<br />
If you have problems keeping the keyring unlocked for longer sessions, there is another thing that Gnome does: <br />
Look at {{ic|<nowiki>/etc/xdg/autostart/{gnome-keyring-gpg.desktop, gnome-keyring-pkcs11.desktop, gnome-keyring-secrets.desktop, gnome-keyring-ssh.desktop}</nowiki>}}. <br />
<br />
Append the following lines to .xinitrc just before you start your wm (example here is awesome wm):<br />
/usr/bin/gnome-keyring-daemon --start --components=gpg<br />
/usr/bin/gnome-keyring-daemon --start --components=pkcs11<br />
/usr/bin/gnome-keyring-daemon --start --components=secrets<br />
/usr/bin/gnome-keyring-daemon --start --components=ssh<br />
/usr/bin/awesome<br />
<br />
After login check if there is only one gnome-keyring-daemon instance running ({{ic|ps -A | grep gnome}}). If those lines are executed too early then you have 4 instances running which is not good.<br />
<br />
You also should notice that seahorse for example does not show any pkcs11 errors anymore and that your keyring is unlocked all the time and does not lock itself anymore. Finally {{pkg|gnome-keyring}} is fully functional like in Gnome. See also [https://bbs.archlinux.org/viewtopic.php?pid=1019845#p1019845 here].<br />
<br />
=== SLiM and Environment Variables ===<br />
{{Out of date|{{ic|/etc/pam.d/slim}} no longer has the given lines. This problem may also have been fixed.}}<br />
<br />
If you have trouble with environment variables changing after a session is started, one cause could be the module {{ic|pam_env.so}}, by default, reads the file {{ic|/etc/environment}} and sets up the environment accordingly.<br />
<br />
For example: I use SLiM, which fires up a XFCE4 session upon valid authentication. When this is done my terminal ({{ic|xfterm4}}) can't print Unicode characters ({{ic|LC_*}} environment variables has been defaulted/altered to {{ic|POSIX}}). But when I start XFCE4 manually, like so: {{ic|startxfce4}}, Unicode characters on my terminal works fine.<br />
<br />
This can be fixed by adding this to {{ic|/etc/environment}} or your user specific file: {{ic|$HOME/.pam_environment}}:<br />
# You can change these to fit your preference, of course.<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
Alternatively, you can modify the line in {{ic|/etc/pam.d/slim}} from:<br />
{{bc|session required pam_env.so}}<br />
To:<br />
{{bc|1=session required pam_env.so envfile=<yourfile>}}<br />
Where {{ic|<yourfile>}} is the name of the file you want PAM to recognize as your default environment file, when starting a new session from SLiM.<br />
<br />
=== Setting DPI with SLiM ===<br />
<br />
The Xorg server generally picks up the DPI but if it doesn't you can specify it to SLiM. If you set the DPI with the argument -dpi 96 in {{ic|/etc/X11/xinit/xserverrc}} it will not work with SLiM. To fix this change your {{ic|slim.conf}} from:<br />
<br />
xserver_arguments -nolisten tcp vt07 <br />
<br />
to<br />
<br />
xserver_arguments -nolisten tcp vt07 -dpi 96<br />
<br />
=== Use a random theme ===<br />
<br />
Use the {{ic|current_theme}} variable as a comma separated list to specify a set from which to choose. Selection is random.<br />
<br />
===Move the whole session to another VT===<br />
Lets say you have commented out tty terminals 3-6 as you may not use them. (You may use screen and therefore only need one terminal)<br />
So, to move the X-Server you need to change one number in the {{ic|/etc/slim.conf}} file. Just a few lines down you should see:<br />
xserver_arguments -nolisten tcp vt07<br />
<br />
Simply change the vt07 to lets say vt03 as there is no agetty started there.<br />
<br />
=== Automatically mount your encrypted /home on login ===<br />
<br />
You can use [[Pam_mount#Slim|pam_mount]].<br />
<br />
== All Slim Options ==<br />
Here is a list of all the slim configuration options and their default values.<br />
<br />
{{Note|welcome_msg allows 2 variables '''%host''' and '''%domain'''<br>sessionstart_cmd allows '''%user''' ''(execd right before login_cmd)'' and it is also allowed in sessionstop_cmd<br>login_cmd allows '''%session''' and '''%theme'''}}<br />
<br />
{| class="wikitable collapsible collapsable collapsed"<br />
|-<br />
! Option Name || Default Value<br />
|-<br />
| default_path ||{{ic|/bin:/usr/bin:/usr/local/bin}}<br />
|-<br />
| default_xserver ||{{ic|/usr/bin/X}}<br />
|-<br />
| xserver_arguments ||{{ic|vt07 -auth /var/run/slim.auth}}<br />
|-<br />
| numlock ||<br />
|-<br />
| daemon || {{ic|yes}}<br />
|-<br />
| xauth_path ||{{ic|/usr/bin/xauth}}<br />
|-<br />
| login_cmd ||{{ic|exec /bin/bash -login ~/.xinitrc %session}}<br />
|-<br />
| halt_cmd ||{{ic|/sbin/shutdown -h now}}<br />
|-<br />
| reboot_cmd ||{{ic|/sbin/shutdown -r now}}<br />
|-<br />
| suspend_cmd ||<br />
|-<br />
| sessionstart_cmd ||<br />
|-<br />
| sessionstop_cmd ||<br />
|-<br />
| console_cmd ||{{ic|/usr/bin/xterm -C -fg white -bg black +sb -g %dx%d+%d+%d -fn %dx%d -T }}<br />
|-<br />
| screenshot_cmd ||{{ic|import -window root /slim.png}}<br />
|-<br />
| welcome_msg ||{{ic|Welcome to %host}}<br />
|-<br />
| session_msg ||{{ic|Session:}}<br />
|-<br />
| default_user ||<br />
|-<br />
| focus_password ||{{ic|no}}<br />
|-<br />
| auto_login ||{{ic|no}}<br />
|-<br />
| current_theme ||{{ic|default}}<br />
|-<br />
| lockfile ||{{ic|/var/run/slim.lock}}<br />
|-<br />
| logfile ||{{ic|/var/log/slim.log}}<br />
|-<br />
| authfile ||{{ic|/var/run/slim.auth}}<br />
|-<br />
| shutdown_msg ||{{ic|The system is halting...}}<br />
|-<br />
| reboot_msg ||{{ic|The system is rebooting...}}<br />
|-<br />
| sessions ||{{ic|wmaker,blackbox,icewm}}<br />
|-<br />
| sessiondir ||<br />
|-<br />
| hidecursor ||{{ic|false}}<br />
|-<br />
| input_panel_x ||{{ic|50%}}<br />
|-<br />
| input_panel_y ||{{ic|40%}}<br />
|-<br />
| input_name_x ||{{ic|200}}<br />
|-<br />
| input_name_y ||{{ic|154}}<br />
|-<br />
| input_pass_x ||{{ic|-1}}<br />
|-<br />
| input_pass_y ||{{ic|-1}}<br />
|-<br />
| input_font ||{{ic|1=Verdana:size=11}}<br />
|-<br />
| input_color ||{{ic|#000000}}<br />
|-<br />
| input_cursor_height ||{{ic|20}}<br />
|-<br />
| input_maxlength_name ||{{ic|20}}<br />
|-<br />
| input_maxlength_passwd ||{{ic|20}}<br />
|-<br />
| input_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| input_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| input_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| welcome_font ||{{ic|1=Verdana:size=14}}<br />
|-<br />
| welcome_color ||{{ic|#FFFFFF}}<br />
|-<br />
| welcome_x ||{{ic|-1}}<br />
|-<br />
| welcome_y ||{{ic|-1}}<br />
|-<br />
| welcome_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| welcome_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| welcome_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| intro_msg ||<br />
|-<br />
| intro_font ||{{ic|1=Verdana:size=14}}<br />
|-<br />
| intro_color ||{{ic|#FFFFFF}}<br />
|-<br />
| intro_x ||{{ic|-1}}<br />
|-<br />
| intro_y ||{{ic|-1}}<br />
|-<br />
| background_style ||{{ic|stretch}}<br />
|-<br />
| background_color ||{{ic|#CCCCCC}}<br />
|-<br />
| username_font ||{{ic|1=Verdana:size=12}}<br />
|-<br />
| username_color ||{{ic|#FFFFFF}}<br />
|-<br />
| username_x ||{{ic|-1}}<br />
|-<br />
| username_y ||{{ic|-1}}<br />
|-<br />
| username_msg ||{{ic|Please enter your username}}<br />
|-<br />
| username_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| username_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| username_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| password_x ||{{ic|-1}}<br />
|-<br />
| password_y ||{{ic|-1}}<br />
|-<br />
| password_msg ||{{ic|Please enter your password}}<br />
|-<br />
| msg_color ||{{ic|#FFFFFF}}<br />
|-<br />
| msg_font ||{{ic|1=Verdana:size=16:bold}}<br />
|-<br />
| msg_x ||{{ic|40}}<br />
|-<br />
| msg_y ||{{ic|40}}<br />
|-<br />
| msg_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| msg_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| msg_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| session_color ||{{ic|#FFFFFF}}<br />
|-<br />
| session_font ||{{ic|1=Verdana:size=16:bold}}<br />
|-<br />
| session_x ||{{ic|50%}}<br />
|-<br />
| session_y ||{{ic|90%}}<br />
|-<br />
| session_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| session_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| session_shadow_color ||{{ic|#FFFFFF}}<br />
|}<br />
<br />
== See also ==<br />
<br />
* [http://slim.berlios.de/ SLiM homepage]<br />
* [http://slim.berlios.de/manual.php SLiM documentation]</div>Rezlamhttps://wiki.archlinux.org/index.php?title=SLiM&diff=228528SLiM2012-10-14T00:33:56Z<p>Rezlam: /* SLiM and Gnome Keyring */</p>
<hr />
<div>[[Category:Display managers]]<br />
[[cs:SLiM]]<br />
[[es:SLiM]]<br />
[[fr:SLiM]]<br />
[[hu:SLiM]]<br />
[[it:SLiM]]<br />
[[ko:SLiM]]<br />
[[pt:SLiM]]<br />
[[ru:SLiM]]<br />
[[sk:SLiM]]<br />
[[tr:SLiM]]<br />
[[zh-CN:SLiM]]<br />
[[zh-TW:SLiM]]<br />
{{Article summary start}}<br />
{{Article summary text|Provides an overview of the Simple Login Manager.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Display Manager}}<br />
{{Article summary end}}<br />
<br />
[http://slim.berlios.de/ SLiM] is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of [[GNOME]] or [[KDE]] and can help make a lighter system for users that like to use lightweight desktops like [[Xfce]], [[Openbox]], and [[Fluxbox]].<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{pkg|slim}} from the [[official repositories]].<br />
<br />
== Configuration ==<br />
<br />
=== Enabling SLiM ===<br />
<br />
SLiM can be loaded on startup by modifying {{ic|/etc/inittab}}: see [[Display Manager#Loading the display manager]] for detailed instructions. If you use [[systemd]], just enable {{ic|slim.service}}. [[Dbus]] appears to be required since version 1.3.3 of SLiM.<br />
<br />
=== Single environments ===<br />
<br />
To configure SLiM to load a particular environment, edit your {{ic|~/.xinitrc}} to load your desktop environment:<br />
<br />
{{bc|<br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec <session-command><br />
}}<br />
<br />
Replace {{ic|<session-command>}} with the appropriate session command. Some examples of different desktop start commands:<br />
<br />
{{bc|<br />
exec awesome<br />
exec dwm<br />
exec startfluxbox<br />
exec fvwm2<br />
exec gnome-session<br />
exec openbox-session<br />
exec startkde<br />
exec startlxde<br />
exec startxfce4<br />
exec enlightenment_start<br />
}}<br />
<br />
For detailed instructions on how to start the various environments, refer to the appropriate wiki pages.<br />
<br />
SLiM reads the local {{ic|~/.xinitrc}} configuration and then launches the desktop according to what is in that file. If you do not have a {{ic|~/.xinitrc}} file, you can use the skeleton file by:<br />
<br />
$ cp /etc/skel/.xinitrc ~<br />
<br />
Remember to make {{ic|~/.xinitrc}} executable:<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
{{Note|{{pkg|slim}} is ConsoleKit capable since version 1.3.3. Unless you happen to run an old version, you must '''no''' longer include {{ic|ck-launch-session}} in your {{ic|.xinitrc}} or {{ic|slim.conf}} {{ic|login_cmd}}. You should still have {{ic|dbus-launch}} (see [[#SLiM_and_Gnome_Keyring]]) since this gives subprocesses of your session the correct permissions (e.g. to mount something with [[Wikipedia:GVFS|gvfs-mount]], like [[Pcmanfm]] does).}}<br />
<br />
=== Autologin ===<br />
<br />
To make SLiM automatically login as a specified user (without having to type a password) the following lines in {{ic|/etc/slim.conf}} should be changed.<br />
# default_user simone<br />
<br />
Uncomment this line, and change "simone" to the user to be logged into automatically.<br />
<br />
# auto_login no<br />
<br />
Uncomment this line and change the 'no' to 'yes'. This enables the auto login feature.<br />
<br />
=== Zsh ===<br />
<br />
The default login command will not initialize your environment correctly [http://www.edsel.nu/2010/06/04/slim-simple-login-manager-on-freebsd/ [source]]. Change the login_cmd line to:<br />
<br />
#login_cmd exec /bin/sh - ~/.xinitrc %session<br />
login_cmd exec /bin/zsh -l ~/.xinitrc %session<br />
<br />
=== Multiple environments ===<br />
<br />
To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.<br />
<br />
Put a case statement similar to this one in your {{ic|~/.xinitrc}} file and edit the sessions variable in {{ic|/etc/slim.conf}} to match the names that trigger the case statement. You can choose the session at login time by pressing F1. Note that this feature is experimental.<br />
<br />
{{bc|1=<br />
# The following variable defines the session which is started if the user doesn't explicitly select a session<br />
# Source: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample<br />
<br />
DEFAULT_SESSION=twm<br />
<br />
case $1 in<br />
kde)<br />
exec startkde<br />
;;<br />
xfce4)<br />
exec startxfce4<br />
;;<br />
icewm)<br />
icewmbg &<br />
icewmtray &<br />
exec icewm<br />
;;<br />
wmaker)<br />
exec wmaker<br />
;;<br />
blackbox)<br />
exec blackbox<br />
;;<br />
*)<br />
exec $DEFAULT_SESSION<br />
;;<br />
esac<br />
}}<br />
<br />
Note that, in this script, the default option simply executes, e.g., exec icewm (if that is the default session), without icewmbg and icewmtray. You may want simply to repeat everything you've put under, e.g., icewm) again under *). When done use F1 to cycle through sessions in SLiM.<br />
<br />
=== Themes ===<br />
<br />
Install the {{Pkg|slim-themes}} package:<br />
<br />
# pacman -S slim-themes archlinux-themes-slim<br />
<br />
The {{Pkg|archlinux-themes-slim}} packages contains several different themes. Look in the directory of {{ic|/usr/share/slim/themes}} to see the themes available. Enter the theme name on the {{ic|current_theme}} line in {{ic|/etc/slim.conf}}:<br />
<br />
#current_theme default<br />
current_theme archlinux-simplyblack<br />
<br />
To preview a theme run while an instance of the Xorg server is running by:<br />
<br />
$ slim -p /usr/share/slim/themes/<theme name><br />
<br />
To close, type "exit" in the Login line and press Enter.<br />
<br />
Additional theme packages can be found in the [[AUR]].<br />
<br />
==== Dual screen setup ====<br />
<br />
You can customize the slim theme in {{ic|/usr/share/slim/themes/<your-theme>/slim.theme}} to turn these percents values. The box itself is 450 pixels by 250 pixels:<br />
<br />
input_panel_x 50%<br />
input_panel_y 50%<br />
<br />
into pixels values:<br />
<br />
# These settings set the "archlinux-simplyblack" panel in the center of a 1440x900 screen<br />
input_panel_x 495<br />
input_panel_y 325<br />
<br />
# These settings set the "archlinux-retro" panel in the center of a 1680x1050 screen<br />
input_panel_x 615<br />
input_panel_y 400<br />
<br />
If your theme has a background picture you should use the background_style setting ('stretch', 'tile', 'center' or 'color') to get it correctly displayed. Have a look at the [http://slim.berlios.de/themes_howto.php very simple and clear official documentation about slim themes] for further details.<br />
<br />
== Other options ==<br />
<br />
A few things you might like to try.<br />
<br />
=== Changing the cursor ===<br />
<br />
If you want to change the default X cursor to a newer design, the {{AUR|slim-cursor}} package is available.<br />
<br />
After installing, edit {{ic|/etc/slim.conf}} and uncomment the line:<br />
<br />
cursor left_ptr<br />
<br />
This will give you a normal arrow instead. This setting is forwarded to {{ic|xsetroot -cursor_name}}. You can look up the possible cursor names [http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/lib/X11/cursorfont.h?rev=HEAD&content-type=text/plain here] or in {{ic|/usr/share/icons/<your-cursor-theme>/cursors/}}.<br />
<br />
To change the cursor theme being used at the login screen, make a file named {{ic|/usr/share/icons/default/index.theme}} with this content:<br />
<br />
[Icon Theme]<br />
Inherits=<your-cursor-theme><br />
<br />
Replace <your-cursor-theme> with the name of the cursor theme you want to use (e.g. whiteglass).<br />
<br />
=== Match SLiM and Desktop Wallpaper ===<br />
<br />
To share a wallpaper between SLiM and your desktop, rename the used theme background, then create a link from your desktop wallpaper file to the default SLiM theme:<br />
<br />
# mv /usr/share/slim/themes/default/background.jpg{,.bck}<br />
# ln -s /path/to/mywallpaper.jpg /usr/share/slim/themes/default/background.jpg<br />
<br />
=== Shutdown, reboot, suspend, exit, launch terminal from SLiM ===<br />
<br />
You may shutdown, reboot, suspend, exit or even launch a terminal from the SLiM login screen. To do so, use the values in the username field, and the root password in the password field:<br />
<br />
* To launch a terminal, enter '''console''' as the username (defaults to xterm which must be installed separately... edit {{ic|/etc/slim.conf}} to change terminal preference)<br />
* For shutdown, enter '''halt''' as the username<br />
* For reboot, enter '''reboot''' as the username<br />
* To exit to bash, enter '''exit''' as the username<br />
* For suspend, enter '''suspend''' as the username (suspend is disabled by default, edit {{ic|/etc/slim.conf}} as root to uncomment the {{ic|suspend_cmd}} line and, if necessary modify the suspend command itself (e.g. change {{ic|/usr/sbin/suspend}} to {{ic|sudo /usr/sbin/pm-suspend}}))<br />
<br />
=== SLiM init error with rc.d daemon ===<br />
<br />
If you initialize SLiM with {{ic|/etc/rc.conf}} inside the DAEMONS array and it fails to initialize it's most likely a lock file issue. SLiM creates a lock file in {{ic|/var/lock}} on each initialization, however, in most cases the lock folder in {{ic|/var}} does not exist preventing SLiM from initializing. Check to make sure {{ic|/var/lock}} exists, if it does not you can create it by typing the following:<br />
<br />
# mkdir /var/lock/<br />
<br />
=== Power-off error with Splashy ===<br />
<br />
If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your {{ic|/etc/slim.conf}} and {{ic|/etc/splash.conf}}; set the {{ic|1=DEFAULT_TTY=7}} same as {{ic|xserver_arguments vt07}}.<br />
<br />
=== Power-off tray icon fails ===<br />
<br />
If your power off tray icon fails, it could be due to not having root privileges. To start a tray icon with root privileges, be sure to have SLiM start the program. Edit {{ic|/etc/slim.conf}} as follows:<br />
sessionstart_cmd /path/to/tray/icon/program &<br />
<br />
=== Login information with SLiM ===<br />
<br />
By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your {{ic|slim.conf}} as follows:<br />
<br />
sessionstart_cmd /usr/bin/sessreg -a -l $DISPLAY %user<br />
sessionstop_cmd /usr/bin/sessreg -d -l $DISPLAY %user<br />
<br />
=== Custom SLiM Login Commands ===<br />
<br />
You can also use the sessionstart_cmd/sessionstop_cmd in {{ic|/etc/slim.conf}} to log specific infomation, such as the session, user, or theme used by slim:<br />
<br />
sessionstop_cmd /usr/bin/logger -i -t ASKAPACHE "(sessionstop_cmd: u:%user s:%session t:%theme)"<br />
sessionstart_cmd /usr/bin/logger -i -t ASKAPACHE "(sessionstart_cmd: u:%user s:%session t:%theme)"<br />
<br />
Or if you want to play a song when slim loads (and you have the beep program installed)<br />
<br />
sessionstart_cmd /usr/bin/beep -f 659 -l 460 -n -f 784 -l 340 -n -f 659 -l 230 -n -f 659 -l 110<br />
<br />
=== SLiM and Gnome Keyring ===<br />
If you are using SLiM to launch a Gnome session and have trouble accessing your keyring, for example not being automatically authenticated on login, add the following lines to {{ic|/etc/pam.d/slim}} (as discussed [http://bugs.archlinux.org/task/18637 here]).<br />
auth optional pam_gnome_keyring.so<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
You also have to add to {{ic|/etc/pam.d/passwd}}:<br />
password optional pam_gnome_keyring.so<br />
<br />
If you use a screensaver you also have to add <br />
auth optional pam_gnome_keyring.so<br />
to {{ic|/etc/pam.d/gnome-screensaver}} for example (replace {{ic|gnome-screensaver}} with {{ic|slimlock}}, {{ic|slock}}, whatever you use). If you don't do that, your keyring is locked when screen is locked by your screensaver and not unlocked again after logging back in.<br />
<br />
However, this fix alone no longer works since Gnome 2.30. Further changes are necessary as described [http://bugs.archlinux.org/task/18930 here]. Modifying the {{ic|login_cmd}} line in {{ic|/etc/slim.conf}}:<br />
login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
<br />
As of GNOME 3, simply adding {{ic|dbus-launch}} after {{ic|ck-launch-session}} will work, without needing to edit {{ic|/etc/pam.d/slim}}.<br />
<br />
As of GNOME 3.1, you need to add {{ic|dbus-launch}} after {{ic|ck-launch-session}} and edit {{ic|<nowiki>/etc/pam.d/{slim,passwd}</nowiki>}}, otherwise the keyring will not be automatically unlocked. I never tried it on 3.0, so maybe the above information about GNOME 3 is wrong.<br />
<br />
As of GNOME 3.4, you need to edit {{ic|<nowiki>/etc/pam.d/{slim,passwd}</nowiki>}} as mentioned above, so that {{ic|<nowiki>/etc/pam.d/slim</nowiki>}} looks like:<br />
#%PAM-1.0<br />
auth requisite pam_nologin.so<br />
auth required pam_env.so<br />
auth required pam_unix.so<br />
auth optional pam_gnome_keyring.so<br />
account required pam_unix.so<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
session optional pam_gnome_keyring.so auto_start<br />
password required pam_unix.so<br />
and {{ic|<nowiki>/etc/pam.d/passwd</nowiki>}}<br />
#%PAM-1.0<br />
password required pam_unix.so sha512 shadow nullok<br />
password optional pam_gnome_keyring.so<br />
As of 2012-10-13, {{ic|<nowiki>/etc/pam.d/gnome-screensaver</nowiki>}} already contains the {{ic|<nowiki>pam_gnome_keyring.so</nowiki>}} instruction.<br />
<br />
The correct positioning of the {{ic|<nowiki>pam_gnome_keyring.so</nowiki>}} instructions were taken from [http://live.gnome.org/GnomeKeyring/Pam here].<br />
<br />
After editing the above files, you need to edit {{ic|<nowiki>/etc/inittab</nowiki>}}. The above mentioned code<br />
login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
will work, but when you try to power off or reboot the system from GNOME menu it will drop you into the SLiM screen. To solve this problem, use the code bellow<br />
login_cmd exec dbus-launch --exit-with-session /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
{{ic|<nowiki>ck-launch-session</nowiki>}} is no longer necessary as stated [https://bbs.archlinux.org/viewtopic.php?pid=1099742#p1099742 here].<br />
<br />
The solutions mentioned here and also further information are found [http://live.gnome.org/GnomeKeyring/Pam here].<br />
<br />
If you have problems keeping the keyring unlocked for longer sessions, there is another thing that Gnome does: <br />
Look at {{ic|<nowiki>/etc/xdg/autostart/{gnome-keyring-gpg.desktop, gnome-keyring-pkcs11.desktop, gnome-keyring-secrets.desktop, gnome-keyring-ssh.desktop}</nowiki>}}. <br />
<br />
Append the following lines to .xinitrc just before you start your wm (example here is awesome wm):<br />
/usr/bin/gnome-keyring-daemon --start --components=gpg<br />
/usr/bin/gnome-keyring-daemon --start --components=pkcs11<br />
/usr/bin/gnome-keyring-daemon --start --components=secrets<br />
/usr/bin/gnome-keyring-daemon --start --components=ssh<br />
/usr/bin/awesome<br />
<br />
After login check if there is only one gnome-keyring-daemon instance running ({{ic|ps -A | grep gnome}}). If those lines are executed too early then you have 4 instances running which is not good.<br />
<br />
You also should notice that seahorse for example does not show any pkcs11 errors anymore and that your keyring is unlocked all the time and does not lock itself anymore. Finally {{pkg|gnome-keyring}} is fully functional like in Gnome. See also [https://bbs.archlinux.org/viewtopic.php?pid=1019845#p1019845 here].<br />
<br />
=== SLiM and Environment Variables ===<br />
{{Out of date|{{ic|/etc/pam.d/slim}} no longer has the given lines. This problem may also have been fixed.}}<br />
<br />
If you have trouble with environment variables changing after a session is started, one cause could be the module {{ic|pam_env.so}}, by default, reads the file {{ic|/etc/environment}} and sets up the environment accordingly.<br />
<br />
For example: I use SLiM, which fires up a XFCE4 session upon valid authentication. When this is done my terminal ({{ic|xfterm4}}) can't print Unicode characters ({{ic|LC_*}} environment variables has been defaulted/altered to {{ic|POSIX}}). But when I start XFCE4 manually, like so: {{ic|startxfce4}}, Unicode characters on my terminal works fine.<br />
<br />
This can be fixed by adding this to {{ic|/etc/environment}} or your user specific file: {{ic|$HOME/.pam_environment}}:<br />
# You can change these to fit your preference, of course.<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
Alternatively, you can modify the line in {{ic|/etc/pam.d/slim}} from:<br />
{{bc|session required pam_env.so}}<br />
To:<br />
{{bc|1=session required pam_env.so envfile=<yourfile>}}<br />
Where {{ic|<yourfile>}} is the name of the file you want PAM to recognize as your default environment file, when starting a new session from SLiM.<br />
<br />
=== Setting DPI with SLiM ===<br />
<br />
The Xorg server generally picks up the DPI but if it doesn't you can specify it to SLiM. If you set the DPI with the argument -dpi 96 in {{ic|/etc/X11/xinit/xserverrc}} it will not work with SLiM. To fix this change your {{ic|slim.conf}} from:<br />
<br />
xserver_arguments -nolisten tcp vt07 <br />
<br />
to<br />
<br />
xserver_arguments -nolisten tcp vt07 -dpi 96<br />
<br />
=== Use a random theme ===<br />
<br />
Use the {{ic|current_theme}} variable as a comma separated list to specify a set from which to choose. Selection is random.<br />
<br />
===Move the whole session to another VT===<br />
Lets say you have commented out tty terminals 3-6 as you may not use them. (You may use screen and therefore only need one terminal)<br />
So, to move the X-Server you need to change one number in the {{ic|/etc/slim.conf}} file. Just a few lines down you should see:<br />
xserver_arguments -nolisten tcp vt07<br />
<br />
Simply change the vt07 to lets say vt03 as there is no agetty started there.<br />
<br />
=== Automatically mount your encrypted /home on login ===<br />
<br />
You can use [[Pam_mount#Slim|pam_mount]].<br />
<br />
== All Slim Options ==<br />
Here is a list of all the slim configuration options and their default values.<br />
<br />
{{Note|welcome_msg allows 2 variables '''%host''' and '''%domain'''<br>sessionstart_cmd allows '''%user''' ''(execd right before login_cmd)'' and it is also allowed in sessionstop_cmd<br>login_cmd allows '''%session''' and '''%theme'''}}<br />
<br />
{| class="wikitable collapsible collapsable collapsed"<br />
|-<br />
! Option Name || Default Value<br />
|-<br />
| default_path ||{{ic|/bin:/usr/bin:/usr/local/bin}}<br />
|-<br />
| default_xserver ||{{ic|/usr/bin/X}}<br />
|-<br />
| xserver_arguments ||{{ic|vt07 -auth /var/run/slim.auth}}<br />
|-<br />
| numlock ||<br />
|-<br />
| daemon || {{ic|yes}}<br />
|-<br />
| xauth_path ||{{ic|/usr/bin/xauth}}<br />
|-<br />
| login_cmd ||{{ic|exec /bin/bash -login ~/.xinitrc %session}}<br />
|-<br />
| halt_cmd ||{{ic|/sbin/shutdown -h now}}<br />
|-<br />
| reboot_cmd ||{{ic|/sbin/shutdown -r now}}<br />
|-<br />
| suspend_cmd ||<br />
|-<br />
| sessionstart_cmd ||<br />
|-<br />
| sessionstop_cmd ||<br />
|-<br />
| console_cmd ||{{ic|/usr/bin/xterm -C -fg white -bg black +sb -g %dx%d+%d+%d -fn %dx%d -T }}<br />
|-<br />
| screenshot_cmd ||{{ic|import -window root /slim.png}}<br />
|-<br />
| welcome_msg ||{{ic|Welcome to %host}}<br />
|-<br />
| session_msg ||{{ic|Session:}}<br />
|-<br />
| default_user ||<br />
|-<br />
| focus_password ||{{ic|no}}<br />
|-<br />
| auto_login ||{{ic|no}}<br />
|-<br />
| current_theme ||{{ic|default}}<br />
|-<br />
| lockfile ||{{ic|/var/run/slim.lock}}<br />
|-<br />
| logfile ||{{ic|/var/log/slim.log}}<br />
|-<br />
| authfile ||{{ic|/var/run/slim.auth}}<br />
|-<br />
| shutdown_msg ||{{ic|The system is halting...}}<br />
|-<br />
| reboot_msg ||{{ic|The system is rebooting...}}<br />
|-<br />
| sessions ||{{ic|wmaker,blackbox,icewm}}<br />
|-<br />
| sessiondir ||<br />
|-<br />
| hidecursor ||{{ic|false}}<br />
|-<br />
| input_panel_x ||{{ic|50%}}<br />
|-<br />
| input_panel_y ||{{ic|40%}}<br />
|-<br />
| input_name_x ||{{ic|200}}<br />
|-<br />
| input_name_y ||{{ic|154}}<br />
|-<br />
| input_pass_x ||{{ic|-1}}<br />
|-<br />
| input_pass_y ||{{ic|-1}}<br />
|-<br />
| input_font ||{{ic|1=Verdana:size=11}}<br />
|-<br />
| input_color ||{{ic|#000000}}<br />
|-<br />
| input_cursor_height ||{{ic|20}}<br />
|-<br />
| input_maxlength_name ||{{ic|20}}<br />
|-<br />
| input_maxlength_passwd ||{{ic|20}}<br />
|-<br />
| input_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| input_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| input_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| welcome_font ||{{ic|1=Verdana:size=14}}<br />
|-<br />
| welcome_color ||{{ic|#FFFFFF}}<br />
|-<br />
| welcome_x ||{{ic|-1}}<br />
|-<br />
| welcome_y ||{{ic|-1}}<br />
|-<br />
| welcome_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| welcome_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| welcome_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| intro_msg ||<br />
|-<br />
| intro_font ||{{ic|1=Verdana:size=14}}<br />
|-<br />
| intro_color ||{{ic|#FFFFFF}}<br />
|-<br />
| intro_x ||{{ic|-1}}<br />
|-<br />
| intro_y ||{{ic|-1}}<br />
|-<br />
| background_style ||{{ic|stretch}}<br />
|-<br />
| background_color ||{{ic|#CCCCCC}}<br />
|-<br />
| username_font ||{{ic|1=Verdana:size=12}}<br />
|-<br />
| username_color ||{{ic|#FFFFFF}}<br />
|-<br />
| username_x ||{{ic|-1}}<br />
|-<br />
| username_y ||{{ic|-1}}<br />
|-<br />
| username_msg ||{{ic|Please enter your username}}<br />
|-<br />
| username_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| username_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| username_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| password_x ||{{ic|-1}}<br />
|-<br />
| password_y ||{{ic|-1}}<br />
|-<br />
| password_msg ||{{ic|Please enter your password}}<br />
|-<br />
| msg_color ||{{ic|#FFFFFF}}<br />
|-<br />
| msg_font ||{{ic|1=Verdana:size=16:bold}}<br />
|-<br />
| msg_x ||{{ic|40}}<br />
|-<br />
| msg_y ||{{ic|40}}<br />
|-<br />
| msg_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| msg_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| msg_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| session_color ||{{ic|#FFFFFF}}<br />
|-<br />
| session_font ||{{ic|1=Verdana:size=16:bold}}<br />
|-<br />
| session_x ||{{ic|50%}}<br />
|-<br />
| session_y ||{{ic|90%}}<br />
|-<br />
| session_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| session_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| session_shadow_color ||{{ic|#FFFFFF}}<br />
|}<br />
<br />
== See also ==<br />
<br />
* [http://slim.berlios.de/ SLiM homepage]<br />
* [http://slim.berlios.de/manual.php SLiM documentation]</div>Rezlamhttps://wiki.archlinux.org/index.php?title=SLiM&diff=228526SLiM2012-10-14T00:25:07Z<p>Rezlam: /* SLiM and Gnome Keyring */</p>
<hr />
<div>[[Category:Display managers]]<br />
[[cs:SLiM]]<br />
[[es:SLiM]]<br />
[[fr:SLiM]]<br />
[[hu:SLiM]]<br />
[[it:SLiM]]<br />
[[ko:SLiM]]<br />
[[pt:SLiM]]<br />
[[ru:SLiM]]<br />
[[sk:SLiM]]<br />
[[tr:SLiM]]<br />
[[zh-CN:SLiM]]<br />
[[zh-TW:SLiM]]<br />
{{Article summary start}}<br />
{{Article summary text|Provides an overview of the Simple Login Manager.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Display Manager}}<br />
{{Article summary end}}<br />
<br />
[http://slim.berlios.de/ SLiM] is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of [[GNOME]] or [[KDE]] and can help make a lighter system for users that like to use lightweight desktops like [[Xfce]], [[Openbox]], and [[Fluxbox]].<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{pkg|slim}} from the [[official repositories]].<br />
<br />
== Configuration ==<br />
<br />
=== Enabling SLiM ===<br />
<br />
SLiM can be loaded on startup by modifying {{ic|/etc/inittab}}: see [[Display Manager#Loading the display manager]] for detailed instructions. If you use [[systemd]], just enable {{ic|slim.service}}. [[Dbus]] appears to be required since version 1.3.3 of SLiM.<br />
<br />
=== Single environments ===<br />
<br />
To configure SLiM to load a particular environment, edit your {{ic|~/.xinitrc}} to load your desktop environment:<br />
<br />
{{bc|<br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec <session-command><br />
}}<br />
<br />
Replace {{ic|<session-command>}} with the appropriate session command. Some examples of different desktop start commands:<br />
<br />
{{bc|<br />
exec awesome<br />
exec dwm<br />
exec startfluxbox<br />
exec fvwm2<br />
exec gnome-session<br />
exec openbox-session<br />
exec startkde<br />
exec startlxde<br />
exec startxfce4<br />
exec enlightenment_start<br />
}}<br />
<br />
For detailed instructions on how to start the various environments, refer to the appropriate wiki pages.<br />
<br />
SLiM reads the local {{ic|~/.xinitrc}} configuration and then launches the desktop according to what is in that file. If you do not have a {{ic|~/.xinitrc}} file, you can use the skeleton file by:<br />
<br />
$ cp /etc/skel/.xinitrc ~<br />
<br />
Remember to make {{ic|~/.xinitrc}} executable:<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
{{Note|{{pkg|slim}} is ConsoleKit capable since version 1.3.3. Unless you happen to run an old version, you must '''no''' longer include {{ic|ck-launch-session}} in your {{ic|.xinitrc}} or {{ic|slim.conf}} {{ic|login_cmd}}. You should still have {{ic|dbus-launch}} (see [[#SLiM_and_Gnome_Keyring]]) since this gives subprocesses of your session the correct permissions (e.g. to mount something with [[Wikipedia:GVFS|gvfs-mount]], like [[Pcmanfm]] does).}}<br />
<br />
=== Autologin ===<br />
<br />
To make SLiM automatically login as a specified user (without having to type a password) the following lines in {{ic|/etc/slim.conf}} should be changed.<br />
# default_user simone<br />
<br />
Uncomment this line, and change "simone" to the user to be logged into automatically.<br />
<br />
# auto_login no<br />
<br />
Uncomment this line and change the 'no' to 'yes'. This enables the auto login feature.<br />
<br />
=== Zsh ===<br />
<br />
The default login command will not initialize your environment correctly [http://www.edsel.nu/2010/06/04/slim-simple-login-manager-on-freebsd/ [source]]. Change the login_cmd line to:<br />
<br />
#login_cmd exec /bin/sh - ~/.xinitrc %session<br />
login_cmd exec /bin/zsh -l ~/.xinitrc %session<br />
<br />
=== Multiple environments ===<br />
<br />
To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.<br />
<br />
Put a case statement similar to this one in your {{ic|~/.xinitrc}} file and edit the sessions variable in {{ic|/etc/slim.conf}} to match the names that trigger the case statement. You can choose the session at login time by pressing F1. Note that this feature is experimental.<br />
<br />
{{bc|1=<br />
# The following variable defines the session which is started if the user doesn't explicitly select a session<br />
# Source: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample<br />
<br />
DEFAULT_SESSION=twm<br />
<br />
case $1 in<br />
kde)<br />
exec startkde<br />
;;<br />
xfce4)<br />
exec startxfce4<br />
;;<br />
icewm)<br />
icewmbg &<br />
icewmtray &<br />
exec icewm<br />
;;<br />
wmaker)<br />
exec wmaker<br />
;;<br />
blackbox)<br />
exec blackbox<br />
;;<br />
*)<br />
exec $DEFAULT_SESSION<br />
;;<br />
esac<br />
}}<br />
<br />
Note that, in this script, the default option simply executes, e.g., exec icewm (if that is the default session), without icewmbg and icewmtray. You may want simply to repeat everything you've put under, e.g., icewm) again under *). When done use F1 to cycle through sessions in SLiM.<br />
<br />
=== Themes ===<br />
<br />
Install the {{Pkg|slim-themes}} package:<br />
<br />
# pacman -S slim-themes archlinux-themes-slim<br />
<br />
The {{Pkg|archlinux-themes-slim}} packages contains several different themes. Look in the directory of {{ic|/usr/share/slim/themes}} to see the themes available. Enter the theme name on the {{ic|current_theme}} line in {{ic|/etc/slim.conf}}:<br />
<br />
#current_theme default<br />
current_theme archlinux-simplyblack<br />
<br />
To preview a theme run while an instance of the Xorg server is running by:<br />
<br />
$ slim -p /usr/share/slim/themes/<theme name><br />
<br />
To close, type "exit" in the Login line and press Enter.<br />
<br />
Additional theme packages can be found in the [[AUR]].<br />
<br />
==== Dual screen setup ====<br />
<br />
You can customize the slim theme in {{ic|/usr/share/slim/themes/<your-theme>/slim.theme}} to turn these percents values. The box itself is 450 pixels by 250 pixels:<br />
<br />
input_panel_x 50%<br />
input_panel_y 50%<br />
<br />
into pixels values:<br />
<br />
# These settings set the "archlinux-simplyblack" panel in the center of a 1440x900 screen<br />
input_panel_x 495<br />
input_panel_y 325<br />
<br />
# These settings set the "archlinux-retro" panel in the center of a 1680x1050 screen<br />
input_panel_x 615<br />
input_panel_y 400<br />
<br />
If your theme has a background picture you should use the background_style setting ('stretch', 'tile', 'center' or 'color') to get it correctly displayed. Have a look at the [http://slim.berlios.de/themes_howto.php very simple and clear official documentation about slim themes] for further details.<br />
<br />
== Other options ==<br />
<br />
A few things you might like to try.<br />
<br />
=== Changing the cursor ===<br />
<br />
If you want to change the default X cursor to a newer design, the {{AUR|slim-cursor}} package is available.<br />
<br />
After installing, edit {{ic|/etc/slim.conf}} and uncomment the line:<br />
<br />
cursor left_ptr<br />
<br />
This will give you a normal arrow instead. This setting is forwarded to {{ic|xsetroot -cursor_name}}. You can look up the possible cursor names [http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/lib/X11/cursorfont.h?rev=HEAD&content-type=text/plain here] or in {{ic|/usr/share/icons/<your-cursor-theme>/cursors/}}.<br />
<br />
To change the cursor theme being used at the login screen, make a file named {{ic|/usr/share/icons/default/index.theme}} with this content:<br />
<br />
[Icon Theme]<br />
Inherits=<your-cursor-theme><br />
<br />
Replace <your-cursor-theme> with the name of the cursor theme you want to use (e.g. whiteglass).<br />
<br />
=== Match SLiM and Desktop Wallpaper ===<br />
<br />
To share a wallpaper between SLiM and your desktop, rename the used theme background, then create a link from your desktop wallpaper file to the default SLiM theme:<br />
<br />
# mv /usr/share/slim/themes/default/background.jpg{,.bck}<br />
# ln -s /path/to/mywallpaper.jpg /usr/share/slim/themes/default/background.jpg<br />
<br />
=== Shutdown, reboot, suspend, exit, launch terminal from SLiM ===<br />
<br />
You may shutdown, reboot, suspend, exit or even launch a terminal from the SLiM login screen. To do so, use the values in the username field, and the root password in the password field:<br />
<br />
* To launch a terminal, enter '''console''' as the username (defaults to xterm which must be installed separately... edit {{ic|/etc/slim.conf}} to change terminal preference)<br />
* For shutdown, enter '''halt''' as the username<br />
* For reboot, enter '''reboot''' as the username<br />
* To exit to bash, enter '''exit''' as the username<br />
* For suspend, enter '''suspend''' as the username (suspend is disabled by default, edit {{ic|/etc/slim.conf}} as root to uncomment the {{ic|suspend_cmd}} line and, if necessary modify the suspend command itself (e.g. change {{ic|/usr/sbin/suspend}} to {{ic|sudo /usr/sbin/pm-suspend}}))<br />
<br />
=== SLiM init error with rc.d daemon ===<br />
<br />
If you initialize SLiM with {{ic|/etc/rc.conf}} inside the DAEMONS array and it fails to initialize it's most likely a lock file issue. SLiM creates a lock file in {{ic|/var/lock}} on each initialization, however, in most cases the lock folder in {{ic|/var}} does not exist preventing SLiM from initializing. Check to make sure {{ic|/var/lock}} exists, if it does not you can create it by typing the following:<br />
<br />
# mkdir /var/lock/<br />
<br />
=== Power-off error with Splashy ===<br />
<br />
If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your {{ic|/etc/slim.conf}} and {{ic|/etc/splash.conf}}; set the {{ic|1=DEFAULT_TTY=7}} same as {{ic|xserver_arguments vt07}}.<br />
<br />
=== Power-off tray icon fails ===<br />
<br />
If your power off tray icon fails, it could be due to not having root privileges. To start a tray icon with root privileges, be sure to have SLiM start the program. Edit {{ic|/etc/slim.conf}} as follows:<br />
sessionstart_cmd /path/to/tray/icon/program &<br />
<br />
=== Login information with SLiM ===<br />
<br />
By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your {{ic|slim.conf}} as follows:<br />
<br />
sessionstart_cmd /usr/bin/sessreg -a -l $DISPLAY %user<br />
sessionstop_cmd /usr/bin/sessreg -d -l $DISPLAY %user<br />
<br />
=== Custom SLiM Login Commands ===<br />
<br />
You can also use the sessionstart_cmd/sessionstop_cmd in {{ic|/etc/slim.conf}} to log specific infomation, such as the session, user, or theme used by slim:<br />
<br />
sessionstop_cmd /usr/bin/logger -i -t ASKAPACHE "(sessionstop_cmd: u:%user s:%session t:%theme)"<br />
sessionstart_cmd /usr/bin/logger -i -t ASKAPACHE "(sessionstart_cmd: u:%user s:%session t:%theme)"<br />
<br />
Or if you want to play a song when slim loads (and you have the beep program installed)<br />
<br />
sessionstart_cmd /usr/bin/beep -f 659 -l 460 -n -f 784 -l 340 -n -f 659 -l 230 -n -f 659 -l 110<br />
<br />
=== SLiM and Gnome Keyring ===<br />
If you are using SLiM to launch a Gnome session and have trouble accessing your keyring, for example not being automatically authenticated on login, add the following lines to {{ic|/etc/pam.d/slim}} (as discussed [http://bugs.archlinux.org/task/18637 here]).<br />
auth optional pam_gnome_keyring.so<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
You also have to add to {{ic|/etc/pam.d/passwd}}:<br />
password optional pam_gnome_keyring.so<br />
<br />
If you use a screensaver you also have to add <br />
auth optional pam_gnome_keyring.so<br />
to {{ic|/etc/pam.d/gnome-screensaver}} for example (replace {{ic|gnome-screensaver}} with {{ic|slimlock}}, {{ic|slock}}, whatever you use). If you don't do that, your keyring is locked when screen is locked by your screensaver and not unlocked again after logging back in.<br />
<br />
However, this fix alone no longer works since Gnome 2.30. Further changes are necessary as described [http://bugs.archlinux.org/task/18930 here]. Modifying the {{ic|login_cmd}} line in {{ic|/etc/slim.conf}}:<br />
login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
<br />
As of GNOME 3, simply adding {{ic|dbus-launch}} after {{ic|ck-launch-session}} will work, without needing to edit {{ic|/etc/pam.d/slim}}.<br />
<br />
As of GNOME 3.1, you need to add {{ic|dbus-launch}} after {{ic|ck-launch-session}} and edit {{ic|<nowiki>/etc/pam.d/{slim,passwd}</nowiki>}}, otherwise the keyring will not be automatically unlocked. I never tried it on 3.0, so maybe the above information about GNOME 3 is wrong.<br />
<br />
As of GNOME 3.4, you need to edit {{ic|<nowiki>/etc/pam.d/{slim,passwd}</nowiki>}} as mentioned above, so that {{ic|<nowiki>/etc/pam.d/slim</nowiki>}} looks like:<br />
#%PAM-1.0<br />
auth requisite pam_nologin.so<br />
auth required pam_env.so<br />
auth required pam_unix.so<br />
auth optional pam_gnome_keyring.so<br />
account required pam_unix.so<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
session optional pam_gnome_keyring.so auto_start<br />
password required pam_unix.so<br />
and {{ic|<nowiki>/etc/pam.d/passwd</nowiki>}}<br />
#%PAM-1.0<br />
password required pam_unix.so sha512 shadow nullok<br />
password optional pam_gnome_keyring.so<br />
The correct positioning of the {{ic|<nowiki>pam_gnome_keyring.so</nowiki>}} instructions were taken from [http://live.gnome.org/GnomeKeyring/Pam here]. As of 2012-10-13, {{ic|<nowiki>/etc/pam.d/gnome-screensaver</nowiki>}} already contains the {{ic|<nowiki>pam_gnome_keyring.so</nowiki>}} instruction.<br />
<br />
After editing the above files, you need to edit {{ic|<nowiki>/etc/inittab</nowiki>}}. The above mentioned code<br />
login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
will work, but when you try to power off or reboot the system from GNOME menu it will drop you into the SLiM screen. To solve this problem, use the code bellow<br />
login_cmd exec dbus-launch --exit-with-session /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
{{ic|<nowiki>ck-launch-session</nowiki>}} is no longer necessary as stated [https://bbs.archlinux.org/viewtopic.php?pid=1099742#p1099742 here].<br />
<br />
The solutions mentioned here and also further information are found [http://live.gnome.org/GnomeKeyring/Pam here].<br />
<br />
If you have problems keeping the keyring unlocked for longer sessions, there is another thing that Gnome does: <br />
Look at {{ic|<nowiki>/etc/xdg/autostart/{gnome-keyring-gpg.desktop, gnome-keyring-pkcs11.desktop, gnome-keyring-secrets.desktop, gnome-keyring-ssh.desktop}</nowiki>}}. <br />
<br />
Append the following lines to .xinitrc just before you start your wm (example here is awesome wm):<br />
/usr/bin/gnome-keyring-daemon --start --components=gpg<br />
/usr/bin/gnome-keyring-daemon --start --components=pkcs11<br />
/usr/bin/gnome-keyring-daemon --start --components=secrets<br />
/usr/bin/gnome-keyring-daemon --start --components=ssh<br />
/usr/bin/awesome<br />
<br />
After login check if there is only one gnome-keyring-daemon instance running ({{ic|ps -A | grep gnome}}). If those lines are executed too early then you have 4 instances running which is not good.<br />
<br />
You also should notice that seahorse for example does not show any pkcs11 errors anymore and that your keyring is unlocked all the time and does not lock itself anymore. Finally {{pkg|gnome-keyring}} is fully functional like in Gnome. See also [https://bbs.archlinux.org/viewtopic.php?pid=1019845#p1019845 here].<br />
<br />
=== SLiM and Environment Variables ===<br />
{{Out of date|{{ic|/etc/pam.d/slim}} no longer has the given lines. This problem may also have been fixed.}}<br />
<br />
If you have trouble with environment variables changing after a session is started, one cause could be the module {{ic|pam_env.so}}, by default, reads the file {{ic|/etc/environment}} and sets up the environment accordingly.<br />
<br />
For example: I use SLiM, which fires up a XFCE4 session upon valid authentication. When this is done my terminal ({{ic|xfterm4}}) can't print Unicode characters ({{ic|LC_*}} environment variables has been defaulted/altered to {{ic|POSIX}}). But when I start XFCE4 manually, like so: {{ic|startxfce4}}, Unicode characters on my terminal works fine.<br />
<br />
This can be fixed by adding this to {{ic|/etc/environment}} or your user specific file: {{ic|$HOME/.pam_environment}}:<br />
# You can change these to fit your preference, of course.<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
Alternatively, you can modify the line in {{ic|/etc/pam.d/slim}} from:<br />
{{bc|session required pam_env.so}}<br />
To:<br />
{{bc|1=session required pam_env.so envfile=<yourfile>}}<br />
Where {{ic|<yourfile>}} is the name of the file you want PAM to recognize as your default environment file, when starting a new session from SLiM.<br />
<br />
=== Setting DPI with SLiM ===<br />
<br />
The Xorg server generally picks up the DPI but if it doesn't you can specify it to SLiM. If you set the DPI with the argument -dpi 96 in {{ic|/etc/X11/xinit/xserverrc}} it will not work with SLiM. To fix this change your {{ic|slim.conf}} from:<br />
<br />
xserver_arguments -nolisten tcp vt07 <br />
<br />
to<br />
<br />
xserver_arguments -nolisten tcp vt07 -dpi 96<br />
<br />
=== Use a random theme ===<br />
<br />
Use the {{ic|current_theme}} variable as a comma separated list to specify a set from which to choose. Selection is random.<br />
<br />
===Move the whole session to another VT===<br />
Lets say you have commented out tty terminals 3-6 as you may not use them. (You may use screen and therefore only need one terminal)<br />
So, to move the X-Server you need to change one number in the {{ic|/etc/slim.conf}} file. Just a few lines down you should see:<br />
xserver_arguments -nolisten tcp vt07<br />
<br />
Simply change the vt07 to lets say vt03 as there is no agetty started there.<br />
<br />
=== Automatically mount your encrypted /home on login ===<br />
<br />
You can use [[Pam_mount#Slim|pam_mount]].<br />
<br />
== All Slim Options ==<br />
Here is a list of all the slim configuration options and their default values.<br />
<br />
{{Note|welcome_msg allows 2 variables '''%host''' and '''%domain'''<br>sessionstart_cmd allows '''%user''' ''(execd right before login_cmd)'' and it is also allowed in sessionstop_cmd<br>login_cmd allows '''%session''' and '''%theme'''}}<br />
<br />
{| class="wikitable collapsible collapsable collapsed"<br />
|-<br />
! Option Name || Default Value<br />
|-<br />
| default_path ||{{ic|/bin:/usr/bin:/usr/local/bin}}<br />
|-<br />
| default_xserver ||{{ic|/usr/bin/X}}<br />
|-<br />
| xserver_arguments ||{{ic|vt07 -auth /var/run/slim.auth}}<br />
|-<br />
| numlock ||<br />
|-<br />
| daemon || {{ic|yes}}<br />
|-<br />
| xauth_path ||{{ic|/usr/bin/xauth}}<br />
|-<br />
| login_cmd ||{{ic|exec /bin/bash -login ~/.xinitrc %session}}<br />
|-<br />
| halt_cmd ||{{ic|/sbin/shutdown -h now}}<br />
|-<br />
| reboot_cmd ||{{ic|/sbin/shutdown -r now}}<br />
|-<br />
| suspend_cmd ||<br />
|-<br />
| sessionstart_cmd ||<br />
|-<br />
| sessionstop_cmd ||<br />
|-<br />
| console_cmd ||{{ic|/usr/bin/xterm -C -fg white -bg black +sb -g %dx%d+%d+%d -fn %dx%d -T }}<br />
|-<br />
| screenshot_cmd ||{{ic|import -window root /slim.png}}<br />
|-<br />
| welcome_msg ||{{ic|Welcome to %host}}<br />
|-<br />
| session_msg ||{{ic|Session:}}<br />
|-<br />
| default_user ||<br />
|-<br />
| focus_password ||{{ic|no}}<br />
|-<br />
| auto_login ||{{ic|no}}<br />
|-<br />
| current_theme ||{{ic|default}}<br />
|-<br />
| lockfile ||{{ic|/var/run/slim.lock}}<br />
|-<br />
| logfile ||{{ic|/var/log/slim.log}}<br />
|-<br />
| authfile ||{{ic|/var/run/slim.auth}}<br />
|-<br />
| shutdown_msg ||{{ic|The system is halting...}}<br />
|-<br />
| reboot_msg ||{{ic|The system is rebooting...}}<br />
|-<br />
| sessions ||{{ic|wmaker,blackbox,icewm}}<br />
|-<br />
| sessiondir ||<br />
|-<br />
| hidecursor ||{{ic|false}}<br />
|-<br />
| input_panel_x ||{{ic|50%}}<br />
|-<br />
| input_panel_y ||{{ic|40%}}<br />
|-<br />
| input_name_x ||{{ic|200}}<br />
|-<br />
| input_name_y ||{{ic|154}}<br />
|-<br />
| input_pass_x ||{{ic|-1}}<br />
|-<br />
| input_pass_y ||{{ic|-1}}<br />
|-<br />
| input_font ||{{ic|1=Verdana:size=11}}<br />
|-<br />
| input_color ||{{ic|#000000}}<br />
|-<br />
| input_cursor_height ||{{ic|20}}<br />
|-<br />
| input_maxlength_name ||{{ic|20}}<br />
|-<br />
| input_maxlength_passwd ||{{ic|20}}<br />
|-<br />
| input_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| input_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| input_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| welcome_font ||{{ic|1=Verdana:size=14}}<br />
|-<br />
| welcome_color ||{{ic|#FFFFFF}}<br />
|-<br />
| welcome_x ||{{ic|-1}}<br />
|-<br />
| welcome_y ||{{ic|-1}}<br />
|-<br />
| welcome_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| welcome_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| welcome_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| intro_msg ||<br />
|-<br />
| intro_font ||{{ic|1=Verdana:size=14}}<br />
|-<br />
| intro_color ||{{ic|#FFFFFF}}<br />
|-<br />
| intro_x ||{{ic|-1}}<br />
|-<br />
| intro_y ||{{ic|-1}}<br />
|-<br />
| background_style ||{{ic|stretch}}<br />
|-<br />
| background_color ||{{ic|#CCCCCC}}<br />
|-<br />
| username_font ||{{ic|1=Verdana:size=12}}<br />
|-<br />
| username_color ||{{ic|#FFFFFF}}<br />
|-<br />
| username_x ||{{ic|-1}}<br />
|-<br />
| username_y ||{{ic|-1}}<br />
|-<br />
| username_msg ||{{ic|Please enter your username}}<br />
|-<br />
| username_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| username_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| username_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| password_x ||{{ic|-1}}<br />
|-<br />
| password_y ||{{ic|-1}}<br />
|-<br />
| password_msg ||{{ic|Please enter your password}}<br />
|-<br />
| msg_color ||{{ic|#FFFFFF}}<br />
|-<br />
| msg_font ||{{ic|1=Verdana:size=16:bold}}<br />
|-<br />
| msg_x ||{{ic|40}}<br />
|-<br />
| msg_y ||{{ic|40}}<br />
|-<br />
| msg_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| msg_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| msg_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| session_color ||{{ic|#FFFFFF}}<br />
|-<br />
| session_font ||{{ic|1=Verdana:size=16:bold}}<br />
|-<br />
| session_x ||{{ic|50%}}<br />
|-<br />
| session_y ||{{ic|90%}}<br />
|-<br />
| session_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| session_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| session_shadow_color ||{{ic|#FFFFFF}}<br />
|}<br />
<br />
== See also ==<br />
<br />
* [http://slim.berlios.de/ SLiM homepage]<br />
* [http://slim.berlios.de/manual.php SLiM documentation]</div>Rezlamhttps://wiki.archlinux.org/index.php?title=SLiM&diff=228524SLiM2012-10-14T00:18:09Z<p>Rezlam: /* SLiM and Gnome Keyring */</p>
<hr />
<div>[[Category:Display managers]]<br />
[[cs:SLiM]]<br />
[[es:SLiM]]<br />
[[fr:SLiM]]<br />
[[hu:SLiM]]<br />
[[it:SLiM]]<br />
[[ko:SLiM]]<br />
[[pt:SLiM]]<br />
[[ru:SLiM]]<br />
[[sk:SLiM]]<br />
[[tr:SLiM]]<br />
[[zh-CN:SLiM]]<br />
[[zh-TW:SLiM]]<br />
{{Article summary start}}<br />
{{Article summary text|Provides an overview of the Simple Login Manager.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Display Manager}}<br />
{{Article summary end}}<br />
<br />
[http://slim.berlios.de/ SLiM] is an acronym for Simple Login Manager. SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of [[GNOME]] or [[KDE]] and can help make a lighter system for users that like to use lightweight desktops like [[Xfce]], [[Openbox]], and [[Fluxbox]].<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{pkg|slim}} from the [[official repositories]].<br />
<br />
== Configuration ==<br />
<br />
=== Enabling SLiM ===<br />
<br />
SLiM can be loaded on startup by modifying {{ic|/etc/inittab}}: see [[Display Manager#Loading the display manager]] for detailed instructions. If you use [[systemd]], just enable {{ic|slim.service}}. [[Dbus]] appears to be required since version 1.3.3 of SLiM.<br />
<br />
=== Single environments ===<br />
<br />
To configure SLiM to load a particular environment, edit your {{ic|~/.xinitrc}} to load your desktop environment:<br />
<br />
{{bc|<br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
exec <session-command><br />
}}<br />
<br />
Replace {{ic|<session-command>}} with the appropriate session command. Some examples of different desktop start commands:<br />
<br />
{{bc|<br />
exec awesome<br />
exec dwm<br />
exec startfluxbox<br />
exec fvwm2<br />
exec gnome-session<br />
exec openbox-session<br />
exec startkde<br />
exec startlxde<br />
exec startxfce4<br />
exec enlightenment_start<br />
}}<br />
<br />
For detailed instructions on how to start the various environments, refer to the appropriate wiki pages.<br />
<br />
SLiM reads the local {{ic|~/.xinitrc}} configuration and then launches the desktop according to what is in that file. If you do not have a {{ic|~/.xinitrc}} file, you can use the skeleton file by:<br />
<br />
$ cp /etc/skel/.xinitrc ~<br />
<br />
Remember to make {{ic|~/.xinitrc}} executable:<br />
<br />
chmod +x ~/.xinitrc<br />
<br />
{{Note|{{pkg|slim}} is ConsoleKit capable since version 1.3.3. Unless you happen to run an old version, you must '''no''' longer include {{ic|ck-launch-session}} in your {{ic|.xinitrc}} or {{ic|slim.conf}} {{ic|login_cmd}}. You should still have {{ic|dbus-launch}} (see [[#SLiM_and_Gnome_Keyring]]) since this gives subprocesses of your session the correct permissions (e.g. to mount something with [[Wikipedia:GVFS|gvfs-mount]], like [[Pcmanfm]] does).}}<br />
<br />
=== Autologin ===<br />
<br />
To make SLiM automatically login as a specified user (without having to type a password) the following lines in {{ic|/etc/slim.conf}} should be changed.<br />
# default_user simone<br />
<br />
Uncomment this line, and change "simone" to the user to be logged into automatically.<br />
<br />
# auto_login no<br />
<br />
Uncomment this line and change the 'no' to 'yes'. This enables the auto login feature.<br />
<br />
=== Zsh ===<br />
<br />
The default login command will not initialize your environment correctly [http://www.edsel.nu/2010/06/04/slim-simple-login-manager-on-freebsd/ [source]]. Change the login_cmd line to:<br />
<br />
#login_cmd exec /bin/sh - ~/.xinitrc %session<br />
login_cmd exec /bin/zsh -l ~/.xinitrc %session<br />
<br />
=== Multiple environments ===<br />
<br />
To be able to choose from multiple desktop environments, SLiM can be setup to log you into whichever you choose.<br />
<br />
Put a case statement similar to this one in your {{ic|~/.xinitrc}} file and edit the sessions variable in {{ic|/etc/slim.conf}} to match the names that trigger the case statement. You can choose the session at login time by pressing F1. Note that this feature is experimental.<br />
<br />
{{bc|1=<br />
# The following variable defines the session which is started if the user doesn't explicitly select a session<br />
# Source: http://svn.berlios.de/svnroot/repos/slim/trunk/xinitrc.sample<br />
<br />
DEFAULT_SESSION=twm<br />
<br />
case $1 in<br />
kde)<br />
exec startkde<br />
;;<br />
xfce4)<br />
exec startxfce4<br />
;;<br />
icewm)<br />
icewmbg &<br />
icewmtray &<br />
exec icewm<br />
;;<br />
wmaker)<br />
exec wmaker<br />
;;<br />
blackbox)<br />
exec blackbox<br />
;;<br />
*)<br />
exec $DEFAULT_SESSION<br />
;;<br />
esac<br />
}}<br />
<br />
Note that, in this script, the default option simply executes, e.g., exec icewm (if that is the default session), without icewmbg and icewmtray. You may want simply to repeat everything you've put under, e.g., icewm) again under *). When done use F1 to cycle through sessions in SLiM.<br />
<br />
=== Themes ===<br />
<br />
Install the {{Pkg|slim-themes}} package:<br />
<br />
# pacman -S slim-themes archlinux-themes-slim<br />
<br />
The {{Pkg|archlinux-themes-slim}} packages contains several different themes. Look in the directory of {{ic|/usr/share/slim/themes}} to see the themes available. Enter the theme name on the {{ic|current_theme}} line in {{ic|/etc/slim.conf}}:<br />
<br />
#current_theme default<br />
current_theme archlinux-simplyblack<br />
<br />
To preview a theme run while an instance of the Xorg server is running by:<br />
<br />
$ slim -p /usr/share/slim/themes/<theme name><br />
<br />
To close, type "exit" in the Login line and press Enter.<br />
<br />
Additional theme packages can be found in the [[AUR]].<br />
<br />
==== Dual screen setup ====<br />
<br />
You can customize the slim theme in {{ic|/usr/share/slim/themes/<your-theme>/slim.theme}} to turn these percents values. The box itself is 450 pixels by 250 pixels:<br />
<br />
input_panel_x 50%<br />
input_panel_y 50%<br />
<br />
into pixels values:<br />
<br />
# These settings set the "archlinux-simplyblack" panel in the center of a 1440x900 screen<br />
input_panel_x 495<br />
input_panel_y 325<br />
<br />
# These settings set the "archlinux-retro" panel in the center of a 1680x1050 screen<br />
input_panel_x 615<br />
input_panel_y 400<br />
<br />
If your theme has a background picture you should use the background_style setting ('stretch', 'tile', 'center' or 'color') to get it correctly displayed. Have a look at the [http://slim.berlios.de/themes_howto.php very simple and clear official documentation about slim themes] for further details.<br />
<br />
== Other options ==<br />
<br />
A few things you might like to try.<br />
<br />
=== Changing the cursor ===<br />
<br />
If you want to change the default X cursor to a newer design, the {{AUR|slim-cursor}} package is available.<br />
<br />
After installing, edit {{ic|/etc/slim.conf}} and uncomment the line:<br />
<br />
cursor left_ptr<br />
<br />
This will give you a normal arrow instead. This setting is forwarded to {{ic|xsetroot -cursor_name}}. You can look up the possible cursor names [http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/lib/X11/cursorfont.h?rev=HEAD&content-type=text/plain here] or in {{ic|/usr/share/icons/<your-cursor-theme>/cursors/}}.<br />
<br />
To change the cursor theme being used at the login screen, make a file named {{ic|/usr/share/icons/default/index.theme}} with this content:<br />
<br />
[Icon Theme]<br />
Inherits=<your-cursor-theme><br />
<br />
Replace <your-cursor-theme> with the name of the cursor theme you want to use (e.g. whiteglass).<br />
<br />
=== Match SLiM and Desktop Wallpaper ===<br />
<br />
To share a wallpaper between SLiM and your desktop, rename the used theme background, then create a link from your desktop wallpaper file to the default SLiM theme:<br />
<br />
# mv /usr/share/slim/themes/default/background.jpg{,.bck}<br />
# ln -s /path/to/mywallpaper.jpg /usr/share/slim/themes/default/background.jpg<br />
<br />
=== Shutdown, reboot, suspend, exit, launch terminal from SLiM ===<br />
<br />
You may shutdown, reboot, suspend, exit or even launch a terminal from the SLiM login screen. To do so, use the values in the username field, and the root password in the password field:<br />
<br />
* To launch a terminal, enter '''console''' as the username (defaults to xterm which must be installed separately... edit {{ic|/etc/slim.conf}} to change terminal preference)<br />
* For shutdown, enter '''halt''' as the username<br />
* For reboot, enter '''reboot''' as the username<br />
* To exit to bash, enter '''exit''' as the username<br />
* For suspend, enter '''suspend''' as the username (suspend is disabled by default, edit {{ic|/etc/slim.conf}} as root to uncomment the {{ic|suspend_cmd}} line and, if necessary modify the suspend command itself (e.g. change {{ic|/usr/sbin/suspend}} to {{ic|sudo /usr/sbin/pm-suspend}}))<br />
<br />
=== SLiM init error with rc.d daemon ===<br />
<br />
If you initialize SLiM with {{ic|/etc/rc.conf}} inside the DAEMONS array and it fails to initialize it's most likely a lock file issue. SLiM creates a lock file in {{ic|/var/lock}} on each initialization, however, in most cases the lock folder in {{ic|/var}} does not exist preventing SLiM from initializing. Check to make sure {{ic|/var/lock}} exists, if it does not you can create it by typing the following:<br />
<br />
# mkdir /var/lock/<br />
<br />
=== Power-off error with Splashy ===<br />
<br />
If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your {{ic|/etc/slim.conf}} and {{ic|/etc/splash.conf}}; set the {{ic|1=DEFAULT_TTY=7}} same as {{ic|xserver_arguments vt07}}.<br />
<br />
=== Power-off tray icon fails ===<br />
<br />
If your power off tray icon fails, it could be due to not having root privileges. To start a tray icon with root privileges, be sure to have SLiM start the program. Edit {{ic|/etc/slim.conf}} as follows:<br />
sessionstart_cmd /path/to/tray/icon/program &<br />
<br />
=== Login information with SLiM ===<br />
<br />
By default, SLiM fails to log logins to utmp and wtmp which causes who, last, etc. to misreport login information. To fix this edit your {{ic|slim.conf}} as follows:<br />
<br />
sessionstart_cmd /usr/bin/sessreg -a -l $DISPLAY %user<br />
sessionstop_cmd /usr/bin/sessreg -d -l $DISPLAY %user<br />
<br />
=== Custom SLiM Login Commands ===<br />
<br />
You can also use the sessionstart_cmd/sessionstop_cmd in {{ic|/etc/slim.conf}} to log specific infomation, such as the session, user, or theme used by slim:<br />
<br />
sessionstop_cmd /usr/bin/logger -i -t ASKAPACHE "(sessionstop_cmd: u:%user s:%session t:%theme)"<br />
sessionstart_cmd /usr/bin/logger -i -t ASKAPACHE "(sessionstart_cmd: u:%user s:%session t:%theme)"<br />
<br />
Or if you want to play a song when slim loads (and you have the beep program installed)<br />
<br />
sessionstart_cmd /usr/bin/beep -f 659 -l 460 -n -f 784 -l 340 -n -f 659 -l 230 -n -f 659 -l 110<br />
<br />
=== SLiM and Gnome Keyring ===<br />
If you are using SLiM to launch a Gnome session and have trouble accessing your keyring, for example not being automatically authenticated on login, add the following lines to {{ic|/etc/pam.d/slim}} (as discussed [http://bugs.archlinux.org/task/18637 here]).<br />
auth optional pam_gnome_keyring.so<br />
session optional pam_gnome_keyring.so auto_start<br />
<br />
You also have to add to {{ic|/etc/pam.d/passwd}}:<br />
password optional pam_gnome_keyring.so<br />
<br />
If you use a screensaver you also have to add <br />
auth optional pam_gnome_keyring.so<br />
to {{ic|/etc/pam.d/gnome-screensaver}} for example (replace {{ic|gnome-screensaver}} with {{ic|slimlock}}, {{ic|slock}}, whatever you use). If you don't do that, your keyring is locked when screen is locked by your screensaver and not unlocked again after logging back in.<br />
<br />
However, this fix alone no longer works since Gnome 2.30. Further changes are necessary as described [http://bugs.archlinux.org/task/18930 here]. Modifying the {{ic|login_cmd}} line in {{ic|/etc/slim.conf}}:<br />
login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
<br />
As of GNOME 3, simply adding {{ic|dbus-launch}} after {{ic|ck-launch-session}} will work, without needing to edit {{ic|/etc/pam.d/slim}}.<br />
<br />
As of GNOME 3.1, you need to add {{ic|dbus-launch}} after {{ic|ck-launch-session}} and edit {{ic|<nowiki>/etc/pam.d/{slim,passwd}</nowiki>}}, otherwise the keyring will not be automatically unlocked. I never tried it on 3.0, so maybe the above information about GNOME 3 is wrong.<br />
<br />
As of GNOME 3.4, you need to edit {{ic|<nowiki>/etc/pam.d/{slim,passwd}</nowiki>}} as mentioned above, so that {{ic|<nowiki>/etc/pam.d/slim</nowiki>}} looks like:<br />
#%PAM-1.0<br />
auth requisite pam_nologin.so<br />
auth required pam_env.so<br />
auth required pam_unix.so<br />
auth optional pam_gnome_keyring.so<br />
account required pam_unix.so<br />
session required pam_limits.so<br />
session required pam_unix.so<br />
session optional pam_gnome_keyring.so auto_start<br />
password required pam_unix.so<br />
and {{ic|<nowiki>/etc/pam.d/passwd</nowiki>}}<br />
#%PAM-1.0<br />
password required pam_unix.so sha512 shadow nullok<br />
password optional pam_gnome_keyring.so<br />
The correct positioning of the {{ic|<nowiki>pam_gnome_keyring.so</nowiki>}} instructions were taken from [http://live.gnome.org/GnomeKeyring/Pam here]. As of 2012-10-13, {{ic|<nowiki>/etc/pam.d/gnome-screensaver</nowiki>}} already contains the {{ic|<nowiki>pam_gnome_keyring.so</nowiki>}} instruction.<br />
<br />
After editing the above files, you need to edit {{ic|<nowiki>/etc/inittab</nowiki>}}. The above mentioned code<br />
login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
will work, but when you try to power off or reboot the system from GNOME menu it will drop you into the SLiM screen. To solve this problem, use the code bellow<br />
login_cmd exec dbus-launch --exit-with-session /bin/bash -login ~/.xinitrc %session >~/.xsession-errors 2>&1<br />
{{ic|<nowiki>ck-launch-session</nowiki>}} is no longer necessary.<br />
<br />
The solutions mentioned here and also further information are found [http://live.gnome.org/GnomeKeyring/Pam here].<br />
<br />
If you have problems keeping the keyring unlocked for longer sessions, there is another thing that Gnome does: <br />
Look at {{ic|<nowiki>/etc/xdg/autostart/{gnome-keyring-gpg.desktop, gnome-keyring-pkcs11.desktop, gnome-keyring-secrets.desktop, gnome-keyring-ssh.desktop}</nowiki>}}. <br />
<br />
Append the following lines to .xinitrc just before you start your wm (example here is awesome wm):<br />
/usr/bin/gnome-keyring-daemon --start --components=gpg<br />
/usr/bin/gnome-keyring-daemon --start --components=pkcs11<br />
/usr/bin/gnome-keyring-daemon --start --components=secrets<br />
/usr/bin/gnome-keyring-daemon --start --components=ssh<br />
/usr/bin/awesome<br />
<br />
After login check if there is only one gnome-keyring-daemon instance running ({{ic|ps -A | grep gnome}}). If those lines are executed too early then you have 4 instances running which is not good.<br />
<br />
You also should notice that seahorse for example does not show any pkcs11 errors anymore and that your keyring is unlocked all the time and does not lock itself anymore. Finally {{pkg|gnome-keyring}} is fully functional like in Gnome. See also [https://bbs.archlinux.org/viewtopic.php?pid=1019845#p1019845 here].<br />
<br />
=== SLiM and Environment Variables ===<br />
{{Out of date|{{ic|/etc/pam.d/slim}} no longer has the given lines. This problem may also have been fixed.}}<br />
<br />
If you have trouble with environment variables changing after a session is started, one cause could be the module {{ic|pam_env.so}}, by default, reads the file {{ic|/etc/environment}} and sets up the environment accordingly.<br />
<br />
For example: I use SLiM, which fires up a XFCE4 session upon valid authentication. When this is done my terminal ({{ic|xfterm4}}) can't print Unicode characters ({{ic|LC_*}} environment variables has been defaulted/altered to {{ic|POSIX}}). But when I start XFCE4 manually, like so: {{ic|startxfce4}}, Unicode characters on my terminal works fine.<br />
<br />
This can be fixed by adding this to {{ic|/etc/environment}} or your user specific file: {{ic|$HOME/.pam_environment}}:<br />
# You can change these to fit your preference, of course.<br />
LANG="en_US.UTF-8"<br />
LC_COLLATE="C"<br />
<br />
Alternatively, you can modify the line in {{ic|/etc/pam.d/slim}} from:<br />
{{bc|session required pam_env.so}}<br />
To:<br />
{{bc|1=session required pam_env.so envfile=<yourfile>}}<br />
Where {{ic|<yourfile>}} is the name of the file you want PAM to recognize as your default environment file, when starting a new session from SLiM.<br />
<br />
=== Setting DPI with SLiM ===<br />
<br />
The Xorg server generally picks up the DPI but if it doesn't you can specify it to SLiM. If you set the DPI with the argument -dpi 96 in {{ic|/etc/X11/xinit/xserverrc}} it will not work with SLiM. To fix this change your {{ic|slim.conf}} from:<br />
<br />
xserver_arguments -nolisten tcp vt07 <br />
<br />
to<br />
<br />
xserver_arguments -nolisten tcp vt07 -dpi 96<br />
<br />
=== Use a random theme ===<br />
<br />
Use the {{ic|current_theme}} variable as a comma separated list to specify a set from which to choose. Selection is random.<br />
<br />
===Move the whole session to another VT===<br />
Lets say you have commented out tty terminals 3-6 as you may not use them. (You may use screen and therefore only need one terminal)<br />
So, to move the X-Server you need to change one number in the {{ic|/etc/slim.conf}} file. Just a few lines down you should see:<br />
xserver_arguments -nolisten tcp vt07<br />
<br />
Simply change the vt07 to lets say vt03 as there is no agetty started there.<br />
<br />
=== Automatically mount your encrypted /home on login ===<br />
<br />
You can use [[Pam_mount#Slim|pam_mount]].<br />
<br />
== All Slim Options ==<br />
Here is a list of all the slim configuration options and their default values.<br />
<br />
{{Note|welcome_msg allows 2 variables '''%host''' and '''%domain'''<br>sessionstart_cmd allows '''%user''' ''(execd right before login_cmd)'' and it is also allowed in sessionstop_cmd<br>login_cmd allows '''%session''' and '''%theme'''}}<br />
<br />
{| class="wikitable collapsible collapsable collapsed"<br />
|-<br />
! Option Name || Default Value<br />
|-<br />
| default_path ||{{ic|/bin:/usr/bin:/usr/local/bin}}<br />
|-<br />
| default_xserver ||{{ic|/usr/bin/X}}<br />
|-<br />
| xserver_arguments ||{{ic|vt07 -auth /var/run/slim.auth}}<br />
|-<br />
| numlock ||<br />
|-<br />
| daemon || {{ic|yes}}<br />
|-<br />
| xauth_path ||{{ic|/usr/bin/xauth}}<br />
|-<br />
| login_cmd ||{{ic|exec /bin/bash -login ~/.xinitrc %session}}<br />
|-<br />
| halt_cmd ||{{ic|/sbin/shutdown -h now}}<br />
|-<br />
| reboot_cmd ||{{ic|/sbin/shutdown -r now}}<br />
|-<br />
| suspend_cmd ||<br />
|-<br />
| sessionstart_cmd ||<br />
|-<br />
| sessionstop_cmd ||<br />
|-<br />
| console_cmd ||{{ic|/usr/bin/xterm -C -fg white -bg black +sb -g %dx%d+%d+%d -fn %dx%d -T }}<br />
|-<br />
| screenshot_cmd ||{{ic|import -window root /slim.png}}<br />
|-<br />
| welcome_msg ||{{ic|Welcome to %host}}<br />
|-<br />
| session_msg ||{{ic|Session:}}<br />
|-<br />
| default_user ||<br />
|-<br />
| focus_password ||{{ic|no}}<br />
|-<br />
| auto_login ||{{ic|no}}<br />
|-<br />
| current_theme ||{{ic|default}}<br />
|-<br />
| lockfile ||{{ic|/var/run/slim.lock}}<br />
|-<br />
| logfile ||{{ic|/var/log/slim.log}}<br />
|-<br />
| authfile ||{{ic|/var/run/slim.auth}}<br />
|-<br />
| shutdown_msg ||{{ic|The system is halting...}}<br />
|-<br />
| reboot_msg ||{{ic|The system is rebooting...}}<br />
|-<br />
| sessions ||{{ic|wmaker,blackbox,icewm}}<br />
|-<br />
| sessiondir ||<br />
|-<br />
| hidecursor ||{{ic|false}}<br />
|-<br />
| input_panel_x ||{{ic|50%}}<br />
|-<br />
| input_panel_y ||{{ic|40%}}<br />
|-<br />
| input_name_x ||{{ic|200}}<br />
|-<br />
| input_name_y ||{{ic|154}}<br />
|-<br />
| input_pass_x ||{{ic|-1}}<br />
|-<br />
| input_pass_y ||{{ic|-1}}<br />
|-<br />
| input_font ||{{ic|1=Verdana:size=11}}<br />
|-<br />
| input_color ||{{ic|#000000}}<br />
|-<br />
| input_cursor_height ||{{ic|20}}<br />
|-<br />
| input_maxlength_name ||{{ic|20}}<br />
|-<br />
| input_maxlength_passwd ||{{ic|20}}<br />
|-<br />
| input_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| input_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| input_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| welcome_font ||{{ic|1=Verdana:size=14}}<br />
|-<br />
| welcome_color ||{{ic|#FFFFFF}}<br />
|-<br />
| welcome_x ||{{ic|-1}}<br />
|-<br />
| welcome_y ||{{ic|-1}}<br />
|-<br />
| welcome_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| welcome_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| welcome_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| intro_msg ||<br />
|-<br />
| intro_font ||{{ic|1=Verdana:size=14}}<br />
|-<br />
| intro_color ||{{ic|#FFFFFF}}<br />
|-<br />
| intro_x ||{{ic|-1}}<br />
|-<br />
| intro_y ||{{ic|-1}}<br />
|-<br />
| background_style ||{{ic|stretch}}<br />
|-<br />
| background_color ||{{ic|#CCCCCC}}<br />
|-<br />
| username_font ||{{ic|1=Verdana:size=12}}<br />
|-<br />
| username_color ||{{ic|#FFFFFF}}<br />
|-<br />
| username_x ||{{ic|-1}}<br />
|-<br />
| username_y ||{{ic|-1}}<br />
|-<br />
| username_msg ||{{ic|Please enter your username}}<br />
|-<br />
| username_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| username_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| username_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| password_x ||{{ic|-1}}<br />
|-<br />
| password_y ||{{ic|-1}}<br />
|-<br />
| password_msg ||{{ic|Please enter your password}}<br />
|-<br />
| msg_color ||{{ic|#FFFFFF}}<br />
|-<br />
| msg_font ||{{ic|1=Verdana:size=16:bold}}<br />
|-<br />
| msg_x ||{{ic|40}}<br />
|-<br />
| msg_y ||{{ic|40}}<br />
|-<br />
| msg_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| msg_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| msg_shadow_color ||{{ic|#FFFFFF}}<br />
|-<br />
| session_color ||{{ic|#FFFFFF}}<br />
|-<br />
| session_font ||{{ic|1=Verdana:size=16:bold}}<br />
|-<br />
| session_x ||{{ic|50%}}<br />
|-<br />
| session_y ||{{ic|90%}}<br />
|-<br />
| session_shadow_xoffset ||{{ic|0}}<br />
|-<br />
| session_shadow_yoffset ||{{ic|0}}<br />
|-<br />
| session_shadow_color ||{{ic|#FFFFFF}}<br />
|}<br />
<br />
== See also ==<br />
<br />
* [http://slim.berlios.de/ SLiM homepage]<br />
* [http://slim.berlios.de/manual.php SLiM documentation]</div>Rezlam