📄 ch24.htm
字号:
<B><BR>
2.</B> Put the mouse pointer anywhere within the selection.<BR>
<B><BR>
3. </B>Press and hold down the SELECT mouse button and move the mouse pointer a little
to the right. You'll see the cursor change into the first three letters of the text
(or some other icon).<BR>
<B><BR>
4.</B> Still holding down the SELECT button, move the mouse over the point where
you want to drop the text.<BR>
<B><BR>
5. </B>You may see the mouse pointer change to a rifle sight or target, to show that
it's OK to drop things there.<BR>
<B><BR>
6. </B>Release SELECT and the text is moved. This works in text fields of dialog
boxes as well as in text subwindows.
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading45<FONT COLOR="#000077"><B>TIP:</B> </FONT>To drag-and-drop
to copy a selection, you must hold the Ctrl key down as well as the SELECT mouse
button.
<HR>
</DL>
<CENTER>
<H3><A NAME="Heading46<FONT COLOR="#000077">Support for Left-Handed Users</FONT></H3>
</CENTER>
<P>You can configure OPEN LOOK for a left-handed mouse and keyboard. Use <TT>xmodmap</TT>
to change the mouse buttons. Type <TT>man 7 XView</TT> for a list of key bindings
you can change, at least for XView programs.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading47<FONT COLOR="#000077"><B>CAUTION:</B> </FONT>Unlike the Motif
release, the <TT>xmodmap</TT> for mouse-key reversal sometimes does not work right.
In fact, it may actually reverse some keys on your keyboard or have some other surprising
results. You have been warned.
<HR>
</DL>
<P>With OpenWindows 2.0, you can use <TT>defaultsedit</TT> to set the mouse mappings
and then let SunView handle them. The status returned by <TT>svenv</TT> should tell
you whether your server is running under SunView; put this in your <TT>.xinitrc</TT>:</P>
<PRE><FONT COLOR="#0066FF">if eval `svenv -env`
then
xmodmap -e "pointer = 1 2 3"
input_from_defaults
else
xmodmap -e "pointer = 3 2 1"
fi
</FONT></PRE>
<CENTER>
<H3><A NAME="Heading48<FONT COLOR="#000077">Troubleshooting</FONT></H3>
</CENTER>
<P>Here are some solutions to problems you might have:
<UL>
<LI>If <TT>man</TT> doesn't seem to find OpenWindows commands, even though you are
running OpenWindows, try setting the <TT>MANPATH</TT> environment variable:
</UL>
<PRE><FONT COLOR="#0066FF">
MANPATH=$OPENWINHOME/share/man:/usr/man; export MANPATH
</FONT></PRE>
<P>or</P>
<PRE><FONT COLOR="#0066FF">setenv MANPATH $OPENWINHOME/share/man:/usr/man
</FONT></PRE>
<UL>
<P>for <TT>csh</TT> users. <TT>$OPENWINHOME</TT> should be <TT>/usr/openwin</TT>
on most systems. Set your path so that <TT>$OPENWINHOME/bin</TT> (and <TT>$OPENWIN/bin/XView</TT>
for OpenWindows 2) come before<TT> /bin</TT> (or <TT>/usr/bin</TT>, they're the same),
or you'll get the SunView versions of <TT>mailtool</TT>, <TT>cmdtool</TT>, <TT>shelltool</TT>,
and so on.
<LI>Dropped characters when you type into applications.
<P>In this case, include the following lines in your <TT>.Xdefaults</TT> file, as
these enable non-ICCCM-compliant programs to receive input even if they forget to
ask for it.
</UL>
<PRE><FONT COLOR="#0066FF">
OpenWindows.FocusLenience: true
</FONT></PRE>
<PRE><FONT COLOR="#0066FF">*Input: TRUE
</FONT></PRE>
<UL>
<LI>CUT and PASTE just do not work. Add the following either to your <TT>$HOME/.Xdefaults</TT>
file or to <TT>$OPENWINHOME/lib/app-defaults/XTerm</TT> instead:
</UL>
<PRE><FONT COLOR="#0066FF">
XTerm*VT100.Translations: #override \
<Key>L6:select-set(CLIPBOARD)\n\
<Key>L8:insert-selection(CLIPBOARD)
</FONT></PRE>
<P>If this text is already in the <TT>app-defaults</TT> file, so if it isn't working,
check that <TT>XFILESEARCHPATH</TT> is set to this:</P>
<PRE><FONT COLOR="#0066FF">
/usr/openwin/lib/%T/%N%S
</FONT></PRE>
<UL>
<P>If it isn't, either set it or copy/merge these lines from <TT>$OPENWINHOME/lib/app-
defaults/XTerm</TT> into <TT>/usr/lib/X11/app-defaults/XTerm</TT>.<BR>
This version automatically puts each <TT>xterm</TT> selection onto the Clipboard:
</UL>
<PRE><FONT COLOR="#0066FF">
XTerm*VT100.translations: #override\n\
~Ctrl ~Meta<Btn2Up>: insert-selection(PRIMARY,CUT_BUFFER0)\n\
~Ctrl ~Meta<BtnUp>: select-end(PRIMARY,CUT_BUFFER0,CLIPBOARD)\n\
<KeyPress>L8: insert-selection(CLIPBOARD)
</FONT></PRE>
<DL>
<DT><FONT COLOR="#0066FF"></FONT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading49<FONT COLOR="#000077"><B>TIP:</B> </FONT>Be sure that the
<TT>\n\</TT> is at the very end of all lines in the middle.
<HR>
</DL>
<UL>
<LI>If you get error messages that look like the lines
</UL>
<PRE><FONT COLOR="#0066FF">
Xlib: connection to ":0.0" refused by server
Xlib: Internal error during connection authorization check
Error: Can't Open display
</FONT></PRE>
<UL>
<P>try the command <TT>xhost-machine</TT>, where <TT>machine</TT> is the computer
on which you ran the command that failed.<BR>
If you want to let other users run programs on the same machine as you, using your
display, you have to type the command <TT>xhost +'hostname'</TT>, which lets any
user on <TT>'hostname'</TT> access your display.
<LI>Your screen flashes between applications. This is because most hardware can only
display a few colors at a time. Try the following steps:
</UL>
<DL>
<DD><B>1. </B>Start all the applications with colors that you wish to reserve.<BR>
<B><BR>
2.</B> Run <TT>cmap_compact save</TT> to create the <TT>.owcolors</TT> file.<BR>
<B><BR>
3. </B>Put the line <TT>cmap_compact init</TT> near the start of your <TT>I start-up</TT>
file (<TT>.xinitrc</TT>).<BR>
<B><BR>
4. </B>Exit and then restart the window system.<BR>
<B><BR>
5.<TT> </TT></B><TT>cmap_compact init</TT> pushes those <TT>.owcolors</TT> colors
to the end of the colormap and reserves them.
</DL>
<P>Also note that Ctrl-L2 locks the colors of the current window, and Ctrl-L4 unlocks
them--this is described in the <TT>olwm</TT> man page.</P>
<P>See the <TT>X*.faq</TT> in the <TT>/usr/docs/faq</TT> directory for detailed information
on problems specific to different platforms. The FAQ file can be give you a lot of
information about Linux and what problems to expect.
<CENTER>
<H3><A NAME="Heading50<FONT COLOR="#000077">Environment Variables</FONT></H3>
</CENTER>
<P>XView for Linux uses the following environment variables:
<UL>
<LI><TT>DISPLAY</TT> The name of the X Window display to use <TT>:0.0</TT> (on the
local machine, the one actually running X11 or <TT>xnews</TT>) <TT>:0.1</TT> (on
some machines for a second, monochrome screen) <TT>machine-running-unix:0.0</TT>
(on other machines). (You may need to do <TT>xhost +other-machine</TT> to let programs
on other machines use your display.)
<P>
<LI><TT>HELPPATH</TT> Where XView looks when you press the Help key (or F1): <TT>/usr/openwin/lib/locale:/usr/openwin/lib/help</TT>.
<P>
<LI><TT>LD_LIBRARY_PATH</TT> Is set to find shared C libraries. It is usually defaulted
to this value:
</UL>
<PRE><FONT COLOR="#0066FF"> /usr/lib:/usr/5lib:/usr/openwin/lib:/usr/CC/`arch`
</FONT></PRE>
<UL>
<LI><TT>OPENWINHOME</TT> Where OpenWindows lives (<TT>/usr/openwin</TT>).
<P>
<LI><TT>PATH</TT> Where the shell searches for programs to run.
<P>Include this line in it:
</UL>
<PRE><FONT COLOR="#0066FF">$(OPENWINHOME)/bin:$(OPENWINHOME)/bin/xview
</FONT></PRE>
<UL>
<LI><TT>XFILESEARCHPATH</TT> Where programs look for app-defaults files (<TT>/usr/openwin/lib/%T/%N%S</TT>).
This is usually set to: <TT>$OPENWINHOME/lib/%T/%N%S:/usr/lib/X11/%T/%N%S</TT>.
</UL>
<CENTER>
<H3><A NAME="Heading51<FONT COLOR="#000077">Special Help for Sun Workstation
Users</FONT></H3>
</CENTER>
<P>If you work with Sun Microsystems Sun Workstations, then the <TT>olwm</TT> and
<TT>olvwm</TT> managers should make life easier for you. If you want to make life
even easier, you can map the function keys to reflect that of Sun Workstations. To
do this, you have to modify the <TT>.Xmodmap</TT> file in your <TT>home</TT> directory.
If you do not have a <TT>.Xmodmap</TT> file, you can create one with a text editor.</P>
<P>The best place to look is in the man pages for <TT>xmodmap</TT>. The man pages
are full of examples, some of which I will describe briefly here. For issues specific
to your setting, read the man pages.</P>
<P>A typical <TT>.Xmodmap</TT> file will look like this:</P>
<PRE><FONT COLOR="#0066FF">keysym F1 = xman
keysym F2 = F19
keysym F3 = F20
keysym F4 = F16
keysym F5 = F18
</FONT></PRE>
<P>The Undo button is ominously absent from the <TT>.Xmodmap</TT> entries. To get
this entry, add the following line. (The text after the <TT>!</TT> is a comment and
ignored by X.)</P>
<PRE><FONT COLOR="#0066FF">keysym F6 = F14 ! The undo button.
</FONT></PRE>
<P>For example, if you hate the location of the Shift and Control keys on your PC,
you can swap the location. Simply put these lines in your <TT>.Xmodmap</TT> file:</P>
<PRE><FONT COLOR="#0066FF">remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
</FONT></PRE>
<P>You can also assign the meta key to a function key using this line:</P>
<PRE><FONT COLOR="#0066FF">keysym F9 = Meta_L
</FONT></PRE>
<P>Finally, when you have made your changes, you have to tell the server to use them.
It's too cumbersome to shut down the window manager and restart it. Instead, you
can use the <TT>rdb</TT> command:</P>
<PRE><FONT COLOR="#0066FF">$ xrdb .Xdefaults
</FONT></PRE>
<P>You can also invoke specific settings from the command line using <TT>xmodmap</TT>.
For example, type the following line:</P>
<PRE><FONT COLOR="#0066FF">$ xmodmap -e "keysym F9=Meta_L"
</FONT></PRE>
<P>Modifying the <TT>.Xmodmap</TT> file is better in that the changes are preserved
for future sessions.
<CENTER>
<H3><A NAME="Heading52<FONT COLOR="#000077">Internet Sites for XView</FONT></H3>
</CENTER>
<P>XView 3.0 is available at <TT>http://www.yggdrasil.com/</TT> and <TT>http://tsx-11.mit.edu/pub/linux</TT>
if you want to upgrade the CD-ROM version.</P>
<P>OpenWindows can be obtained from Sun, or you can get the source from Interactive
Systems, Inc. It is also included in some vendors' System V Release 4 implementations,
although that's not always the latest version.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading53<FONT COLOR="#000077"><B>NOTE:</B> </FONT>The current release
of OpenWindows from Sun for supported architectures is 3.0; for the Sun 3 series
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -