775 lines
13 KiB
HTML
775 lines
13 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>The X Window System</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="The Linux FAQ"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Tips And Tricks"
|
|
HREF="tips.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Frequently Encountered Error Messages"
|
|
HREF="error-messages.html"></HEAD
|
|
><BODY
|
|
CLASS="sect1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>The Linux FAQ</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="tips.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="error-messages.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="x-windows"
|
|
></A
|
|
>16. The X Window System</H1
|
|
><DIV
|
|
CLASS="qandaset"
|
|
><DL
|
|
><DT
|
|
>Q: <A
|
|
HREF="x-windows.html#linux-support-x"
|
|
>Does Linux Support X?</A
|
|
></DT
|
|
><DT
|
|
>Q: <A
|
|
HREF="x-windows.html#get-x-window-system-work"
|
|
>How To Get the X Window System to Work</A
|
|
></DT
|
|
><DT
|
|
>Q: <A
|
|
HREF="x-windows.html#ready-made-xf86config"
|
|
>Where To Find a Ready-Made <TT
|
|
CLASS="filename"
|
|
>XF86Config</TT
|
|
> file</A
|
|
></DT
|
|
><DT
|
|
>Q: <A
|
|
HREF="x-windows.html#what-desktop-environments"
|
|
>What Desktop Environments Run on Linux?</A
|
|
></DT
|
|
><DT
|
|
>Q: <A
|
|
HREF="x-windows.html#xterm-logins-show-strangely"
|
|
><B
|
|
CLASS="command"
|
|
>xterm</B
|
|
> Logins Show Up Strangely in <B
|
|
CLASS="command"
|
|
>who</B
|
|
>, <B
|
|
CLASS="command"
|
|
>finger</B
|
|
></A
|
|
></DT
|
|
><DT
|
|
>Q: <A
|
|
HREF="x-windows.html#detach-xterm"
|
|
>How to Start a X Client on Another Display</A
|
|
></DT
|
|
></DL
|
|
><DIV
|
|
CLASS="qandaentry"
|
|
><DIV
|
|
CLASS="question"
|
|
><P
|
|
><A
|
|
NAME="linux-support-x"
|
|
></A
|
|
><B
|
|
>Q: </B
|
|
>Does Linux Support X?</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="answer"
|
|
><P
|
|
><B
|
|
>A: </B
|
|
>Yes. Linux uses XFree86 (the current version is 4.0, which is based on X11R6). You need
|
|
to have a video card which is supported by XFree86. See the
|
|
<I
|
|
CLASS="citetitle"
|
|
>XFree86 HOWTO</I
|
|
> for more details.
|
|
</P
|
|
><P
|
|
>Most Linux distributions nowadays come with an X installation. However, you
|
|
can install or upgrade your own, from
|
|
<A
|
|
HREF="ftp://metalab.unc.edu/pub/Linux/X11/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>ftp://metalab.unc.edu/pub/Linux/X11/</I
|
|
></A
|
|
>
|
|
and its mirror sites, or from <A
|
|
HREF="http://www.xfree86.org/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.xfree86.org/</I
|
|
></A
|
|
>.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="qandaentry"
|
|
><DIV
|
|
CLASS="question"
|
|
><P
|
|
><A
|
|
NAME="get-x-window-system-work"
|
|
></A
|
|
><B
|
|
>Q: </B
|
|
>How To Get the X Window System to Work</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="answer"
|
|
><P
|
|
><B
|
|
>A: </B
|
|
>The answers to this question can, and
|
|
do, fill entire books. If the installation program wasn't able to configure
|
|
the X server correctly, Linux will most likely try to start the X display,
|
|
fail, and drop back into text-only terminal mode.
|
|
</P
|
|
><P
|
|
>First and foremost, make certain that you have provided, as closely as possible, the
|
|
correct information to the installation program of your video hardware: the
|
|
video card and monitor. Some installation programs can correctly guess a
|
|
"least common denominator" screen configuration, like a 640-by-480
|
|
VESA-standard display, but there are many possible video hardware
|
|
configurations that may not be able to display this standard.
|
|
</P
|
|
><P
|
|
>The X Window System configuration file is called (usually) <TT
|
|
CLASS="filename"
|
|
>/etc/XF86Config</TT
|
|
>,
|
|
<TT
|
|
CLASS="filename"
|
|
>/etc/X11/XF86Config</TT
|
|
>, or
|
|
<TT
|
|
CLASS="filename"
|
|
>/usr/X11R6/lib/X11/XF86Config</TT
|
|
>.
|
|
</P
|
|
><P
|
|
>If you need to manually configure the X server, there are several possible methods:
|
|
</P
|
|
><P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
>Try to use the <B
|
|
CLASS="command"
|
|
>XF86Setup</B
|
|
> program, which can help identify the correct X
|
|
server and monitor timings for the video hardware.
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>Make sure that the X server has the correct options. If you
|
|
log in as the superuser, you should be able to use <TT
|
|
CLASS="literal"
|
|
>X
|
|
--probeonly</TT
|
|
> to get a listing of the video card chipset, memory, and
|
|
any special graphics features. Also, refer to the manual page for the X
|
|
server. (E.g.; <TT
|
|
CLASS="literal"
|
|
>man X</TT
|
|
>), and try running the X server and
|
|
redirecting the standard error output to a file so you can determine, after
|
|
you can view text on the screen again, what error messages the server is
|
|
generating; e.g., <TT
|
|
CLASS="literal"
|
|
>X 2>x.error</TT
|
|
>.
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>With that information, you should be able to safely refer to
|
|
one of the references provided by the Linux Documentation Project. ("Where
|
|
can I get the HOWTO's and other documentation? ") There are several HOWTO's
|
|
on the subject, including a HOWTO to calculate video timings manually if
|
|
necessary. Also, the <I
|
|
CLASS="citetitle"
|
|
>Installation and Getting Started</I
|
|
>
|
|
guide has a chapter with a step-by-step guide to writing a
|
|
<TT
|
|
CLASS="filename"
|
|
>XF86Config</TT
|
|
> file.
|
|
</P
|
|
></LI
|
|
></UL
|
|
><P
|
|
>Also, make sure that the problem really is an incorrect
|
|
<TT
|
|
CLASS="filename"
|
|
>XF86Config</TT
|
|
> file, not something else like the window
|
|
manager failing to start. If the X server is working correctly, you should be
|
|
able to move the mouse cursor on the screen, and pressing
|
|
<B
|
|
CLASS="keycap"
|
|
>Ctrl</B
|
|
>-<B
|
|
CLASS="keycap"
|
|
>Alt</B
|
|
>-<B
|
|
CLASS="keycap"
|
|
>Backspace</B
|
|
>
|
|
will shut down the X server and return to the shell prompt in one of the
|
|
virtual terminals.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="qandaentry"
|
|
><DIV
|
|
CLASS="question"
|
|
><P
|
|
><A
|
|
NAME="ready-made-xf86config"
|
|
></A
|
|
><B
|
|
>Q: </B
|
|
>Where To Find a Ready-Made <TT
|
|
CLASS="filename"
|
|
>XF86Config</TT
|
|
> file</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="answer"
|
|
><P
|
|
><B
|
|
>A: </B
|
|
>If you can't seem to get X working using the guidelines above, refer to the
|
|
<I
|
|
CLASS="citetitle"
|
|
>XFree86 HOWTO</I
|
|
>, recent versions of
|
|
<I
|
|
CLASS="citetitle"
|
|
>Installation and Getting Started</I
|
|
>, and the instructions
|
|
for the <B
|
|
CLASS="command"
|
|
>XF86Setup</B
|
|
> program.
|
|
</P
|
|
><P
|
|
>The contents of the <TT
|
|
CLASS="filename"
|
|
>XF86Config</TT
|
|
> file depend on the your
|
|
exact combination of video card and monitor. It can either be configured by
|
|
hand, or using the <B
|
|
CLASS="command"
|
|
>XF86Setup</B
|
|
> utility. Read the
|
|
instructions that came with XFree86, in
|
|
<TT
|
|
CLASS="filename"
|
|
>/usr/X11R6/lib/X11/etc</TT
|
|
>. The file you probably need to
|
|
look at most is <TT
|
|
CLASS="filename"
|
|
>README.Config</TT
|
|
>.
|
|
</P
|
|
><P
|
|
>You should not use the sample <TT
|
|
CLASS="filename"
|
|
>XF86Config.eg</TT
|
|
> file which
|
|
is included with newer versions of XFree86 verbatim, because the wrong video
|
|
clock settings can damage your monitor.
|
|
</P
|
|
><P
|
|
>Please don't post to <A
|
|
HREF="news:comp.os.linux.x"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>news:comp.os.linux.x</I
|
|
></A
|
|
> asking for an
|
|
<TT
|
|
CLASS="filename"
|
|
>XF86Config</TT
|
|
>, and please don't answer such requests.
|
|
</P
|
|
><P
|
|
>If you have a laptop, look at the Linux Laptop Web page at
|
|
<A
|
|
HREF="common-problems.html#my-notebook-runs-linux"
|
|
><I
|
|
>How Do I Find Out If a Notebook Runs Linux?</I
|
|
></A
|
|
>.
|
|
Many of
|
|
the installation notes also have the <TT
|
|
CLASS="filename"
|
|
>XF86Config</TT
|
|
> file for
|
|
the display. If you have a desktop machine, there are a few sample
|
|
<TT
|
|
CLASS="filename"
|
|
>XF86Config</TT
|
|
> files at <A
|
|
HREF="ftp://metalab.unc.edu/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>ftp://metalab.unc.edu/</I
|
|
></A
|
|
>. Refer also to the
|
|
<I
|
|
CLASS="citetitle"
|
|
>XFree86 FAQ</I
|
|
> <A
|
|
HREF="http://www.xfree.org/FAQ/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.xfree.org/FAQ/</I
|
|
></A
|
|
> and the monitor timings
|
|
list <A
|
|
HREF="http://www.xfree.org/#resources/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.xfree.org/#resources/</I
|
|
></A
|
|
>, and in the
|
|
<TT
|
|
CLASS="filename"
|
|
>/usr/X11R6/lib/X11/</TT
|
|
> directory of your X distribution.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="qandaentry"
|
|
><DIV
|
|
CLASS="question"
|
|
><P
|
|
><A
|
|
NAME="what-desktop-environments"
|
|
></A
|
|
><B
|
|
>Q: </B
|
|
>What Desktop Environments Run on Linux?</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="answer"
|
|
><P
|
|
><B
|
|
>A: </B
|
|
>Linux with XFree86 supports the
|
|
KDE, GNOME, and commercial CDE desktop environments, and extended window
|
|
managers like WindowMaker. Each uses a different set of libraries and
|
|
provides varying degrees of MS Windows-like look and feel.
|
|
</P
|
|
><P
|
|
>Information on KDE is available from <A
|
|
HREF="http://www.kde.org/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.kde.org/</I
|
|
></A
|
|
>. The KDE environment uses the
|
|
Qt graphics libraries, available from Trolltech at <A
|
|
HREF="http://www.trollTech.com"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.trollTech.com</I
|
|
></A
|
|
>.
|
|
The desktop uses its own window manager, kwm,
|
|
and provides a MS Windows-like look and feel.
|
|
</P
|
|
><P
|
|
>The GNOME home page is <A
|
|
HREF="http://www.gnome.org"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.gnome.org</I
|
|
></A
|
|
>.
|
|
The environment uses the free GTK libraries,
|
|
available from <A
|
|
HREF="http://www.gtk.org"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.gtk.org</I
|
|
></A
|
|
>, and window managers like
|
|
Enlightenment, <A
|
|
HREF="http://www.enlightenment.org"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.enlightenment.org</I
|
|
></A
|
|
>
|
|
and SawFish, <A
|
|
HREF="http://www.sawfish.org/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.sawfish.org/</I
|
|
></A
|
|
>.
|
|
There's also a Web page for <SPAN
|
|
CLASS="application"
|
|
>Red Carpet</SPAN
|
|
>, a
|
|
GNOME installation and upgrade utility that functions much like Debian's
|
|
<B
|
|
CLASS="command"
|
|
>apt-get</B
|
|
> utility with a friendly GUI front end.
|
|
It's at <A
|
|
HREF="http://www.ximian.com/products/redcarpet"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.ximian.com/products/redcarpet</I
|
|
></A
|
|
>.
|
|
</P
|
|
><P
|
|
>The commercial CDE environment uses the Motif libraries and a variation of
|
|
the Motif <B
|
|
CLASS="command"
|
|
>mwm</B
|
|
> window manager, <B
|
|
CLASS="command"
|
|
>dtwm</B
|
|
>, and
|
|
provides a suite of desktop and
|
|
session-management utilities. Several vendors have made the source
|
|
code of Motif available and provided binary packages for Linux
|
|
distributions. As a starting point, download and installation
|
|
information is available at <A
|
|
HREF="http://www.opengroup.org/openmotif/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.opengroup.org/openmotif/</I
|
|
></A
|
|
>.
|
|
</P
|
|
><P
|
|
>A free version of Motif, called LessTiF, is available from
|
|
<A
|
|
HREF="http://www.lesstif.org/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.lesstif.org/</I
|
|
></A
|
|
>.
|
|
</P
|
|
><P
|
|
>WindowMaker, <A
|
|
HREF="http://www.windowmaker.org/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.windowmaker.org/</I
|
|
></A
|
|
> is a window manager that
|
|
has many desktop environment-like features. It provides support for
|
|
GNUstep, <A
|
|
HREF="http://www.gnustep.org/"
|
|
TARGET="_top"
|
|
><I
|
|
CLASS="citetitle"
|
|
>http://www.gnustep.org/</I
|
|
></A
|
|
>, a clone of the
|
|
commercial NeXTStep environment.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="qandaentry"
|
|
><DIV
|
|
CLASS="question"
|
|
><P
|
|
><A
|
|
NAME="xterm-logins-show-strangely"
|
|
></A
|
|
><B
|
|
>Q: </B
|
|
><B
|
|
CLASS="command"
|
|
>xterm</B
|
|
> Logins Show Up Strangely in <B
|
|
CLASS="command"
|
|
>who</B
|
|
>, <B
|
|
CLASS="command"
|
|
>finger</B
|
|
></P
|
|
></DIV
|
|
><DIV
|
|
CLASS="answer"
|
|
><P
|
|
><B
|
|
>A: </B
|
|
>The <B
|
|
CLASS="command"
|
|
>xterm</B
|
|
> that comes with XFree86 2.1 and
|
|
earlier doesn't correctly understand the format that Linux uses for the
|
|
<TT
|
|
CLASS="filename"
|
|
>/var/adm/utmp</TT
|
|
> file,
|
|
where the system records who is logged in. It therefore doesn't set
|
|
all the information correctly.
|
|
</P
|
|
><P
|
|
>The <SPAN
|
|
CLASS="application"
|
|
>xterms</SPAN
|
|
> in XFree86 3.1 and later versions
|
|
fix this problem.
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="qandaentry"
|
|
><DIV
|
|
CLASS="question"
|
|
><P
|
|
><A
|
|
NAME="detach-xterm"
|
|
></A
|
|
><B
|
|
>Q: </B
|
|
>How to Start a X Client on Another Display</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="answer"
|
|
><P
|
|
><B
|
|
>A: </B
|
|
>To start a X client on another system that has a running X
|
|
server, use the following commands:
|
|
</P
|
|
><P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
>Use <SPAN
|
|
CLASS="application"
|
|
>xhost</SPAN
|
|
> on the server system
|
|
to allow the client system use the display. If the server's
|
|
IP address is 192.168.20.1, enter the command:
|
|
</P
|
|
><P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
>$ xhost + 192.168.20.1</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>On the client system, open a telnet connection to the server system.
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
>In the telnet session, start a <SPAN
|
|
CLASS="application"
|
|
>xterm</SPAN
|
|
> in
|
|
the background with the <TT
|
|
CLASS="literal"
|
|
>-display</TT
|
|
> and
|
|
<TT
|
|
CLASS="literal"
|
|
>-e</TT
|
|
> options. For example, if the IP address of
|
|
the machine running the server is 192.168.20.1 and the client
|
|
program name is named <B
|
|
CLASS="command"
|
|
>clientapp</B
|
|
>, use the following command:
|
|
</P
|
|
><P
|
|
><TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> $ xterm -display 192.168.20.1 -e clientapp &</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
></LI
|
|
></UL
|
|
><P
|
|
>[Pierre Dal Farra]
|
|
</P
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="tips.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="error-messages.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Tips And Tricks</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Frequently Encountered Error Messages</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |