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

📄 linux-x-config.html

📁 Linus guide, Linus guide, Linus guide,
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><HTML><HEAD><TITLE>Josh's Linux Guide - Configuring and Troubleshooting X</TITLE>   <META NAME="Author" CONTENT="Joshua Go">   <META NAME="Description" CONTENT="A Linux help guide on basic concepts of troubleshooting the X window system.">   <META NAME="Keywords" CONTENT="X, x, configuration, errors, Linux, troubleshoot"></HEAD><LINK REL="stylesheet" TYPE="text/css" HREF="default.css"><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#7F007F"><H2><A NAME="0">Configuring and Troubleshooting X</A></H2><FONT SIZE="-1"><B>Last modified: July 16, 1999</B></FONT><BR><FONT SIZE="-1"><B>Development stage: Beta</B></FONT><P>This section is guaranteed to be long, so if you want to read the wholething, it's your choice. This includes just some basic things for Red Hat5.2, based on <A HREF="http://www.xfree86.org" TARGET="_top">XFree86</A>version 3.3.3.1. This information should also work for other Linuxdistributions.</P><P>I'm assuming you already have XFree86 installed, along with itslibraries. If not, install them. In Red Hat, TurboLinux, Mandrake, SuSE,and Stampede, they come in RPM files thatstart with &quot;XFree86&quot;. If you want to install the files from the tarred andgzipped form, read <A HREF="linux-X-upgrade.html">Upgrading and InstallingX</A>.</P><OL>	<LI><A HREF="#what">What's an X Server?</A>	<LI><A HREF="#configure">Configuring X</A>	<LI><A HREF="#commonerror">A Common Error Message</A>		<UL>		<LI><A HREF="#commonerror_solutionone">Solution One</A>		<LI><A HREF="#commonerror_solutiontwo">Solution Two</A>		</UL>	<LI><A HREF="#grayscreen">The Infamous Gray Screen</A>	<LI><A HREF="#alias">Alias to Start X</A>	<LI><A HREF="#virtualdesktopoff">Turning Off Virtual Desktop</A>	<LI><A HREF="#fonts">Additional Fonts</A>	<LI><A HREF="#mousetrouble">Mouse Trouble</A>	<LI><A HREF="#newercards">Newer Cards</A></OL><A NAME="what"></A><H3><A NAME="1">What's an X Server?</A></H3><P>An X server is sort of like a video driver (that's the best I canexplain it...) that the system uses to run the graphical user interface. There are too many changing X servers to list here, but there are SVGA,VGA, and Monochrome, which are the most basic. There are also commercial Xservers which I know virtually nothing about.</P><P>The X server you choose to use depends on the type of chip your videocard uses to process graphics. It also determines how many colors will bedisplayed in X (the amount of video memory you have also determines that).When you key in <B>startx</B> and the error under &quot;A Common ErrorMessage&quot; appears, you should make sure that you installed the serverthat you configured for.</P><P>The X server I used was the S3V. That stands for S3 ViRGE, since myDiamond Stealth 3D 2000 used that chip. When I got a Creative Labs GraphicsBlaster Riva TNT (PCI), I switched to the SVGA server because the SVGA serverwas the one that had support for the Riva TNT chipset.</P><A NAME="configure"></A><H3><A NAME="2">Configuring X</A></H3><P>If there is any kind of error given when you execute the<B>startx</B> script, you probably should run <B>Xconfigurator</B> or<B>xf86config</B>. These will configure the keyboard, the mouse, the videocard, the monitor, and some other stuff so that X will run properly. Thesettings are stored in a file called XF86Config. On my system, it's in<TT>/etc/X11/XF86Config</TT>. You can edit that with a text editor such aspico, vi, joe, jed, or emacs.</P><P>A lot of people have trouble configuring X, especially beginners andlong-time text mode users. The best thing to do when there are no manualsavailable is to guess. It might take a few hundred tries, but usingdefaults will usually get you by. For example, I didn't know which RAMDACand Clockchip setting to use when eventually I read the littlecomments/tips on the screen and decided to try <I>not</I> using a RAMDACor Clockchip setting for my card. It turns out that I wasn't supposed touse those settings in the first place.</P><P>It will help you <I>greatly</I> if you know your hardware settings orhave your hardware manuals handy. If not, experiment.</P><A NAME="commonerror"></A><H3><A NAME="3">A Common Error Message</A></H3><P>The following error message is very common among new users, and oftenvery confusing as well:</P><PRE>_X11TransSocketUNIXConnect: Can't connect: errno = 111giving up.xinit:  Connection refused (errno 111):  unable to connect to X serverxinit:  No such process (errno 3):  Server error.</PRE><A NAME="commonerror_solutionone"></A><H4><A NAME="4">Solution One</A></H4><P>One solution to this is to install the server you chose for your videocard's chipset (the type and brand of chip it uses to process videoinformation). In Red Hat, you install the RPM package that describes whichserver it is by the first few characters in its filename. The common Xservers are as following, with their RPM package filenames inparentheses:</P><UL><LI>AGX (XFree86-AGX-3.3.2-8.i386.rpm)</LI><LI>I128 (XFree86-I128-3.3.2-8.i386.rpm)</LI><LI>Mach32 (XFree86-Mach32-3.3.2-8.i386.rpm)</LI><LI>Mach64 (XFree86-Mach64-3.3.2-8.i386.rpm)</LI><LI>Mach8 (XFree86-Mach8-3.3.2-8.i386.rpm)</LI><LI>Mono (XFree86-Mono-3.3.2-8.i386.rpm) - Black and white display</LI><LI>P9000 (XFree86-P9000-3.3.2-8.i386.rpm)</LI><LI>S3 (XFree86-S3-3.3.2-8.i386.rpm)</LI><LI>S3V/S3 ViRGE (XFree86-S3V-3.3.2-8.i386.rpm)</LI><LI>SVGA (XFree86-SVGA-3.3.2-8.i386.rpm) - Works with most cards, 256 colors</LI><LI>VGA (XFree86-VGA16-3.3.2-8.i386.rpm) - works with most cards, 16 colors</LI><LI>W32 (XFree86-W32-3.3.2-8.i386.rpm)</LI></UL><P>To avoid as much trouble as possible, install these RPM packages ifyou're using Red Hat.</P><OL><LI>XFree86-3.3.2-8.i386.rpm - XFree86</LI><LI>XFree86-devel-3.3.2-8.i386.rpm - Lets you compile stuff</LI><LI>XFree86-libs-3.3.2-8.i386.rpm - X libraries</LI><LI>XFree86-SVGA-3.3.2-8.i386.rpm - 256 color X server</LI><LI>XFree86-100dpi-fonts-3.3.2-8.i386.rpm - Fonts</LI><LI>XFree86-75dpi-fonts-3.3.2-8.i386.rpm - Fonts</LI><LI>Xconfigurator-3.57-2.i386.rpm - Helps with configuring X</LI></OL><P>For more information on installing and upgrading X, you might want toread <A HREF="linux-X-upgrade.html">Installing and Upgrading X</A>.</P><P>If you want to run at more than 256 colors use another X server that ismade especially for the type of chip that's on your video card. Thespecial X servers are made for the newer PCI video cards, but ISA graphicsaccelerator cards could possibly also use the special X servers.</P><A NAME="commonerror_solutiontwo"></A><H4><A NAME="5">Solution Two</A></H4><P>Another possible cause for the &quot;_X11TransSocketUNIXConnect&quot; error is that the mode that is chosen (or the mode that you set it to) isnot valid. This can be because of monitor settings that are too high ortoo low for your video card. I discovered this when I set my monitor'shsync (horizontal sync) and vsync (vertical sync) ranges to settings thatwere too high, although I had the proper X server for my card. Then Itried them really low, and then I was allowed into X--but the resolutionwas very low. I finally decided on something in the middle and that seemedto work.</P><P>Those monitor settings (hsync and vsync ranges I think) will also havean effect on what resolution you can run at. Again, setting those too lowwill get X to make you run at a very low resolution, so that everythinglooks huge and blocky. Try entering your own ranges if your <B>monitormanual</B> has the settings. You can also select what type of monitor youhave from XFree86's list of monitors. My MAG Innovision DX15T was notlisted but something close was, the DX1595, and it had the exact hsync andvsync ranges that my monitor had (when I finally found it in themanual).</P><P>Otherwise, you can try the lowest setting and work your way up, try thehighest setting and work your way down, or choose something in the middleand see if your monitor supports it. Be careful: if the setting you chooseis too high, you could seriously damage your monitor.</P><A NAME="grayscreen"></A><H3><A NAME="6">The Infamous Gray Screen</A></H3><P>Many people encounter the problem of starting X (startx), seeing anX-shaped mouse-pointer-thingy, a gray screen, and being taken back to textmode with no window manager loading and no error messages. If it doesn'ttake you back to text mode, try the Ctrl-Alt-[Backspace] combination.</P><P>The way I found I could solve this was to create a <B>.xinitrc</B> inmy home directory and putting the line <B><TT>exec afterstep</TT></B> init. That seemed to work fine and it loaded the AfterStep window manager.As you can probably figure out, you'll have to replace <B>afterstep</B>with whatever window manager you're using. If I wanted to use fvwm, I'dput in <B>exec fvwm</B> instead.</P><P>Now suppose you want to run multiple window managers; of course, youcan run only one at a time in each X session, but you don't want to typeeverything in again. The solution is to type in the startup lines of eachwindow manager then comment out all the ones that you don't want to use,leaving one line uncommented so that it'll run. Here's how my .xinitrc

⌨️ 快捷键说明

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