SLiM: lightweight display manager

Configuration

by ross at 09:10:33 on December 17, 2017

Install:

# cd /usr/ports/x11/slim
# make install clean

Optionally check PAM. You need it if you are going to use Kerberos authentication. Default pam.d file for slim just includes system. So enable pam_krb5 in /etc/pam.d/system if you need Kerberos.

Enable SLiM

There are two ways you can start SLiM: using rc.conf file or from /etc/ttys. With the latest nVidia driver (319.32) tty method will not work anymore, so we will launch it by adding to /etc/rc.conf:

slim_enable="YES"

Make sure you don't switch text modes using allscreens_flags of rc.conf (or you'll lose your text consoles).

Sessions

Modern SLiM uses session files in /usr/local/share/xsessions (create this directory). An example of a session file:

[Desktop Entry]
Version=1.0
Type=Application
Name=KDE 4
Exec=/usr/local/bin/startkde

Save it as /usr/local/share/xsessions/kde4.desktop

Exec parameter of session file is then passed to the .xinitrc script. So you use something like this as your ~/.xinitrc:

export __GL_YIELD="USLEEP"
nvidia-settings -l
exec $1

Put whatever you need to init the system in the beginning of the file and then just do exec $1.

Themes

Note: This is second version of my theme, it is usable in multi-monitor configuration

slim-freebsd-thumb.png

# cd /usr/local/share/slim/themes
# fetch http://daemon-notes.com/downloads/assets/themes/slim-freebsd.tar.bz2
# tar jxvf slim-freebsd.tar.bz2
# rm slim-freebsd.tar.bz2

More themes could be found at SLiM site.

Edit /usr/local/etc/slim.conf, set theme (either 1680x1050 or 1920x1080 variant):

#current_theme       default
current_theme       freebsd-1680x1050

 

Comments
Nice theme. Thanks!
-- nick
Wednesday, September 16, 2015, 22:58:02
1. I did: pkg install slim
2. I followed the remaining instructions as above.
3. I got the "login screen" after reboot.
4. After I entered my user name and password, a blank dark scree appeared.
5. I rebooted, but I got the same blank screen.

What went wrong? Please help.
-- Jay
Friday, February 19, 2016, 14:52:42
Have you created .xinitrc in your home?
-- ross
Saturday, February 20, 2016, 13:16:20
Great theme! Thanks for putting this up.
-- Eric
Thursday, June 9, 2016, 17:37:28
slim.berlios.de doesn't have any A record.

Best wishes,
-k0nsl
-- k0nsl
Thursday, September 29, 2016, 2:06:56
Very good any guide of this page, hopefully always to remain available to all. Maybe a guide to set up and customize Xfce?
-- aor
Monday, April 17, 2017, 8:54:39
Hi,
the problem that I have with slim is, that it does not read the /etc/profile file or any local .profile file that exist in my home directory. Although the keyboard is set correctly in the console, it does not work correctly in the slim login screen.

If I login the system without slim enabled and start Xorg by using the command startx everything is perfect. Language is set correctly and restart and shutdown buttons work.
If I go the way, described in your tutorial shutdown and reboot are not available for me.

Any suggestions how to solve this problems?
-- Mike Otto Nahrgang
Friday, April 27, 2018, 20:16:08