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

📄 0183-0185.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:




<HTML>

<HEAD>

<TITLE>Developer.com - Online Reference Library - 0672311739:RED HAT LINUX 2ND EDITION:X Window</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=0672311739 //-->

<!-- TITLE=RED HAT LINUX 2ND EDITION //-->

<!-- AUTHOR=DAVID PITTS ET AL //-->

<!-- PUBLISHER=MACMILLAN //-->

<!-- IMPRINT=SAMS PUBLISHING //-->

<!-- PUBLICATION DATE=1998 //-->

<!-- CHAPTER=10 //-->

<!-- PAGES=0175-0194 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->









<P><CENTER>

<a href="0179-0182.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0186-0188.html">Next</A>

</CENTER></P>



<A NAME="PAGENUM-183"><P>Page 183</P></A>





<!-- CODE //-->

<PRE>

Section &quot;Screen&quot;

    Driver     &quot;vga16&quot;

    Device     &quot;Generic VGA&quot;

    Monitor    &quot;Generic Monitor&quot;

    Subsection &quot;Display&quot;

        Modes      &quot;640x480&quot;

        ViewPort    0 0

        Virtual     800 600

    EndSubsection

EndSection



# The Mono server



Section &quot;Screen&quot;

    Driver     &quot;vga2&quot;

    Device     &quot;Generic VGA&quot;

    Monitor    &quot;Generic Monitor&quot;

    Subsection &quot;Display&quot;

        Modes      &quot;640x480&quot;

        ViewPort    0 0

        Virtual     800 600

    EndSubsection

EndSection

</PRE>

<!-- END CODE //-->









<P>The Mode line in a video section can have up to 10 values. Be very careful when

modifying these values because a wrong setting may wind up destroying your monitor! It does not

matter if these are not present because defaults can be used. A typical line to override defaults for

a monitor would be:

</P>



<!-- CODE SNIP //-->

<PRE>

&quot;640x400&quot; 28 640 480 728 776 480 480 482 494

</PRE>

<!-- END CODE SNIP //-->









<P>The 10 values in order from left to right are shown in the following section. These values

only make sense to video engineers or those folks who have to work with a monitor not defined

in the default modes. Check your monitor's hardware specifications and get the values from

there to fill in these ten parameters. The following are the fields to set:

</P>









<UL>

<LI>          Label for screen resolution; for example,

640&#165;480 or 1024&#165;768.

<LI>          The clock frequency in mHz.

<LI>          The Horizontal Display End in number of visible dots per line on the screen.

<LI>          The Start Horizontal Retrace value. This specifies the number of pulses before

the video sync pulse starts.

<LI>          The End Horizontal Retrace value defines the end of the sync pulse.

<LI>          The Horizontal Total value. This is the total number of dots per line invisible

and visible.

<LI>          The Vertical Display End value. The number of visible lines on the screen.

<LI>          The Start Vertical Retrace value. The number of lines before the sync pulse starts.

<LI>          The End Vertical Retrace value is the number of lines at the end of the sync pulse.

<LI>          The Vertical Total value. The total number of lines, invisible plus visible, on

the screen.

</UL>





<A NAME="PAGENUM-184"><P>Page 184</P></A>















<P>Multiscan monitors handle frequencies of 15 to 40 mHz. Some monitors work at 72

mHz vertical scan to prevent the flicker. You have to be able to calculate the frequency from

the monitor's specification and come up with these numbers. A good place to start would be

the XFree86-HOWTO document on how to get these values. Keep in mind that your video monitor

is just a glorified television. You give it wrong values and you can fry it.

</P>









<H4><A NAME="ch10_ 12">





International Keyboard Layout for XFree86

</A></H4>









<P>XFree86 servers are able to read the key table from the Linux kernel, so you need to set up

only one keyboard layout file (for the kernel). There are some restrictions, though; the kernel

can support more keyboard functions than X11. X11 can only modify one of the four key

tables. This modifier is called ModeShift.

</P>









<P>Configurable keys for the ModeShift modifier are

LeftAlt, RightAlt (=AltGr), RightCtl, and

ScrollLock.

</P>









<P>Usually the AltGr key is used for international keyboard modifications. To enable the

XFree86 server to read the AltGr key table from the kernel, you should put the following line in

the .olvwmrc file:

</P>



<!-- CODE SNIP //-->

<PRE>

RightAlt &quot;ModeShift&quot;

</PRE>

<!-- END CODE SNIP //-->









<P>Besides supporting only one additional key map, X11 cannot use

dead keys. A key is called dead if when it is typed, it does not print a character until a second character is typed. A

typical example is an accent key. Such keys are not supported by X11, so you need to replace all

dead-key symbols with non-dead equivalents. Table 10.1 lists what you have to change.

</P>









<P>Table 10.1. Key symbols.

</P>



<HR>

<TABLE WIDTH="360">



<TR><TD>

Dead

</TD></TD>

Non-Dead

</TD></TR>





<TR><TR>

dead_tilde

</TD><TD>

ASCII tilde

</TD></TR>



<TR><TD>

dead_grave

</TD><TD>

grave

</TD></TR>





<TR><TD>

dead_circumflex

</TD><TD>

ASCII circum

</TD></TR>



<TR><TD>

dead_acute

</TD><TD>

apostrophe

</TD></TR>



<TR><TD>

dead_diaeresis

</TD><TD>

diaeresis

</TD></TR>

</TABLE>









<P>Instead of supporting dead keys, XFree86 supports a

Compose key. This feature is described in the

XFree86kbd man page and can be modified by assigning the

Compose function to one of the keys. By default the

ScrollLock key has the Compose function.

</P>









<P>If you still want to have the dead keys on the console, you will have to use an

xmodmap file to map the keys to the correct symbols under X. This is also the method that must be used

with earlier versions of XFree86. On sunsite in the directory

/pub/Linux/X11/misc, you can find sample xmodmap files for several languages. Note that you have to set the

ModeShift modifier to get the right key table working.

</P>









<A NAME="PAGENUM-185"><P>Page 185</P></A>











 <P>Please read the kbd.FAQ that comes with the kbd package for Linux. You will find many

hints for modifying your keyboard layout on the console, as well as for X.

</P>









<H3><A NAME="ch10_ 13">

The .xinitrc File

</A></H3>









<P>To use X, you need a startup file that calls the local modifications, the window manager,

and an application you want to use right after X has started. If you are using

startx (or runx) to start X, this startup file is called

xinitrc. There is a standard xinitrc file,

/usr/lib/X11/xinit/xinitrc, which is the traditional location for this file. The Linux filesystem standard

places this file in /etc/X11/xinit/xinitrc in order to allow a read-only mounted

/usr partition, so look in that location first.

</P>









<P>If you are not content with what this file does (for instance, if you want to use a different

window manager), you should copy it to the file

.xinitrc in your home directory. After copying the file, you can edit it. Look at the man pages for

startx and xinit for more information.

</P>









<P>Note that both the .xinitrc and the .Xresources files must be readable and executable, so

run the following commands on these files after editing them. You only have to run the

chmod command once on the application.

</P>



<!-- CODE SNIP //-->

<PRE>

$ chmod u+rx .xinitrc .Xresources

</PRE>

<!-- END CODE SNIP //-->









<P>This command makes these files executable.

</P>









<P>See Listing 10.6 for a sample .xinitrc file.

</P>









<P>Listing 10.6. A sample .xinitrc file.

</P>



<!-- CODE //-->

<PRE>

    1 #!/bin/sh

    2 # $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

    3 # modified by obz

    4 userresources=$HOME/.Xresources

    5 usermodmap=$HOME/.Xmodmap

    6 sysresources=/usr/lib/X11/xinit/.Xresources

    7 sysmodmap=/usr/lib/X11/xinit/.Xmodmap

    8 # merge in defaults and keymaps

    9 if [ -f $sysresources ]; then

   10     xrdb -merge $sysresources

   11 fi

   12 if [ -f $sysmodmap ]; then

   13     xmodmap $sysmodmap

   14 fi

   15 if [ -f $userresources ]; then

   16     xrdb -merge $userresources

   17 fi

</PRE>

<!-- END CODE //-->

<PRE>

                                                                 continues

</PRE>

<!-- END CODE SNIP //-->



<P><CENTER>

<a href="0179-0182.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0186-0188.html">Next</A>

</CENTER></P>









</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

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