As discussed in Chapter 3, the run level of a
Linux computer describes whether the system will boot to a graphical
interface (level 5) or a command line (level 3).
It can be very useful to change the run level
from 5 to 3. When booting up, instead of a graphical login, a
command line login will be seen. All that is needed at that point is
the command used to launch the desired windows manager. Quitting a
windows manager will bring the user back to the command prompt.
Compare that to level 5, in which the only way to change windows
managers is to run the command init 3 as root, which will reboot the
machine.
To change the default run level, edit the file
/etc/inittab and change the line that describes the default run
level so it reads:
id:3:initdefault:
Then, reboot the machine. When the machine
finishes rebooting, login at the command prompt, and issue the
startx command to launch the gnome interface. To return to the
command prompt, logout of gnome.
Trivial Windows
Manager (TWM)
The trivial windows manager is the ultimate in
lightweight windows managers. Its strength is it has almost no
features at all, which means it requires very little of CPU and RAM.
About the only things a user will be able to do is to move, minimize
and resize various windows.
Use the command xinit /usr/X11R6/bin/twm to
launch the trivial windows manager. At first, all that appears is a
black screen with an X for the mouse cursor in the middle. Click on
the desktop, and the options menu appears. Launch a terminal by
selecting xterm. From the terminal, any program can be launched.
%
Note ? twm is in use does not mean that gnome
applications cannot be run. To the contrary, any gui application
can be run. So, if gnome-terminal
or geditor mozilla is desired,
just launch it from the command prompt. Use the ampersand at the
end of the command (such as gftp &) to run the process in
the background, so as not to tie up the command line.
FVWM
Another windows manager that is worthy of
mention is fvwm, a lightweight windows manager with more features
than twm. Download fvwm at http://fvwm-themes.sourceforge.net/rpm/.
At the bottom of that page is a link to required
packages. Click it and download libstroke-0.4-1mdk.i586.rpm. Install
the packages in the order shown in Figure E.2.
Once fvwm is installed, exit twm and use the
command xinit /usr/bin/fvwm to launch fvwm. The initial screen will
be very bare. Click the desktop and run the setup form. Select all
the available modules and click to copy the config files and restart
fvwm. This will create text configuration files in the directory
~/.fvwm for the current user only. These files can be edited to
change the fvwm desktop appearance and functionality.
Fvwm can be an excellent desktop manager for
installing Oracle software or creating databases. Figure E.3 shows
the dbca running in the fvwm window with the CPU monitor below it
showing the CPU activity as the database nears completion.
FVWM's CPU monitor is a fast and easy method to
ensure that database creation is not hanging. If the CPU is being
utilized, then database creation is still ongoing.
Using the Alias
Command to Simplify Launching Windows Managers
To make launching the desired windows manager a
simple, easy to remember command, add the following lines to the ~/.bashrc
file of each user who desires it:
alias
fvwm="xinit /usr/bin/fvwm"
alias gnome="xinit /usr/bin/gnome-session"
alias twm="xinit /usr/X11R6/bin/twm"
Launching a WM
without Tying up the Command Prompt
Use the ampersand at the end of the command to
launch a windows manager. By doing so, the terminal login can be
returned to by typing [ctl+alt+F1] without having to quit the
windows manager to free up the command prompt. To return to the
windows manager, type [ctl+alt+F7].
Launching a GUI
Program without a Windows Manager
It is possible to launch an Oracle GUI program
without being in a windows manager interface. For example, the
command xinit $ORACLE_HOME/bin/dbca will launch the database
configuration assistant alone with no window around the application.
This is not advised because control will be lost over which windows
appear on top and whether the windows that appear can be moved or
minimized.