rhl24.htm
来自「linux的初学电子书」· HTM 代码 · 共 2,490 行 · 第 1/5 页
HTM
2,490 行
<HTML>
<HEAD>
<TITLE>Red Hat Linux Unleashed rhl24.htm </TITLE>
<LINK REL="ToC" HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm">
<LINK REL="Index" HREF="htindex.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/htindex.htm">
<LINK REL="Next" HREF="rhl25.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl25.htm">
<LINK REL="Previous" HREF="rhl23.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl23.htm"></HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<A NAME="I0"></A>
<H2>Red Hat Linux Unleashed rhl24.htm</H2>
<P ALIGN=LEFT>
<A HREF="rhl23.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl23.htm" TARGET="_self"><IMG SRC="purprev.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>
<A HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm" TARGET="_self"><IMG SRC="purtoc.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purtoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>
<A HREF="rhl25.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl25.htm" TARGET="_self"><IMG SRC="purnext.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purnext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>
<HR ALIGN=CENTER>
<P>
<UL>
<UL>
<UL>
<LI>
<A HREF="#E68E188" >What Is OPEN LOOK?</A>
<UL>
<LI>
<A HREF="#E69E307" >olwm and olvwm</A></UL>
<LI>
<A HREF="#E68E189" >Getting Started with OpenWindows</A>
<UL>
<LI>
<A HREF="#E69E308" >Starting OpenWindows</A>
<LI>
<A HREF="#E69E309" >SELECT and MENU</A></UL>
<LI>
<A HREF="#E68E190" >Working Within OpenWindows and olwm</A>
<LI>
<A HREF="#E68E191" >Menus</A>
<UL>
<LI>
<A HREF="#E69E310" >The Workspace Menu</A></UL>
<LI>
<A HREF="#E68E192" >Configuring Menus for OpenWindows</A>
<LI>
<A HREF="#E68E193" >The Virtual Desktop</A>
<UL>
<LI>
<A HREF="#E69E311" >The Virtual Desktop Manager</A>
<LI>
<A HREF="#E69E312" >Working with Virtual Windows</A>
<LI>
<A HREF="#E69E313" >Sticky Windows</A></UL>
<LI>
<A HREF="#E68E194" >Resources in OpenWindows</A>
<LI>
<A HREF="#E68E195" >Using Text-Editing Features</A>
<LI>
<A HREF="#E68E196" >Support for Left-Handed Users</A>
<LI>
<A HREF="#E68E197" >Troubleshooting</A>
<LI>
<A HREF="#E68E198" >Environment Variables</A>
<LI>
<A HREF="#E68E199" >Special Help for Sun Workstation Users</A>
<LI>
<A HREF="#E68E200" >Internet Sites for XView</A>
<LI>
<A HREF="#E68E201" >Where To Go for More Information</A>
<LI>
<A HREF="#E68E202" >Summary</A></UL></UL></UL>
<HR ALIGN=CENTER>
<A NAME="E66E24"></A>
<H1 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>24</B></FONT></CENTER></H1>
<BR>
<A NAME="E67E24"></A>
<H2 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>OPEN LOOK and OpenWindows</B></FONT></CENTER></H2>
<BR>
<P>This chapter introduces you to OPEN LOOK on Linux. Ideally, this chapter could be expanded into a book of its own. That being impossible however, we will cover some of the basics of OPEN LOOK in this chapter, including
<BR>
<UL>
<LI>What is OPEN LOOK?
<BR>
<BR>
<LI>What to install on Linux.
<BR>
<BR>
<LI>How to work with a look and feel that's different from Motif.
<BR>
<BR>
<LI>How to work with the virtual desktop.
<BR>
<BR>
<LI>How to customize your desktop.
<BR>
<BR>
<LI>Troubleshooting tips.
<BR>
<BR>
<LI>Where to get more information about OPEN LOOK.
<BR>
<BR>
</UL>
<P>If you have not already done so, please read <A HREF="rhl23.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl23.htm">Chapter 23</A>, "Using Motif." This chapter will build on that chapter, so there won't be duplicate information for you to weed through. The information you require from the
Motif chapter is the discussion on X Window, working with pointers, and the Motif environment. You will definitely need to know how to use resources in the .Xdefaults files and starting X Window via shell scripts like startx.
<BR>
<BR>
<A NAME="E68E188"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>What Is OPEN LOOK?</B></FONT></CENTER></H3>
<BR>
<P>OPEN LOOK is a specification of a Graphical User Interface (GUI). A GUI determines the look and feel of a system—the shape of windows, buttons, and scrollbars; how you resize things; how you edit files; and so on. The OPEN LOOK GUI is specified,
developed, and maintained primarily by Sun Microsystems Inc. XView is simply the port on Linux. When I talk about OpenWindows, I will refer to XView for Linux in this chapter.
<BR>
<P>OpenWindows is a windowing environment that conforms to the OPEN LOOK Graphical User Interface Specifications. It's compatible with the X11 window system from MIT as well as (currently) Sun's NeWS and SunView, so you can intermix programs written for
any of these systems. It comes from Sun and also with UNIX System V Release 4 from certain vendors.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>OpenWindows should not be called "Windows" or "OPEN LOOK" or "OpenLook," because these terms are either wrong or apply to something else. OpenWindows is sometimes also called openwin or xnews, after the program used to
start it and the main executable itself, respectively.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>The X Window system is a trademark of the Massachusetts Institute of Technology. OPEN LOOK is a trademark of AT&T. OpenWindows is a trademark of Sun Microsystems, Inc.
<BR>Portions "Copyright Bigelow & Holmes 1986, 1985. Lucida is a registered trademark of Bigelow & Holmes. Permission to use the Lucida trademark is hereby granted only in association with the images and fonts described in this file. Portions
may be "1990 Solbourne Computers.
<BR>Portions of olvwm not covered under the above copyrights are ©1991 Scott Oaks.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>Several toolkits exist for programmers to use in developing programs that conform to the OPEN LOOK specifications:
<BR>
<UL>
<LI>OPEN LOOK Intrinsics Toolkit (OLIT)
<BR>
<BR>
<LI>XView (This is what you have for Linux.)
<BR>
<BR>
<LI>The NeWS Toolkit (TNT)
<BR>
<BR>
<LI>C++ User Interface Toolkit (UIT)
<BR>
<BR>
</UL>
<P>OLIT was AT&T's OPEN LOOK Intrinsics Toolkit for the X Window system. OLIT used a widget set and was therefore easy to learn for people who were already X11/Xt programmers. You could buy the source from AT&T, although you didn't get the same
version that Sun would ship.
<BR>
<P>Sun includes the OLIT library in OpenWindows. OLIT is also often included in UNIX System V Release 4. OLIT was written in C. The last release of OLIT in OpenWindows 3.0 was OLIT 3.0. OLIT support passed to USL (UNIX System Laboratories), who replaced it
with MoOLIT (see the following Tip).
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>You need an OLIT source in order to develop a large application or anything else that uses subclasses.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>XView is Sun's toolkit for X11, written in C. It is similar in programmer interface to SunView. There's even a shell script to help migrate source code from SunView to XView. XView is often said to be the easiest toolkit to learn if you are not familiar
with X Window.
<BR>
<P>The XView toolkit is included in OpenWindows, and full source is available by anonymous FTP from export.lcs.mit.edu (and elsewhere). The current version of XView from Sun is 3.2p1.
<BR>
<P>The NeWS Toolkit (TNT) is an object-oriented programming system based on the PostScript language and NeWS. TNT implements many of the OPEN LOOK interface components required to build the user interface of an application. It's currently included in
OpenWindows.
<BR>
<P>The current version of TNT from Sun is 3.1. Release 3 contains some incompatibilities with TNT 1.0 and TNT 2.0, but Sun is committed to supporting the API, at least until it stops NeWS support some time later this year and replaces it with Display
PostScript. Wait. You might ask what "is committed to" means in this context; the answer seems to be that it means absolutely nothing.
<BR>
<P>Sun currently asserts that it is committed to OLIT, however.
<BR>
<P>The C++ User Interface Toolkit (UIT) consists of an object-oriented C++ class library layered on top of XView and a tool to generate code from files written in a graphical interface language called DevGuide 2 GIL. The UIT also includes features that
simplify event management and the use of PostScript and color. It is said to be compatible with OpenWindows Versions 2 and 3, and presumably Version 3.0.1, as the release mentions that it works on Solaris 2.
<BR>
<P>UIT is not an official Sun-supported product but an ongoing project of various people within Sun. It can be found on <A HREF="tppmsgs/msgs0.htm#85" tppabs="ftp://export.lcs.mit.edu/">export.lcs.mit.edu</A> in the MIT /R5contrib directory as UITV3.tar.Z (use binary mode!).
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>If you cannot decide which GUI to use, consider the MoOLIT interface. MoOLIT is a version of OLIT from AT&T/USL that lets users choose between a Motif- and an OPEN LOOK—type feel at runtime.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<BR>
<A NAME="E69E307"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>olwm and olvwm</B></FONT></CENTER></H4>
<BR>
<P>There are two window managers for OpenWindows: olwm and olvwm. A window manager is responsible for deciding how to lay out windows on the screen, and for managing the user's interaction with the windows.
<BR>
<P>olwm is the standard OPEN LOOK window manager. It is included with all of the OpenWindows implementations, and you can also get the source via FTP because Sun donated it to the freeware domain.
<BR>
<P>The olvwm program is a version of olwm that manages a virtual desktop (hence the v in its name). It shows a little map on the screen, with the currently displayed area represented by a small rectangle. You can move around by dragging the rectangle or
with the arrow keys. This enables you to run several clients (applications) that occupy the full screen and move the display around from one to the other. Olvwm was derived from the OpenWindows 3.0 olwm by Scott Oaks. You need to have XView 3.0 to compile
it.
<BR>
<P>The olvewm and olwm packages are included on the CD at the back of the book.
<BR>
<BR>
<A NAME="E68E189"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Getting Started with OpenWindows</B></FONT></CENTER></H3>
<BR>
<P>First, confirm that you have installed the XView system on your Linux system. The XView distribution consists of the files in Listing 24.1. You will need to follow the directions included with XView to install these files.
<BR>
<P>
<FONT COLOR="#000080"><B>Listing 24.1. </B><B>XView</B><B> package contents.</B></FONT>
<BR>
<PRE>
<FONT COLOR="#000080">xv32_a.tgz Static Libraries for developing Xview 3.2
applications.
xv32_sa.tgz Static Libraries for debugging Xview 3.2
applications.
xv32_so.tgz Shared Libraries for Xview 3.2.
xv32exmp.tgz Sample programs for Xview 3.2.
xvinc32.tgz Include files for Xview 3.2 programming.
xvmenus.tgz Menus and help files for the OpenLook Window
Manager.
xvol32.tgz Xview 3.2 Configuration files, programs, and
documentation.</FONT></PRE>
<P>Install the packages shown in Listing 24.1 for your XView system using the setup program as shown in <A HREF="rhl03.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl03.htm">Chapter 3</A>, "Installing and Updating Linux." If you have already done this installation, you should have at least some
files in /usr/openwin/bin.
<BR>
<BR>
<A NAME="E69E308"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Starting OpenWindows</B></FONT></CENTER></H4>
<BR>
<P>You need one of two files to get started with OpenWindows: either .xinitrc or .xsessionrc.
<BR>
<P>The first time you run OpenWindows, a .xinitrc file is created in your login directory ($HOME). If it already exists, you might have to edit it somewhat. It's best to move all old X11 files you have to another directory, and then merge the old and new
files.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>If you use xdm, you should use .xsessionrc instead of .xinitrc, because xdm doesn't look at your .xinitrc file.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>Please refer to <A HREF="rhl23.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl23.htm">Chapter 23</A> for a detailed discussion on .xinitrc and installing X on your Linux system.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?