SLiM: lightweight display manager


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


# 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:


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


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

[Desktop Entry]
Name=KDE 4

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.


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


# cd /usr/local/share/slim/themes
# fetch
# 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


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 doesn't have any A record.

Best wishes,
-- 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