jayemef
14th December 2004, 02:08 PM
If you've experimented with alternate desktop environments/window managers, you have probably come across one or more that don't seem compatible with the switchdesk utility. You've probably gone and run the command, only to find something like this:
$ switchdesk wmaker
Red Hat Linux switchdesk 4.0
Copyright (C) 1999-2004 Red Hat, Inc
Redistributable under the terms of the GNU General Public License
ERROR: WMAKER not installed!
Well that's just silly, because you know you just installed it. No worries though. The problem doesn't have anything to do with what you did. It has to do with the switchdesk script itself, or more precisely, the switchdesk-helper script. So we're going to have to fix that.
Open a terminal. We're going to search for the executable needed to run our desktop environment/window manager. I'll use windowmaker as an example, but feel free to swap windowmaker for anything you like.
First, lets take a look at what switchdesk-helper is trying to execute. Open your /usr/bin/switchdesk-helper file, and look for your DE/WM (in this case wmaker).
WINDOWMAKER|WMAKER)
[ ! -x /usr/bin/wmaker ] && NotFound WindowMaker
DNAME="WindowMaker"
NEW_XCLIENTS="$DATADIR/Xclients.wmaker"
;;
**(if you do not see the DE/WM listed, simply copy one of the existing entries and create the new entry yourself. For example, Afterstep is not included. so you would want to copy an existing entry, paste it, and edit it as
AFTERSTEP)
[ ! -x /usr/bin/afterstep ] && NotFound AfterStep
DNAME="AfterStep"
NEW_XCLIENTS="$DATADIR/Xclients.afterstep"
;;
You'll also need to make sure to create the proper Xclients file.)
Well, it looks like switchdesk-helper is looking in /usr/bin for the wmaker executable, but since it's not finding it, it obviously must not be there. So where is it?
$ whereis wmaker
wmaker: /usr/local/bin/wmaker.inst /usr/local/bin/wmaker
Since we are looking for 'wmaker' specifically, we can rule out the first option. So it looks like our executable is in /usr/local/bin. Lets try it. Become root and re-open your /usr/bin/switchdesk-helper file. Find your desired entry and edit the executable path
WINDOWMAKER|WMAKER)
[ ! -x /usr/local/bin/wmaker ] && NotFound WindowMaker
DNAME="WindowMaker"
NEW_XCLIENTS="$DATADIR/Xclients.wmaker"
;;
You should now be set. So lets try it.
$ switchdesk wmaker
Red Hat Linux switchdesk 4.0
Copyright (C) 1999-2004 Red Hat, Inc
Redistributable under the terms of the GNU General Public License
Desktop now set up to run WindowMaker.
SUCCESS!
(credit to JMan for this useful tip)
$ switchdesk wmaker
Red Hat Linux switchdesk 4.0
Copyright (C) 1999-2004 Red Hat, Inc
Redistributable under the terms of the GNU General Public License
ERROR: WMAKER not installed!
Well that's just silly, because you know you just installed it. No worries though. The problem doesn't have anything to do with what you did. It has to do with the switchdesk script itself, or more precisely, the switchdesk-helper script. So we're going to have to fix that.
Open a terminal. We're going to search for the executable needed to run our desktop environment/window manager. I'll use windowmaker as an example, but feel free to swap windowmaker for anything you like.
First, lets take a look at what switchdesk-helper is trying to execute. Open your /usr/bin/switchdesk-helper file, and look for your DE/WM (in this case wmaker).
WINDOWMAKER|WMAKER)
[ ! -x /usr/bin/wmaker ] && NotFound WindowMaker
DNAME="WindowMaker"
NEW_XCLIENTS="$DATADIR/Xclients.wmaker"
;;
**(if you do not see the DE/WM listed, simply copy one of the existing entries and create the new entry yourself. For example, Afterstep is not included. so you would want to copy an existing entry, paste it, and edit it as
AFTERSTEP)
[ ! -x /usr/bin/afterstep ] && NotFound AfterStep
DNAME="AfterStep"
NEW_XCLIENTS="$DATADIR/Xclients.afterstep"
;;
You'll also need to make sure to create the proper Xclients file.)
Well, it looks like switchdesk-helper is looking in /usr/bin for the wmaker executable, but since it's not finding it, it obviously must not be there. So where is it?
$ whereis wmaker
wmaker: /usr/local/bin/wmaker.inst /usr/local/bin/wmaker
Since we are looking for 'wmaker' specifically, we can rule out the first option. So it looks like our executable is in /usr/local/bin. Lets try it. Become root and re-open your /usr/bin/switchdesk-helper file. Find your desired entry and edit the executable path
WINDOWMAKER|WMAKER)
[ ! -x /usr/local/bin/wmaker ] && NotFound WindowMaker
DNAME="WindowMaker"
NEW_XCLIENTS="$DATADIR/Xclients.wmaker"
;;
You should now be set. So lets try it.
$ switchdesk wmaker
Red Hat Linux switchdesk 4.0
Copyright (C) 1999-2004 Red Hat, Inc
Redistributable under the terms of the GNU General Public License
Desktop now set up to run WindowMaker.
SUCCESS!
(credit to JMan for this useful tip)