📄 0127-0130.html
字号:
<HTML>
<HEAD>
<TITLE>Sams Teach Yourself Linux in 24 Hours:Exploring Other X11 Window Managers:EarthWeb Inc.-</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311623 //-->
<!-- TITLE=Sams Teach Yourself Linux in 24 Hours//-->
<!-- AUTHOR=Bill Ball//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=08 //-->
<!-- PAGES=0127-0138 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="../ch07/0124-0126.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0131-0134.html">Next</A>
</CENTER></P>
<A NAME="PAGENUM-127"><P>Page 127</P></A>
<H3><A NAME="ch08_ 2">
Hour 8
</A></H3>
<H2>
<A NAME="ch08_ 3">
Exploring Other X11 Window<BR>
Managers
</A>
</H2>
<P>In this hour you'll learn about several alternative window managers for the
X Window System. There are more than 50 different window managers for
X11, each with different themes, desktop colors, and decorations (for
example, window controls). You're sure to find one you like. These window
managers range from simple to complex, and some can be a challenge to install
and configure.
</P>
<P>Choosing a window manager is a matter of personal preference. Each
window manager discussed in this hour handles terminal windows, but is different
in ease-of-use, convenience, size, and style. These windows managers
visibly demonstrate the graphic flexibility of the X Window System. You'll soon
learn that there are no "standards" for the standard X11 graphical user interface.
</P>
<A NAME="PAGENUM-128"><P>Page 128</P></A>
<TABLE BGCOLOR=#FFFF99>
<TR><TD>TIME SAVER</TD></TR>
<TR><TD>
<BLOCKQUOTE>
You can have all of these window managers installed on your system and use
a different one whenever you want.
</BLOCKQUOTE>
</TD></TR>
</TABLE>
<H3><A NAME="ch08_ 4">
Obtaining, Installing, and Configuring Other Window<BR>
Managers
</A></H3>
<P>Installing other window managers can be a daunting task. You won't find any of
the following window managers installed on your book's CD-ROM. You'll have to find
the software yourself, and either install pre-compiled versions, or build and install the
software on your own.
</P>
<TABLE BGCOLOR=#FFFF99>
<TR><TD>JUST A MINUTE</TD></TR>
<TR><TD>
<BLOCKQUOTE>
Don't be intimidated if you have to compile and install Linux programs
from scratch. Many programmers make the job easier by providing shell scripts
or other programs that automate the process. When you download a
software package be sure to read the INSTALL or
README file before you begin. If you're curious about Linux programming, see the Linux Programmer's Guide under the
/usr/doc/LDP directory, and read the<BR>
man pages for the make and xmkmf commands.
</BLOCKQUOTE>
</TD></TR>
</TABLE>
<P>Fortunately, you can easily find these window managers by either using your favorite
Web search engine, or browsing to Matt Chapman's site, which has a number of links to
the sources:
</P>
<!-- CODE SNIP //-->
<PRE>
<a href="http://www.plig.org">
http://www.plig.org</A>
</PRE>
<!-- END CODE SNIP //-->
<P>At this site the source code for many window managers is just a mouse-click away,
along with beginner-UNIX tutorials and loads of details about X11 window managers.
</P>
<H4><A NAME="ch08_ 5">
The Motif Window Manager
</A></H4>
<P>The mwm, or Motif window manager, is part of the Motif software library
distribution from The Open Group. Unlike the X11 XFree86 software installed on your system,
Motif is distributed under a license, and you must pay for your copy. There are several
Motif distributions for Linux, and many Linux users buy Motif to create Motif clients
(which support drag-and-drop, along with other advanced features), or to run programs
that require the Motif software libraries.
</P>
<A NAME="PAGENUM-129"><P>Page 129</P></A>
<P>
Unfortunately, you need to buy Motif to get the mwm window manager (see Figure
8.1). But you'll also receive a toolkit of programming header files, libraries,
demonstration programs, and more than 600 manual pages. If you're interested in using mwm and
Motif, you can find one version from Red Hat Software, Inc. at the following site:
</P>
<!-- CODE SNIP //-->
<PRE>
<a href="http://www.redhat.com">
http://www.redhat.com</A>
</PRE>
<!-- END CODE SNIP //-->
<P>Other companies also sell Motif for Linux besides Red Hat, and you can check their
Web sites as well:
</P>
<!-- CODE //-->
<PRE>
Caldera, <a href="http://www.caldera.com">
http://www.caldera.com</A>
InfoMagic, <a href="http://www.infomagic.com">
http://www.infomagic.com</A>
Linux Systems Labs, <a href="http://www.lsl.com">
http://www.lsl.com</A>
Metro Link Incorporated, <a href="http://www.metrolink.com">
http://www.metrolink.com</A>
Xi Graphics, Inc., <a href="http://www.xig.com">
http://www.xig.com</A>
</PRE>
<!-- END CODE //-->
<P>If you do a full installation of Red Hat's Motif, make sure there's at least 20 megabytes
of free hard drive space on your Linux partition. You can get by with five megabytes of
space if you install just mwm and the other Motif clients and libraries. Follow the
instructions included with your distribution for proper installation.
</P>
<P>Figure 8.1.<BR>
The Motif window<BR> manager, mwm, is part<BR> of a
commercially<BR> licensed Motif sof-<BR>tware distribution,
and<BR> provides decorative<BR> borders and controls<BR> for windows, as
well<BR> as virtual consoles.<BR>
<a href="javascript:displayWindow('images/ch08fg01.jpg', 288, 216)"><img src="images/tn_ch08fg01.jpg"></a><BR>
</P>
<P>After installing, customize mwm by editing a file called
.mwmrc in your home directory. You'll find a copy, named
system.mwmrc, under the /usr/lib/X11 directory. This file
contains numerous settings you can change to customize how mwm handles your mouse,
windows, and desktop menus.
</P>
<A NAME="PAGENUM-130"><P>Page 130</P></A>
<H4><A NAME="ch08_ 6">
Installing and Using the LessTif mwm Window Manager
</A></H4>
<P>Don't want to spend money for a commercial distribution of Motif? You can try
LessTif, an alternative software library, designed to be compatible with Motif version 1.2
and distributed under terms of the GNU General Public License. This software library
comes with a window manager called mwm, along with the software libraries required to run
many Motif programs.
</P>
<P>You can download the source for LessTif and build it on your own, or your can get a
binary distribution if you'd just like to try mwm. The latest copies of LessTif usually reside at
the following Web site:
</P>
<!-- CODE SNIP //-->
<PRE>
<a href="http://www.lesstif.org">
http://www.lesstif.org</A>
</PRE>
<!-- END CODE SNIP //-->
<P>This site also features' programming hints and a list of Motif clients that work with
LessTif. To install the binary version of the LessTif distribution, move all of the
unpacked directories to a single directory. Make sure you're
logged in as the root operator, then type the following:
</P>
<!-- CODE SNIP //-->
<PRE>
# gunzip lesstif-0.81-linux.tar.gz
# tar xf lesstif-0.81-linux.tar
# cd less*
# mkdir /usr/local/lesstif
# mv * /usr/local/lesstif
</PRE>
<!-- END CODE SNIP //-->
<P>Edit your /etc/ profile, and add the following lines:
</P>
<!-- CODE SNIP //-->
<PRE>
PATH=/usr/local/lesstif/bin:$PATH
LIBRARY_PATH=/usr/local/lesstif/lib
</PRE>
<!-- END CODE SNIP //-->
<P>Save the file. To enter the new environment variables (see Hour 6, "Using the Shell")
right away, use the bash shell's source command:
</P>
<!-- CODE SNIP //-->
<PRE>
# source /etc/profile
</PRE>
<!-- END CODE SNIP //-->
<P>Once you've used this command, either create a
.xinitrc file in your home directory or comment out your current entries and use mwm as the last entry in the file. The next
time you use the startx command, you'll be using the mwm window manager.
</P>
<P>The LessTif version of mwm also uses a .mwmrc resource file in your home directory,
so you can define your own Root menu (displayed when you hold down your right
mouse button when your cursor is on the desktop).
</P>
<P>You also can change how LessTif's mwm works by editing the file
Mwm, located under the app-defaults directory (which you'll find under the LessTif directory).
</P>
<H4><A NAME="ch08_ 7">
Starting the Common Desktop Environment
</A></H4>
<P>The Common Desktop Environment, or CDE, is a graphical interface with many
features common to other commercial operating systems. But it's much more than that: it is
without
</P>
<P><CENTER>
<a href="../ch07/0124-0126.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0131-0134.html">Next</A>
</CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -