# 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.
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] 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.
Note: This is second version of my theme, it is usable in multi-monitor configuration
# 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