Installing a Window Manager (that didn't come with your distribution)
To understand the multiplicity and interchangeability of window managers under
the X Window system, let's install the ice window manager. You can obtain it from the web, either by
traditional browser navigation or by a single-shot command.
Launch your X Window GUI:
startx &
then a graphical http browser and go to http://xwinman.org/. Look how many window managers there are! Choose IceWM from the list in the lefthand column. In the next screen link to "Official IceWM site." Take a look around. The site makes Ice available for download, but we will use a version that comes from fedora. Exit gnome, the current desktop environment (System/Log Out).
Add icewm plus some other software that may or not already be installed on your system. We want a script for launching X ("the GUI"), namely xinit. We want a terminal window available once we're in X, namely xterm. We want a couple of window managers, namely icewm and twm. We want a couple of X (graphical) applications, namely xeyes and xclock. We want a program to automate the switching among window manager when you choose to use "startx" for GUI launching, namely switchdesk.
yum install xinit
yum install xterm
yum install icewm-xdgmenu
yum install twm
yum install lesstif-mwm
yum install xeyes
yum install xclock
yum install switchdesk
Now run switchdesk:
switchdesk gnome
It creates a file of interest, which will control what interface gets loaded whenever you use "startx" to launch a graphical interface. Take a look at that file:
cat ~/.Xclients-default
The line "WM=" determines which window manager gets control whenever you run "startx".
Let's invoke ice and see what an "alternative interface" looks like. There are various ways you could do it. Let's try 2 of them, in succession. We'll do it without startx at first, then we'll change startx to make it invoke ice. First, launch X via the xinit command, with no client specification:
xinit
You get a GUI with a single client, which per xinit's default is xterm, which displays a terminal window. In the terminal window run ice:
icewm
It's truly beautiful don't you think? Note the bottom-bar reminiscent of the "task bar" in Windows. Play with it to observer its behavior and offerings. Now terminate the Ice window manager from the terminal window, like any other running app, with the control-C keystroke. Try another window manager. In the terminal window run twm:
twm
Here, there's no bottom bar. But left click on the "desktop" and a menu appears. Different manager, different design, different approach. Terminate the twm window manager from the terminal window, like any other running app, with the control-C keystroke. Then terminate the X Window GUI altogether:
exit
You usually launch the GUI via the script startx. By default it ends up calling the Gnome desktop environment. You can alter that by editing the file that specifies startx's default. In your home directory, edit the hidden file .Xclients-default (note the leading period in the filename, that's what makes it "hidden"). .Xclients-default may not exist; in that case, create it by running "switchdesk gnome" and then proceed. Change the "WM=" line, which probably reads WM="gnome-session" so it instead reads WM="icewm" instead. Take a glimpse both before and after and note the replacement. You could make the replacement in any one of these ways:
1) with an editor.
2) by in-place search-and-replace from the command line with the stream
editor, sed.
cat ~/.Xclients-default
sed -i "s/gnome-session/icewm/" ~/.Xclients-default
cat ~/.Xclients-default
3) by asking switchdesk to do it for you:
switchdesk icewm
Now start the X Window GUI using the usual command:
startx
but note the replacement of your familiar window manager with ice!
To restore your default window manger or desktop environment, edit the controlling file back as it was. You could use either a regular interactive editor or the stream editor again. But this is the task that switchdesk automates. This puts you back in the gnome business:
switchdesk gnome
Verify that switchdesk altered the WM= line, and that consequently startx now invokes gnome instead of ice:
cat ~/.Xclients-default