Desktop environments on FreeBSD are usually started by some kind of display manager, such as GDM or KDM. This is specially true for “heavy” desktops such as GNOME or KDE, which are almost impossible to run without one. On the other side, “lighter” desktops such as XFCE run just fine without a display manager. Steps to start XFCE without login manager are described in FreeBSD Handbook, but they require that user logs in and starts X server manually. The following article describes how to start XFCE automatically immediately after user logs onto local console.
x11-wm/xfce4 are already installed, and user’s login shell is set to
tcsh, one needs to copy
.tcshrc, and append a few lines to it:
echo '' >> ~/.tcshrc echo '# start xfce when login on ttyv4' >> ~/.tcshrc echo 'if ($tty == ttyv4) then' >> ~/.tcshrc echo ' startxfce4 --with-ck-launch' >> ~/.tcshrc echo ' logout' >> ~/.tcshrc echo 'endif' >> ~/.tcshrc
In order to start XFCE automatically we need to login on
ttyv4, to which we switch by pressing
ttyv4 is by no means special – it is possible to use any of the ttys from
ttyv0 should be left alone for critical syslog notifications.
For some setups it is useful to combine above setup with automatic login into local console, which will eliminate the need to enter any credentials in order to get XFCE desktop environment.