rhl24.htm

来自「linux的初学电子书」· HTM 代码 · 共 2,490 行 · 第 1/5 页

HTM
2,490 行
字号
"Properties " PROPERTIES

SEPARATOR

"X11 Programs " DIRMENU /usr/X11R6/bin

"XView Programs " DIRMENU $OPENWINHOME/bin

"XV 3.00" exec /usr/X11R6/bin/xv

"Window Menu " WINMENU

SEPARATOR

"Screensaver " MENU $OPENWINHOME/lib/openwin-menu-screensave

"Lock Screen " MENU $OPENWINHOME/lib/openwin-menu-xlock

&quot;Exit&quot; EXIT</FONT></PRE>

<P>Let's look at some of the entries in this .openwin-menu file.

<BR>

<UL>

<LI>The # signs mark lines as comments.

<BR>

<BR>

<LI>The line &quot;Workspace&quot; TITLE defines the name of the menu.

<BR>

<BR>

<LI>The next line defines &quot;Shells &quot; as a menu located in a file $OPENWINHOME/lib /openwin-menu-s.

<BR>

<BR>

<LI>The &quot;XV 3.00&quot; entry executes the command /usr/X386/bin/xv via the exec command.

<BR>

<BR>

<LI>The &quot;Window Menu &quot; entry invokes a special entry for selecting windows via a WINMENU type of window.

<BR>

<BR>

<LI>The &quot;XView Programs &quot; entry uses a type DIRMENU to list all the files in $OPENWINHOME/bin.

<BR>

<BR>

<LI>The SEPARATOR type draws an empty box at its position.

<BR>

<BR>

</UL>

<P>You can now use different files for customizing your menus differently by adding or deleting items to this file.

<BR>

<P>The menu specification language has a number of keywords, all of which are in all-uppercase letters.

<BR>

<P>The syntax for this file is straightforward. Each line typically specifies one menu button. There are three fields per each uncommented line. The first field defines a label, an optional keyword, and an action to take if the item is selected.

<BR>

<P>The label is either a single word or a string enclosed in double quotes. This string appears in the menu button. If the optional keyword DEFAULT appears next, this menu item becomes the default item for this menu. The rest of the line (excluding leading 
whitespace) is considered to be a command. It is executed by sending it to bash. Any shell metacharacters are passed through to the shell unchanged.

<BR>

<P>The command field can be extended onto the next line by placing a backslash (\) at the end of the line. The newline will not be embedded in the command.

<BR>

<P>A submenu is specified using the special keyword MENU in place of a command. A button is added to the current menu, and clicking or pulling right on this button brings up the submenu. Subsequent lines in the menu file define buttons for the submenu, 
until a line that has the special keyword END in the command field is encountered. The label of the MENU line must match the label on the END line; otherwise an error is signaled.

<BR>

<P>Submenus can be nested arbitrarily, bracketed by MENU and END lines with matching labels.

<BR>

<P>Submenus can be defined in a different file using either the MENU or the INCLUDE keyword. To include a submenu from another file, use a line with a label, either the MENU or the INCLUDE keyword, and then the filename. The file so named is assumed to 
contain lines that specify menu buttons. The submenu file need not have any MENU or END lines (unless it has submenus itself). The current file need not have a matching END line if the submenu is read from another file. Submenu files included with the MENU 
keyword are considered to be an integral part of the menu tree, and any error encountered during the reading of the file will cause the entire menu to be considered invalid. A submenu file included with the INCLUDE keyword is considered optional, and any 
error encountered during reading of the file is not considered fatal. If an error occurs during INCLUDE processing, a disabled (grayed-out) item is inserted in place of the submenu and processing of the current menu file continues.

<BR>

<P>To make a submenu pinnable, add the special keyword PIN after the END keyword on the line that ends the submenu definition, or after the TITLE directive (I'll discuss that in a minute).

<BR>

<P>By default, the label in a menu button is used as the title of the submenu.

<BR>

<P>This can be overridden by specifying a line that has the special keyword TITLE in the command field. The label from this line is used as the submenu's title. This line can appear anywhere in the submenu definition.

<BR>

<P>It does not add an item to the menu. In addition, if the PIN keyword follows the TITLE keyword on this line, the submenu is made pinnable.

<BR>

<P>This construct is useful for declaring a submenu defined in a separate file as pinnable.

<BR>

<P>A line containing only the keyword SEPARATOR adds extra space before the next item.

<BR>

<P>Table 24.1 lists keywords that can be used in the command field of a menu item. They specify functions that are internal to olwm and that are not invoked by running a shell.

<BR>

<BR>

<P ALIGN=CENTER>

<CENTER>

<FONT COLOR="#000080"><B>Table 24.1. Special keywords in </B><B>olwm</B><B>.</B></FONT></CENTER>

<BR>



<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

BACK_SELN

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Moves the selected windows and icons behind other windows.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

EXIT

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Kills all applications and exits the window manager after getting confirmation from the user. (This is useful for exiting the entire window system.)</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

EXIT_NO_CONFIRM

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Like EXIT but skips the confirmation notice.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

FLIPDRAG

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Toggles the state of the DragWindow resource.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

FLIPFOCUS

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Toggles the state of the SetInput resource.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

FULL_RESTORE_SIZE_SELN

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Toggles the full-sized/normal-sized states of the selected windows and icons.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

NOP

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

No operation. Don't do anything.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

OPEN_CLOSE_SELN

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Toggles the opened/closed states of the selected windows and icons.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

QUIT_SELN

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Quits the selected windows and icons.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

PROPERTIES

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Brings up Workspace Properties.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

REFRESH

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Causes all windows on the screen to be repainted.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

REREAD_MENU_FILE

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Forces an immediate rereading of the workspace menu customization file. Olwm starts a complete search for a menu file and uses the first valid file it finds.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

RESTART

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Restarts the window manager.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

SAVE_WORKSPACE

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Takes a snapshot of the set of currently running applications, and put the command lines so obtained into a file $HOME/.openwin init (in the user's home directory). This runs the command specified by the SaveWorkspaceCmd resource.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

START_DSDM

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Starts providing the DSDM service.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

STOP_DSDM

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Stops providing the DSDM service.</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

WMEXIT

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Exits the window manager without killing any applications.</FONT>

</TABLE><BR>

<A NAME="E68E193"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>The Virtual Desktop</B></FONT></CENTER></H3>

<BR>

<P>olvwm is a window manager with a virtual desktop. You use the olvwm command to invoke this window manager. Change olwm to olvwm in your .xinitrc file.

<BR>

<P>olvwm is a virtual window manager for the X Window System that implements parts of the OPEN LOOK graphical user interface. olvwm differs from olwm in that olvwm manages a virtual desktop that is larger than the actual screen.

<BR>

<BR>

<A NAME="E69E311"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>The Virtual Desktop Manager</B></FONT></CENTER></H4>

<BR>

<P>When it is started, olvwm displays a Virtual Desktop Manager (VDM) window. The VDM is the window that provides a scaled-down version of the entire desktop.

<BR>

<P>If the desktop is running in default mode, it displays a grid, each square of which maps to the size of the monitor. Each square is termed a Logical Screen.

<BR>

<P>The Current View is that part of the desktop that is currently displayed on the screen. A Virtual Window is a small rectangle displayed in the VDM. Every window on the desktop has a corresponding virtual window in the VDM.

<BR>

<P>The VDM always appears on the screen. (See Figure 24.7.)

<BR>

<P><B> <A HREF="24rhl07.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/24rhl07.gif">Figure 24.7. The Virtual Desktop Manager.</A></B>

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>&quot;The Virtual Desktop&quot; section was authored by Scott Oaks, scott.oaks@sun.com, who is also responsible for its maintenance. This olwm and olvwm code is not supported by Sun Microsystems in any way. The staff at Sun Microsystems, and 
especially Stuart Marks, deserve credit as original author(s) of olwm for most of the work contained in XView.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>By default, the VDM (and hence the desktop) is divided into a grid. Each square of the grid represents a screen size. The dividing lines between each logical screen are represented by dashed lines in the VDM. This division into logical screens is purely 
informational. If you like, windows can straddle these boundaries, the current view into the desktop can straddle them also, and windows can be moved at will between them. However, by default, most actions in the VDM keep the current view along these 
boundary lines.

<BR>

<P>You can use the resize corners on the VDM to resize the virtual desktop. If you make the virtual desktop smaller, windows that might be off the new virtual desktop are NOT moved (though they are not lost, either, because you can get them back by 
resizing the desktop). Space added or subtracted is always done so from the right and bottom of the desktop (regardless of which resize corner you used).

<BR>

<BR>

<A NAME="E69E312"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Working with Virtual Windows</B></FONT></CENTER></H4>

<BR>

<P>Events that occur in a particular virtual window behave just as if they were delivered to the corresponding application's frame. Thus, pressing the MENU button over a virtual window brings up the Frame menu and enables the real (and virtual) windows to 
be opened, closed, resized, and so on.

<BR>

<P>Pressing the SELECT button selects that real (and virtual) window. Pressing the ADJUST button adds (or subtracts) that window from the selection list.

<BR>

<P>SELECTing and dragging one or more virtual windows moves the real and virtual windows (just as in olwm). Note that if you drag the mouse outside of the VDM, the window can be moved onto to the screen. Conversely, when dragging a window on the screen, if 
the mouse moves into the VDM the window's icon moves to another location within the VDM. However, if part of the VDM is obscured, you cannot move a window into that part of the VDM.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Note that events are delivered only to the real application's frame. Thus, typing characters or using the COPY/CUT/PASTE keys has no effect.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>It is possible to drop something onto a virtual window as if it were dropped onto the corresponding application. This enables you to drag a file in one window on the screen to another application on another part of the desktop.

<BR>

<P>Double-clicking the SELECT button on an area in the VDM background moves the current view to the logical screen containing the point where the mouse was double-clicked.

<BR>

<P>The MENU button brings up a (pinnable) menu that enables movement based on full screen sizes in the direction indicated. See Figure 24.8.

<BR>

<P><B> <A HREF="24rhl08.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/24rhl08.gif">Figure 24.8. A pinnable menu.</A></B>

<BR>

<BR>

<A NAME="E69E313"></A>

<H4 ALIGN=CENTER>

<CENTER>

⌨️ 快捷键说明

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