📄 0038-0040.html
字号:
<HTML>
<HEAD>
<TITLE>Sams Teach Yourself Linux in 24 Hours:Configuring the X Window System:EarthWeb Inc.-</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=0672311623 //-->
<!-- TITLE=Sams Teach Yourself Linux in 24 Hours//-->
<!-- AUTHOR=Bill Ball//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=03 //-->
<!-- PAGES=0031-0040 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0035-0037.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch04/0041-0046.html">Next</A>
</CENTER></P>
<A NAME="PAGENUM-38"><P>Page 38</P></A>
<P>You should get a gray screen of little overlapping Xs (depending on the resolution
you're running at, you may or may not be able to make out the Xs) This is the default X
Window screen, and should be replaced after a short while by a blue-green screen and then a
start bar at the bottom of the screen. If the color changes to a blue-green but no start bar
appears, see if the bar is "off" the screen. X supports virtual desktops that are larger than what
you can actually see on the screen. Moving the mouse to the bottom of the screen might
show movement and a gray start bar at the bottom.
</P>
<H4><A NAME="ch03_ 10">
Common Problems and Their Solutions
</A></H4>
<P>This section covers most of the common problems you'll experience when starting
X Window, and how to solve them.
</P>
<B>
Screen Remains Black
</B>
<P>Wait for 30 seconds or so. On a 486/66 or slower machine X Window can take a
while to start. For some video cards, the driver may be having problems using it properly.
Type Control-Alt-Backspace and re-run
Xconfigurator.
</P>
<B>
Screen Remains Black and Machine Does Not Respond
</B>
<P>This is a worst-case scenario. You need to reboot the machine and let the machine
check the disk drives for errors. The Linux filesystem keeps track of what parts are allocated
and when a machine is shut down in a bad state, it needs to run the
fsck command to fix these items. Most times the start-up scripts can handle this without user intervention.
</P>
<B>
Very Large Xs Appear on the Screen
</B>
<P>In the case of very large overlapping Xs, the X server has probably gone into
320¥200 mode versus 640¥480. This problem occurs when the
video card is not detected correctly by the server. Exit out of X either with the hot keys Ctrl-Alt-Backspace or cleanly via the Start <BR>
button at the bottom of the screen. Check the file
startx.out by using the command less startx.out
and seeing if any errors that might help set up matters correctly were listed. Sometimes
the problem is that you may need to select a different RAMDAC or some other option for
that card.
</P>
<B>
Mouse Does Not Move or Acts Strangely
</B>
<P>If the mouse doesn't respond correctly to user input, it can be due to several problems.
The first is that the pointer section of the file was misconfigured by
mouseconfig and Xconfigurator. Xconfigurator gets the values for the mouse from the settings that are set by the
mouseconfig program. You should check the settings in the file
/etc/sysconfig/mouse or via the mouseconfig
</P>
<A NAME="PAGENUM-39"><P>Page 39</P></A>
<P>
program and then either rerun Xconfigurator or edit the
/etc/X11/XF86Config file. The section of the file should look something like the following:
</P>
<!-- CODE SNIP //-->
<PRE>
Section "Pointer"
Protocol "PS/2"
Device "/dev/mouse"
EndSection
</PRE>
<!-- END CODE SNIP //-->
<P>The protocol says which type of mouse X should try to use and the device says which
port it should look at. Further information on the types of mice supported can be found
by running the command man XF86Config.
</P>
<P>Another common reason for the mouse to fail is that the mouse is requiring
special initializations or is conflicting with another program (usually
gpm, which is a text mouse control program). In the case of possible conflicts, you should try stopping the
gpm program (/etc/rc.d/init.d/gpm stop) and then try starting X again. If this solves the problem, you may
find that you want to disable gpm altogether. To do this, run the
ntsysv command and toggle gpm off.
</P>
<P>For mice that need special configuration options the problem can sometimes be
avoided by treating the mouse as a modem and using a serial program to turn it on. In these
cases, changing mice can often be simpler.
</P>
<TABLE BGCOLOR=#FFFF99><TR><TD>TIME SAVER</TD></TR><TR><TD>
<BLOCKQUOTE>
Many Linux commands have documentation in one of several places.
Most commands are documented as a manual page that can be found with the
man command. To quickly find all the items that are related to XFree86, try
man -k XF86. This gives you a list of the documents to be called. A second place to
look for documentation is in the directories
/usr/doc and /usr/doc/HOWTO. The /usr/doc area contains documentation for packages that were installed onto your
system. The /usr/doc/HOWTO contains a reference area of various HOWTOs and
helpful tips on setting up items.
</BLOCKQUOTE>
</TD></TR></TABLE>
<H3><A NAME="ch03_ 11">
Having Your Machine Always Start in X Window
</A></H3>
<P>If you always want your machine to start the X Window manager so you don't have to
type startx when you log in, you only have to edit one file.
</P>
<P>Log in as root and edit the /etc/inittab file. This file is used by
init to start various utilities. Changing the line beginning with
id enables X to always start on boot.
</P>
<!-- CODE //-->
<PRE>
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode<BR>
</PRE>
<!-- END CODE //-->
<A NAME="PAGENUM-40"><P>Page 40</P></A>
<!-- CODE SNIP //-->
<PRE>
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
</PRE>
<!-- END CODE SNIP //-->
<P>The default run level of a Linux box is 3. Changing the number to 5, as it is in the
preceding example, starts the X Window system, using the
xdm program to manage logins.
</P>
<TABLE BGCOLOR=#FFFF99><TR><TD>Getting to a Virtual Terminal from X</TD></TR><TR><TD>
<BLOCKQUOTE>
While in X you can get back to a text virtual terminal by using the
Control-Alt keystrokes versus the normal Alt keystrokes. To change from the X
window (opened on terminal 7) to another console, press Ctrl-Alt-F2 to get to the
second virtual terminal. To get back, press Alt-F7.
</BLOCKQUOTE>
</TD></TR></TABLE>
<P><CENTER>
<a href="0035-0037.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch04/0041-0046.html">Next</A>
</CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -