{{Article summary text|Provides an overview of the Simple Login Manager.}}

+

{{Related|Display manager}}

−

{{Article summary heading|Related}}

+

{{Related articles end}}

−

{{Article summary wiki|Display Manager}}

+

{{Warning|Currently SLiM is not fully compatible with [[Systemd]], resulting in various problems on a second login. See [[Display manager#Incompatibility with systemd]] for an outline of these problems.}}

−

{{Article summary end}}

+

−

[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]].

+

[http://slim.berlios.de/ SLiM] is an acronym for '''S'''imple '''L'''og'''i'''n '''M'''anager. Lightweight and easily configurable, SLiM requires minimal dependencies, and none from the [[GNOME]] or [[KDE]] desktop environments. It therefore contributes towards a lightweight system for users that also like to use lightweight desktops such as [[Xfce]], [[Openbox]], and [[Fluxbox]].

−

+

−

{{Warning|Currently SLiM is not fully compatible with systemd, which causes various problems on second login. See [[#Incompatibility with systemd]]}}.

+

== Installation ==

== Installation ==

Line 31:

Line 28:

{{Note|SLiM no longer supports a 'default' session where multiple sessions have been enabled. This is most noticable where attempting to log out and back in again to the same session.}}

{{Note|SLiM no longer supports a 'default' session where multiple sessions have been enabled. This is most noticable where attempting to log out and back in again to the same session.}}

−

As of version '''1.3.6-2''', SLiM can automatically detect installed desktop environments and window managers. This is achieved through the use of {{ic|/usr/share/xsessions/}} in {{ic|/etc/slim.conf}}. It will therefore be necessary for those who installed an earlier version of SLiM to amend {{ic|/etc/slim.conf}} and {{ic|~/.xinitrc}}, accordingly.

+

As of version '''1.3.6-2''', SLiM can automatically detect installed desktop environments and window managers. This is achieved through the use of {{ic|sessiondir /usr/share/xsessions/}} in {{ic|/etc/slim.conf}}. It will therefore be necessary for those who installed an earlier version of SLiM to amend {{ic|/etc/slim.conf}} and {{ic|~/.xinitrc}}, accordingly.

−

+

===.xinitrc file ===

−

===.xinirc file ===

+

If you do not have a {{ic|~/.xinitrc}} file, then either create one in your '''Home''' folder using nano or an appropriate text editor (e.g. Leafpad or Geany). Alternatively, you may be able use a skeleton file as a template to work with:

If you do not have a {{ic|~/.xinitrc}} file, then either create one in your '''Home''' folder using nano or an appropriate text editor (e.g. Leafpad or Geany). Alternatively, you may be able use a skeleton file as a template to work with:

Line 40:

Line 36:

$ cp /etc/skel/.xinitrc ~

$ cp /etc/skel/.xinitrc ~

−

Remember to make the {{ic|~/.xinitrc}} file executable:

+

Remember to make the {{ic|~/.xinitrc}} file executable if not already:

chmod +x ~/.xinitrc

chmod +x ~/.xinitrc

−

=== Enabling SLiM ===

=== Enabling SLiM ===

Line 50:

Line 45:

Enter the following command to enable the SLiM [[Daemons|daemon]]: {{ic| systemctl enable slim.service}}. This is assuming that a previously installed and enabled display manager had been disabled first. Otherwise, enter {{ic| systemctl enable slim.service -f}} to simultaneously disable the existing display manager and activate SLiM in its place.

Enter the following command to enable the SLiM [[Daemons|daemon]]: {{ic| systemctl enable slim.service}}. This is assuming that a previously installed and enabled display manager had been disabled first. Otherwise, enter {{ic| systemctl enable slim.service -f}} to simultaneously disable the existing display manager and activate SLiM in its place.

−

=== Single environments ===

=== Single environments ===

+

+

{{tip|Users that have installed a previous version of SLiM can replace {{ic|session}} with a hashed {{ic|sessiondir /usr/share/xsessions/}}}}

To configure SLiM 1.3.6-2 (or later) to load a particular environment, it will be necessary to edit both {{ic|/etc/slim.conf}} and {{ic|~/.xinitrc}}.

To configure SLiM 1.3.6-2 (or later) to load a particular environment, it will be necessary to edit both {{ic|/etc/slim.conf}} and {{ic|~/.xinitrc}}.

−

First, edit {{ic|/etc/slim.conf}} in order to hash out {{ic|/usr/share/xsessions/}}. This will consequently disable automatic detection of installed environments:

+

First, edit {{ic|/etc/slim.conf}} in order to hash out {{ic|sessiondir /usr/share/xsessions/}}. This will consequently disable automatic detection of installed environments:

# Set directory that contains the xsessions.

# Set directory that contains the xsessions.

# slim reads xsesion from this directory, and be able to select.

# slim reads xsesion from this directory, and be able to select.

# sessiondir /usr/share/xsessions/

# sessiondir /usr/share/xsessions/

−

Second, edit your {{ic|~/.xinitrc}} to set the preferred session:

Second, edit your {{ic|~/.xinitrc}} to set the preferred session:

Line 87:

Line 82:

exec startxfce4

exec startxfce4

exec enlightenment_start

exec enlightenment_start

−

+

exec mate-session

For detailed instructions on how to start any desktop environments or window managers not listed above, refer to their wiki articles.

For detailed instructions on how to start any desktop environments or window managers not listed above, refer to their wiki articles.

−

=== Multiple environments ===

=== Multiple environments ===

Line 98:

Line 92:

To be able to choose from multiple desktop environments. It will therefore be necessary to amend {{ic|/etc/slim.conf}} and {{ic|~/.xinitrc}}. This process will also cover SLiM installations prior to 1.3.6-2.

To be able to choose from multiple desktop environments. It will therefore be necessary to amend {{ic|/etc/slim.conf}} and {{ic|~/.xinitrc}}. This process will also cover SLiM installations prior to 1.3.6-2.

−

First, edit {{ic|/etc/slim.conf}} in order to ensure that {{ic|/usr/share/xsessions/}} is present and unhashed:

+

First, edit {{ic|/etc/slim.conf}} in order to ensure that {{ic|sessiondir /usr/share/xsessions/}} is present and unhashed:

# Set directory that contains the xsessions.

# Set directory that contains the xsessions.

# slim reads xsesion from this directory, and be able to select.

# slim reads xsesion from this directory, and be able to select.

−

# sessiondir /usr/share/xsessions/

+

sessiondir /usr/share/xsessions/

−

+

Users who installed a prior version of SLiM will have to replace {{ic|sessions}} with the new command.

Users who installed a prior version of SLiM will have to replace {{ic|sessions}} with the new command.

−

Second, edit {{ic|~/.xinitrc}} so that a selected session is run:

Second, edit {{ic|~/.xinitrc}} so that a selected session is run:

Line 128:

Line 120:

esac

esac

−

+

=== Set default username ===

−

=== Set a default username ===

+

SLiM can be configured to automatically set a desired username, which will therefore aleady be completed. The password field will also already be focused by default. Change the following line in {{ic|/etc/slim.conf}}:

SLiM can be configured to automatically set a desired username, which will therefore aleady be completed. The password field will also already be focused by default. Change the following line in {{ic|/etc/slim.conf}}:

Line 139:

Line 130:

default_user <your username>

default_user <your username>

−

+

=== Enable Autologin ===

−

==== Enable Autologin ====

+

{{Note|It will be necessary to have first set SLiM to use a single desktop environment, as well as a default username.}}

{{Note|It will be necessary to have first set SLiM to use a single desktop environment, as well as a default username.}}

{{Warning|Do '''not''' set this for the '''root''' account.}}

{{Warning|Do '''not''' set this for the '''root''' account.}}

−

Again edit {{ic|/etc/slim.conf}} to uncomment the {{ic|auto_login}} command and replace {{ic|no}} with {{ic|yes}}:

+

Edit {{ic|/etc/slim.conf}} to uncomment the {{ic|auto_login}} command and replace {{ic|no}} with {{ic|yes}}:

auto_login yes

auto_login yes

−

=== Theming ===

=== Theming ===

Line 221:

Line 210:

* To exit to bash, enter '''exit''' as the username

* To exit to bash, enter '''exit''' as the username

* For suspend, enter '''suspend''' as the username (suspend is disabled by default, edit {{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}}))

* 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}}))

−

−

=== SLiM init error with rc.d daemon ===

−

−

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:

−

−

# mkdir /var/lock/

=== Power-off error with Splashy ===

=== Power-off error with Splashy ===

Line 256:

Line 239:

=== SLiM and Gnome Keyring ===

=== SLiM and Gnome Keyring ===

−

{{Out of date}}

+

{{Note|slim 1.3.5-1 ships with {{ic|/etc/pam.d/slim}} preconfigured to unlock keyring upon login. Users no longer need to modify the file.}}

−

{{Poor writing}}

+

See [[GNOME Keyring#Use Without GNOME]] if you want to use GNOME Keyring in a custom session.

−

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 [https://bugs.archlinux.org/task/18637 here]).

+

−

auth optional pam_gnome_keyring.so

+

−

session optional pam_gnome_keyring.so auto_start

+

−

+

−

You also have to add to {{ic|/etc/pam.d/passwd}}:

+

−

password optional pam_gnome_keyring.so

+

−

+

−

If you use a screensaver you also have to add

+

−

auth optional pam_gnome_keyring.so

+

−

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.

+

−

+

−

However, this fix alone no longer works since Gnome 2.30. Further changes are necessary as described [https://bugs.archlinux.org/task/18930 here]. Modifying the {{ic|login_cmd}} line in {{ic|/etc/slim.conf}}:

Append the following lines to .xinitrc just before you start your wm (example here is awesome wm):

+

−

/usr/bin/gnome-keyring-daemon --start --components=gpg

+

−

/usr/bin/gnome-keyring-daemon --start --components=pkcs11

+

−

/usr/bin/gnome-keyring-daemon --start --components=secrets

+

−

/usr/bin/gnome-keyring-daemon --start --components=ssh

+

−

/usr/bin/awesome

+

−

+

−

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.

+

−

+

−

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].

+

=== Setting DPI with SLiM ===

=== Setting DPI with SLiM ===

Line 407:

Line 340:

| reboot_msg ||{{ic|The system is rebooting...}}

| reboot_msg ||{{ic|The system is rebooting...}}

|-

|-

−

| sessions ||{{ic|wmaker,blackbox,icewm}}

+

| sessiondir ||{{ic| /usr/share/xsessions/}}

−

|-

+

−

| sessiondir ||

+

|-

|-

| hidecursor ||{{ic|false}}

| hidecursor ||{{ic|false}}

Line 519:

Line 450:

| session_shadow_color ||{{ic|#FFFFFF}}

| session_shadow_color ||{{ic|#FFFFFF}}

|}

|}

+

== Uninstallation ==

== Uninstallation ==

To completely remove SLiM:

To completely remove SLiM:

Line 529:

Line 461:

=== Incompatibility with systemd ===

=== Incompatibility with systemd ===

−

As of November 2013, SLiM is not fully compatible with systemd, because it reuses the PAM session process. It causes various problems on second login, e.g.:

+

See [[Display manager#Incompatibility with systemd]]

−

* NetworkManager applet does not work,

+

−

* PulseAudio volume cannot be adjusted,

+

−

* login failed into GNOME with another user.

+

−

+

−

+

−

However, functionality can be restored by manually editing {{ic|/etc/pam.d/slim}}, and adding the following at the end of the configuration file:

+

−

+

−

{{bc| session required pam_systemd.so}}

+

−

+

−

+

−

See the following bugtacker reports for more details: [https://bugs.archlinux.org/task/34329] [http://developer.berlios.de/bugs/?func&#61;detailbug&bug_id&#61;19102&group_id&#61;2663]

SLiM is an acronym for Simple Login Manager. Lightweight and easily configurable, SLiM requires minimal dependencies, and none from the GNOME or KDE desktop environments. It therefore contributes towards a lightweight system for users that also like to use lightweight desktops such as Xfce, Openbox, and Fluxbox.

Installation

Configuration

Note: SLiM no longer supports a 'default' session where multiple sessions have been enabled. This is most noticable where attempting to log out and back in again to the same session.

As of version 1.3.6-2, SLiM can automatically detect installed desktop environments and window managers. This is achieved through the use of sessiondir /usr/share/xsessions/ in /etc/slim.conf. It will therefore be necessary for those who installed an earlier version of SLiM to amend /etc/slim.conf and ~/.xinitrc, accordingly.

.xinitrc file

If you do not have a ~/.xinitrc file, then either create one in your Home folder using nano or an appropriate text editor (e.g. Leafpad or Geany). Alternatively, you may be able use a skeleton file as a template to work with:

$ cp /etc/skel/.xinitrc ~

Remember to make the ~/.xinitrc file executable if not already:

chmod +x ~/.xinitrc

Enabling SLiM

Note: slim no longer has ConsoleKit support, but relies on systemd-logind, and the system being booted with systemd.

Enter the following command to enable the SLiM daemon: systemctl enable slim.service. This is assuming that a previously installed and enabled display manager had been disabled first. Otherwise, enter systemctl enable slim.service -f to simultaneously disable the existing display manager and activate SLiM in its place.

Single environments

Tip: Users that have installed a previous version of SLiM can replace session with a hashed sessiondir /usr/share/xsessions/

To configure SLiM 1.3.6-2 (or later) to load a particular environment, it will be necessary to edit both /etc/slim.conf and ~/.xinitrc.

First, edit /etc/slim.conf in order to hash out sessiondir /usr/share/xsessions/. This will consequently disable automatic detection of installed environments:

# Set directory that contains the xsessions.
# slim reads xsesion from this directory, and be able to select.
# sessiondir /usr/share/xsessions/

For detailed instructions on how to start any desktop environments or window managers not listed above, refer to their wiki articles.

Multiple environments

Note: Available sessions for selection can be cycled through by pressing the F1 key.

To be able to choose from multiple desktop environments. It will therefore be necessary to amend /etc/slim.conf and ~/.xinitrc. This process will also cover SLiM installations prior to 1.3.6-2.

First, edit /etc/slim.conf in order to ensure that sessiondir /usr/share/xsessions/ is present and unhashed:

# Set directory that contains the xsessions.
# slim reads xsesion from this directory, and be able to select.
sessiondir /usr/share/xsessions/

Users who installed a prior version of SLiM will have to replace sessions with the new command.

Second, edit ~/.xinitrc so that a selected session is run:

exec $1

Users who installed a prior version of SLiM will have to replace case $1 in [...] esac, where used. To clarify, below is an example of the depreceated method to select multiple sessions. The entire code provided below would simply be replaced with exec $1:

Set default username

SLiM can be configured to automatically set a desired username, which will therefore aleady be completed. The password field will also already be focused by default. Change the following line in /etc/slim.conf:

# default_user simone

Uncomment this line, and change "simone" to the username of choice:

default_user <your username>

Enable Autologin

Note: It will be necessary to have first set SLiM to use a single desktop environment, as well as a default username.

Warning: Do not set this for the root account.

Edit /etc/slim.conf to uncomment the auto_login command and replace no with yes:

auto_login yes

Theming

The archlinux-themes-slim packages contains several different themes (slimthemes.png). Look in the directory of /usr/share/slim/themes to see the themes available. Enter the theme name on the current_theme line in /etc/slim.conf:

#current_theme default
current_theme archlinux-simplyblack

To preview a theme run while an instance of the Xorg server is running by:

Shutdown, reboot, suspend, exit, launch terminal from SLiM

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

To launch a terminal, enter console as the username (defaults to xterm which must be installed separately... edit /etc/slim.conf to change terminal preference)

For shutdown, enter halt as the username

For reboot, enter reboot as the username

To exit to bash, enter exit as the username

For suspend, enter suspend as the username (suspend is disabled by default, edit /etc/slim.conf as root to uncomment the suspend_cmd line and, if necessary modify the suspend command itself (e.g. change /usr/sbin/suspend to sudo /usr/sbin/pm-suspend))

Power-off error with Splashy

If you use Splashy and SLiM, sometimes you can't power-off or reboot from menu in GNOME, Xfce, LXDE or others. Check your /etc/slim.conf and /etc/splash.conf; set the DEFAULT_TTY=7 same as xserver_arguments vt07.

Power-off tray icon fails

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 /etc/slim.conf as follows:

sessionstart_cmd /path/to/tray/icon/program &

Login information with SLiM

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 slim.conf as follows:

Setting DPI with SLiM

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 /etc/X11/xinit/xserverrc it will not work with SLiM. To fix this change your slim.conf from:

xserver_arguments -nolisten tcp vt07

to

xserver_arguments -nolisten tcp vt07 -dpi 96

Use a random theme

Use the current_theme variable as a comma separated list to specify a set from which to choose. Selection is random.

Move the whole session to another VT

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)
So, to move the X-Server you need to change one number in the /etc/slim.conf file. Just a few lines down you should see:

xserver_arguments -nolisten tcp vt07

Simply change the vt07 to lets say vt03 as there is no agetty started there.