Running xfce at Startup on Slackware 13.37

I recently switched window managers from KDE4 to xfce. KDE4 is nice, but I was looking for something faster: xcfe fits the bill!

Another advantage is that, using the Slackbuilds, I have Compiz-Fusion again! Woohoo! My windows wobble correctly and burn when I close them; I have My desktop cube, complete with a sexy skydome!

After getting all this working on my desktop machines, I decided to do the same thing to the MacBook. Once everything was running, I changed /etc/innittab to run X11 at startup: I changed the default runlevel from 3 to 4. (For those of you that don’t use Slackware, yes that’s a 4 . . . I know Fedora and other distributions don’t use runlevel 4, but rather use 5 . . . Slackware uses 4 for X11.)

Much to my surprise, after being greeted by the familiar kdm login screen, my MacBook proceeded to run KDE, even though I had used xwmconfig to set xfce as the default window manager.

After searching the web for a fix, I finally resigned myself to booting to runlevel 3, logging in at the console, then running xfce via startx–not a solution, but a working setup running the desktop manager I prefer.

Well, today I was explaining this issue to a coworker, and when I mentioned that the issue might be in rc.4, she commented that she had been reading about that in the Slackware Book. She opened the book, located the page and handed it to me. Sure enough, it looked like the issue was in /etc/rc.d/rc.4! Woohoo again!

This evening, I took a look at /etc/rc.d/rc.4 and found that it first tries to run gdm–not even part of the normal distrubtion–then tries to run kdm and finally runs xdm as a last resort. I copied the lines that run xdm and pasted them at the top of the file, before the gdm lines. After setting the default runlevel back to 4, the MacBook boots to xdm and after I log in, I am in wonderful xfce where I wanna be! (Thank you Tracey!)

Once again, RTFM is the rule!

Now my /etc/rc.d/rc.4 looks like this:

 #! /bin/sh
 # rc.4          This file is executed by init(8) when the system is being
 #               initialized for run level 4 (XDM)
 # Version:      @(#)/etc/rc.d/rc.4      2.00    02/17/93
 # Author:       Fred N. van Kempen, <>
 # At least 47% rewritten by:  Patrick J. Volkerding <>
# Tell the viewers what's going to happen...
 echo "Starting up X11 session manager..."

# Stu says, just use xdm (since kdm doesn't want us to use xfce -)
 if [ -x /usr/bin/xdm ]; then
     exec /usr/bin/xdm -nodaemon
 elif [ -x /usr/X11R6/bin/xdm ]; then
     exec /usr/X11R6/bin/xdm -nodaemon
# Try to use GNOME's gdm session manager.  This comes first because if
 # gdm is on the machine then the user probably installed it and wants
 # to use it by default:
 if [ -x /usr/bin/gdm ]; then
     exec /usr/bin/gdm -nodaemon
# Someone thought that gdm looked prettier in /usr/sbin,
 # so look there, too:
 if [ -x /usr/sbin/gdm ]; then
     exec /usr/sbin/gdm -nodaemon
# Not there?  OK, try to use KDE's kdm session manager:
 if [ -x /opt/kde/bin/kdm ]; then
     exec /opt/kde/bin/kdm -nodaemon
 elif [ -x /usr/bin/kdm ]; then
     exec /usr/bin/kdm -nodaemon
# If all you have is XDM, I guess it will have to do:
 if [ -x /usr/bin/xdm ]; then
     exec /usr/bin/xdm -nodaemon
 elif [ -x /usr/X11R6/bin/xdm ]; then
     exec /usr/X11R6/bin/xdm -nodaemon
# error
 echo "Hey, you don't have KDM, GDM, or XDM.  Can't use runlevel 4 without"
 echo "one of those installed."
 sleep 30
# All done.

Happy Hacking!

P.S. Of course, the answer was here all the time!

1 thought on “Running xfce at Startup on Slackware 13.37”

  1. Bless you. I despise KDE and its bloat. If I wanted to run windows, I’d run windows. XFCE is a great ‘cholestrol free’ alternative and you just saved me hours of swearing. Of course I’ll have a glass of Lagavulin – but as a celebrant not a frustrated KDE victim! (Seriously KDE is okay but just way too overblown for Slackware …. IMHO of course 😉 Thanks again!


Leave a Comment