⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch24.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 5 页
字号:


<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>

 -->






 











 

















<H1></H1>







<UL>



	<LI><A HREF="#Heading1">- 24 -</A>



	<UL>



		<LI><A HREF="#Heading2">OPEN LOOK and OpenWindows</A>



		<UL>



			<LI><A HREF="#Heading3">What Is OPEN LOOK?</A>



			<LI><A HREF="#Heading4">TIP</A>



			<LI><A HREF="#Heading5">TIP</A>



			<LI><A HREF="#Heading6">TIP</A>



			<LI><A HREF="#Heading7">olwm and olvwm</A>



			<LI><A HREF="#Heading8">Getting Started with OpenWindows</A>



			<UL>



				<LI><A HREF="#Heading9">Starting OpenWindows</A>



			</UL>



			<LI><A HREF="#Heading10">TIP</A>



			<LI><A HREF="#Heading11">Listing 24.1. A sample .openwin-init file</A>



			<LI><A HREF="#Heading12



			<LI><A HREF="#Heading13">TIP</A>



			<LI><A HREF="#Heading14">NOTE</A>



			<UL>



				<LI><A HREF="#Heading15">FIGURE 24.1.</A>



			</UL>



			<LI><A HREF="#Heading16">SELECT and MENU</A>



			<LI><A HREF="#Heading17">TIP</A>



			<LI><A HREF="#Heading18">TIP</A>



			<LI><A HREF="#Heading19">Working Within OpenWindows and olwm</A>



			<UL>



				<LI><A HREF="#Heading20">FIGURE 24.2.</A>



			</UL>



			<LI><A HREF="#Heading21">TIP</A>



			<LI><A HREF="#Heading22">Menus</A>



			<UL>



				<LI><A HREF="#Heading23">The Workspace Menu</A>



				<UL>



					<LI><A HREF="#Heading24">FIGURE 24.3.</A>



					<LI><A HREF="#Heading25">FIGURE 24.4.</A>



					<LI><A HREF="#Heading26">FIGURE 24.5.</A>



					<LI><A HREF="#Heading27">FIGURE 24.6.</A>



				</UL>



			</UL>



			<LI><A HREF="#Heading28">NOTE</A>



			<LI><A HREF="#Heading29">Configuring Menus for OpenWindows</A>



			<LI><A HREF="#Heading30">Listing 24.2. The default .openwin-menu file</A>



			<LI><A HREF="#Heading31



			<LI><A HREF="#Heading32">The Virtual Desktop</A>



			<UL>



				<LI><A HREF="#Heading33">The Virtual Desktop Manager</A>



				<UL>



					<LI><A HREF="#Heading34">FIGURE 24.7.</A>



				</UL>



			</UL>



			<LI><A HREF="#Heading35">NOTE</A>



			<UL>



				<LI><A HREF="#Heading36">Working with Virtual Windows</A>



			</UL>



			<LI><A HREF="#Heading37">NOTE</A>



			<UL>



				<LI><A HREF="#Heading38">FIGURE 24.8.</A>



			</UL>



			<LI><A HREF="#Heading39">Sticky Windows</A>



			<LI><A HREF="#Heading40">NOTE</A>



			<LI><A HREF="#Heading41">NOTE</A>



			<LI><A HREF="#Heading42">Resources in OpenWindows</A>



			<LI><A HREF="#Heading43">Using Text-Editing Features</A>



			<LI><A HREF="#Heading44">NOTE</A>



			<LI><A HREF="#Heading45">TIP</A>



			<LI><A HREF="#Heading46">Support for Left-Handed Users</A>



			<LI><A HREF="#Heading47">CAUTION</A>



			<LI><A HREF="#Heading48">Troubleshooting</A>



			<LI><A HREF="#Heading49">TIP</A>



			<LI><A HREF="#Heading50">Environment Variables</A>



			<LI><A HREF="#Heading51">Special Help for Sun Workstation Users</A>



			<LI><A HREF="#Heading52">Internet Sites for XView</A>



			<LI><A HREF="#Heading53">NOTE</A>



			<LI><A HREF="#Heading54">Where to Go for More Information</A>



			<LI><A HREF="#Heading55">Summary</A>



		</UL>



	</UL>



</UL>







<P>



<HR SIZE="4">







<H2 ALIGN="CENTER"><A NAME="Heading1<FONT COLOR="#000077">- 24 -</FONT></H2>



<H2 ALIGN="CENTER"><A NAME="Heading2<FONT COLOR="#000077">OPEN LOOK and OpenWindows</FONT></H2>



<P><I>by Kamran Husain</I></P>



<P>IN THIS CHAPTER</P>







<UL>



	<LI>What Is OPEN LOOK?



	<P>



	<LI>olwm and olvwm



	<P>



	<LI>Getting Started with OpenWindows



	<P>



	<LI>Working Within OpenWindows and olwm



	<P>



	<LI>Menus



	<P>



	<LI>Configuring Menus for OpenWindows



	<P>



	<LI>The Virtual Desktop



	<P>



	<LI>Resources in OpenWindows



	<P>



	<LI>Using Text-Editing Features



	<P>



	<LI>Support for Left-Handed Users



	<P>



	<LI>Troubleshooting



	<P>



	<LI>Environment Variables



	<P>



	<LI>Special Help for Sun Workstation Users



	<P>



	<LI>Internet Sites for XView



	<P>



	<LI>Where to Go for More Information



</UL>







<P><BR>



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







<UL>



	<LI>What OPEN LOOK is



	<P>



	<LI>What to install on Linux



	<P>



	<LI>How to work with a look and feel that's different from Motif



	<P>



	<LI>How to work with the virtual desktop



	<P>



	<LI>How to customize your desktop



	<P>



	<LI>Troubleshooting tips



	<P>



	<LI>Where to get more information about OPEN LOOK



</UL>







<P>If you have not already done so, read Chapter 23, &quot;Using Motif.&quot; 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 <TT>.Xdefaults</TT> files and starting X



Window via shell scripts like <TT>startx</TT>.



<H3 ALIGN="CENTER"><A NAME="Heading3<FONT COLOR="#000077">What Is OPEN LOOK?</FONT></H3>



<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.</P>



<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.







<DL>



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading4<FONT COLOR="#000077"><B>TIP:</B> </FONT>OpenWindows should



	not be called &quot;Windows&quot; or &quot;OPEN LOOK&quot; or &quot;OpenLook,&quot;



	because these terms are either wrong or apply to something else. OpenWindows is sometimes



	also called <TT>openwin</TT> or <TT>xnews</TT>, after the program used to start it



	and the main executable itself, respectively. 



<HR>







</DL>







<P>Several toolkits exist for programmers to use in developing programs that conform



to the OPEN LOOK specifications:







<UL>



	<LI>OPEN LOOK Intrinsics Toolkit (OLIT)



	<P>



	<LI>XView (this is what you have for Linux)



	<P>



	<LI>The NeWS Toolkit (TNT)



	<P>



	<LI>C++ User Interface Toolkit



</UL>







<P>OLIT was AT&amp;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&amp;T, although you didn't get the



same version that Sun would ship.</P>



<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).







<DL>



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading5<FONT COLOR="#000077"><B>TIP:</B> </FONT>You need an OLIT



	source in order to develop a large application or anything else that uses subclasses.



	



<HR>







</DL>







<P>XView is Sun's toolkit for X11, written in C. It is similar in programmer interface



to <TT>SunView</TT>. There's even a shell script to help migrate source code from



<TT>SunView</TT> to XView. XView is often said to be the easiest toolkit to learn



if you are not familiar with X Window.</P>



<P>The XView toolkit is included in OpenWindows. The current version of XView from



Sun is 3.2p1.</P>



<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.</P>



<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 &quot;is committed to&quot; means in this context; the answer



seems to be that it means absolutely nothing.</P>



<P>Sun currently asserts that it is committed to OLIT, however.</P>



<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.</P>



<P>UIT is not an official Sun-supported product but an ongoing project of various



people within Sun.







<DL>



	<DT></DT>



</DL>











<DL>



	<DD>



<HR>



<A NAME="Heading6<FONT COLOR="#000077"><B>TIP:</B> </FONT>If you cannot decide



	which GUI to use, consider the MoOLIT interface. MoOLIT is a version of OLIT from



	AT&amp;T/USL that lets users choose between a Motif- and an OPEN LOOK-type feel at



	runtime. 



<HR>







</DL>







<H3 ALIGN="CENTER"><A NAME="Heading7<FONT COLOR="#000077">olwm and olvwm</FONT></H3>



<P>There are two window managers for OpenWindows: <TT>olwm</TT> and <TT>olvwm</TT>.



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.</P>



<P><TT>olwm</TT> is the standard OPEN LOOK window manager. This window manager 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.</P>



<P>The <TT>olvwm</TT> program is a version of <TT>olwm</TT> 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. <TT>olvwm</TT> was derived from the OpenWindows 3.0 <TT>olwm</TT> by Scott



Oaks. You need to have XView 3.0 to compile it.</P>



<P>The <TT>olvwm</TT> and <TT>olwm</TT> packages are included on the CD-ROM at the



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -