home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / Other / Coherent / DemonArchives / docs / xfree.faq.z / xfree.faq
Encoding:
Text File  |  1994-01-06  |  32.9 KB  |  648 lines

  1. Archive-name: linux/howto/xfree86
  2. Last-modified: 17 November 1993
  3.  
  4. $Id: XFree86-HOWTO,v 1.2 1993/11/17 00:00:00 geyer Rel $
  5.  
  6. Comments or suggestions on this HOWTO are very welcome, i.e. if you feel that
  7. something is missing or something is obsolete or wrong, please let me know.
  8.  
  9. The Linux XFree86 HOWTO, version 1.2
  10. ------------------------------------------------------------------------------
  11. by Helmut Geyer (geyer@kalliope.iwr.uni-heidelberg.de) 
  12. with help from Dirk Hohndel (hohndel@informatik.uni-wuerzburg.de)
  13.            and David E. Wexelblat (dwex@aib.com)
  14.  
  15. This document describes how to obtain, install and configure XFree86-2.0 for
  16. Linux systems. XFree86 is an enchanced version of the X Window System,
  17. version 11 release 5, with support for many versions of UNIX running on
  18. Intel i386/486 platforms, including Linux. It support a great amount of
  19. video hardware for these systems and includes many bugfixes beyond the MIT
  20. standard release of X.
  21.  
  22. This document is intended to help Linux users install and configure XFree86
  23. v2.0, which was released on 31 October 1993. It is furthermore intended to
  24. answer some basic questions about X and programs using X.
  25.  
  26. Please read this file and the referenced documentation files BEFORE
  27. installing and starting XFree86. IF YOU ARE NOT CAREFUL, YOU MIGHT DAMAGE
  28. YOUR HARDWARE.
  29.  
  30. This file comes WITHOUT ANY WARRANTY OF FITNESS. If you damage anything
  31. following these informations, you are on your own. For a complete
  32. description of the features and the installation please look at the
  33. documentation files and manuals that come with XFree86 (residing in
  34. /usr/X386/lib/X11/etc and its subdirs as well as in /usr/X386/man).  The
  35. most important files will be pointed out to you in this HOWTO. Note that
  36. this HOWTO gives not complete information on setting up XFree86, but that
  37. you have to get the documentation files for XFree86 (from the file
  38. xf86-doc-2.0.tar.gz).
  39.  
  40. Other man pages from the stock X11R5 distribution can be found in
  41. xf86-man-2.0.tar.gz. These manfiles come as sources for the nroff program.
  42. To read them you will need a working man program as well as the groff
  43. package for formatting them. Note that it is often required to read
  44. manpages, so you should install the groff package anyway. (I think it is no
  45. good idea that in many distributions this package is considered optional).
  46.  
  47. New versions of this document will be posted to comp.os.linux.announce, as
  48. well as archived on sunsite.unc.edu:/pub/Linux/HOWTO.
  49.  
  50. Contents:
  51.  
  52.    0. Introduction - What are X11R5 and XFree86?
  53.    1. Supported Hardware
  54.    2. Where do I get XFree86 and what do I need to run it? 
  55.    3. Configuring XFree86
  56.    4. tinyX - a package for systems with low memory
  57.    5. X related packages
  58.    6. Compiling programs that use X
  59.    7. Programming in X
  60.    8. Finding Information on X on the net
  61. Appendix: Some Questions & Answers
  62.  
  63. 0. Introduction - What are X11R5 and XFree86?
  64.  
  65.     X11R5 is a windowing system for UN*X like operating systems.  The X
  66.     Windowing System is issued by the MIT Consortium (look at the X(1)
  67.     manpage for more information) and is put under a very liberal copyright,
  68.     that allows any use of source code provided that the original copyright
  69.     notices are included.
  70.     As X is THE standard windowing system for UN*X operating systems, there
  71.     are a lot of applications using it (both free and commercial).
  72.  
  73.     XFree86 is a port of X11R5 that supports several versions of Intel-based
  74.     Unix and Unix-like operating systems.  The XFree86 servers are partly
  75.     derived from X386 1.2, which was the X server distributed with X11R5,
  76.     but many of them are newly developed. The accelerated servers that are
  77.     the most important change since XFree86-1.3 are completely new. This
  78.     release consists of many new features and performance improvements as
  79.     well as many bug fixes.  The release is available as source patches
  80.     against the MIT X11R5 code, as well as binary distributions for many
  81.     architectures.
  82.  
  83.     Note that while the source and installation trees retain the name 'X386'
  84.     name (for simplicity of maintenance of the source tree), there is no
  85.     connection between XFree86 and the commercial X386 product sold by SGCS.
  86.     The XFree86 Core Team maintains technical contacts with SGCS in an
  87.     effort to keep user-affecting changes to the workings of the products
  88.     from diverging too radically.  There is no direct involvement of either
  89.     group in the workings of the other.
  90.  
  91.     You will find more information on the XFree86-2.0 release and the
  92.     XFree86 project in the file README from the documentation tarfile.
  93.  
  94. 1. Supported Hardware
  95.  
  96.     As this is the most often asked question, this will be the first
  97.     section.  Currently XFree86 (Version 2.0) supports the following
  98.     chipsets in the XF86_SVGA server (note that it depends on the chipset
  99.     whether a card is working and not on the vendor, with Diamond notably
  100.     excluded, cf. the remark at the end of this paragraph):
  101.  
  102.     nonaccelerated chipsets:
  103.         Tseng ET3000, ET4000AX, ET4000/W32
  104.         Western Digital/Paradise PVGA1
  105.         Western Digital WD90C00, WD90C10, WD90C11, WD90C30
  106.         Genoa GVGA
  107.         Trident TVGA8800CS, TVGA8900B, TVGA8900C, TVGA8900CL, TVGA9000
  108.         ATI 28800-4, 28800-5, 28800-a
  109.         NCR 77C22, 77C22E
  110.         Cirrus Logic GLGD5420, CLGD5422, CLGD5424, CLGD6205, CLGD6215, 
  111.                      CLGD6225, CLGD6235
  112.         Compaq AVGA
  113.         OAK OTI067, OTI077
  114.     accelerated chipsets:
  115.         Cirrus CLGD5426, CLGD5428
  116.         Western Digital WD90C31
  117.     
  118.     These chipsets are all supported in 256 color (XF86_SVGA) and in
  119.     monochrome mode (XF86_Mono) with the exception of the ATI and Cirrus
  120.     chipsets, which are only supported in 256 color mode. Note that the
  121.     ET4000/W32 is only supported as a ET4000 clone and none of the
  122.     accelerated functions are used.
  123.     
  124.     The monochrome server also supports generic VGA cards (using 64k of the
  125.     video memory as a single bank), the Hercules card and the Hyundai
  126.     HGC-1280.
  127.  
  128.     There is an (experimental) additional server that works on generic VGA
  129.     hardware: XF86_VGA16, a 16 color server.
  130.  
  131.     XFree86-2.0 supports the following accelerated chipsets with seperate
  132.     servers:
  133.  
  134.         S3  86C911, 86C924, 86C801, 86C805, 86C928 supported by 
  135.             the XF86_S3 server
  136.         ATI mach8   supported by the XF86_Mach8 server
  137.         ATI mach32  supported by the XF86_Mach32 server
  138.         IBM 8514/a and true clones supported by the XF86_8514 server
  139.  
  140.      No other chipsets are supported; not Weitek P9000, not TIGA, not IIT
  141.      AGX, not Microfield, etc.  Support for some of these will likely be
  142.      provided in future XFree86 releases.  TIGA will never be supported, as
  143.      it requires licensing materials from TI (and may disallow source
  144.      distributions); Microfield boards will never be supported, as they use
  145.      proprietary and undocumented custom microcode interfaces.
  146.  
  147.  
  148.     NOTE further: The following is a statement of the XFree86 Core Team 
  149.          concerning graphic cards by Diamond:
  150.          
  151.         All Diamond cards are NOT supported by XFree86 even if they
  152.         have a supported chipset (with  the exception of the Cirrus
  153.         chipsets that have an internal clock generator). The reason
  154.         for this is that Diamond has changed  the mechanism used to
  155.         select  pixel   clock  frequencies, and  will only  release
  156.         programming information under  non-disclosure.   We are not
  157.         willing to do this (as it would mean  that source cannot be
  158.         provided).  We have had discussions with Diamond over this,
  159.         and they do not  intend to  change  this policy.  Hence  we
  160.         will do nothing  to support Diamond products  going forward
  161.         (i.e.  don't  send us a program  to run  set their clocks).
  162.         XFree86 DOES NOT SUPPORT  DIAMOND HARDWARE.  It is possible
  163.         to make some  of it work, but  we will not assist  in doing
  164.         this.
  165.  
  166.  
  167.     The author of this HOWTO does support this statement completely. If you
  168.     have read this and bought nevertheless a card from Diamond, you will
  169.     damage the idea of free software as Diamond does not support the efforts
  170.     of a free X11 server.
  171.  
  172.     However, if you are stuck with a card from Diamond, there is a
  173.     compilation of the needed things to get XFree86 running on some of these
  174.     cards. It is called the Diamond-FAQ and can be obtained from tsx-11 or
  175.     sunsite in the docs directories.
  176.  
  177.     Do not ask the XFree86 team about Diamond hardware.  You will simply
  178.     annoy them, and get no information.
  179.  
  180.     For some of these chipsets there are specific README files (to be found
  181.     in /usr/X386/lib/X11/etc). If there is one for the chipset you use, read
  182.     it!!  In these READMEs the specific options that can be used to
  183.     configure the server are explained.
  184.     
  185.     More information on the servers can be found in their manpages.
  186.  
  187.     Later more on configuring the servers.
  188.  
  189. 2. Where do I get XFree86 and what do I need to run it??
  190.  
  191.     This section is dedicated to the Linux binary distribution so all file
  192.     names and site names are for Linux only. If you read this file and are
  193.     not using Linux, you should get your hands on the announcement of
  194.     XFree86-2.0 for you OS. In it you will find all necessary information on
  195.     obtaining it.
  196.  
  197.     You can get the binary distribution of XFree86-2.0 for Linux via 
  198.     anonymous FTP from 
  199.       tsx-11.mit.edu:/pub/linux/packages/X11/XFree86-2.0
  200.           or
  201.        sunsite.unc.edu:/pub/Linux/X11/XFree86-2.0 
  202.     and all MIRRORS of these two.
  203.      
  204.     You can find an incomplete list of sites mirroring these in the
  205.     BBS-list that gets regularly posted to comp.os.linux.announce or can be
  206.     found on both sites in the docs directory.
  207.        
  208.     The distribution consists of several gzipped tarfiles (some are too big
  209.     to fit on one floppy disk, you may have to split them):
  210.  
  211.     XF86_8514.tar.gz      An accelerated server for cards using IBM8514 chips
  212.     XF86_Mach32.tar.gz    An accelerated server for cards using Mach32 chips
  213.     XF86_Mach8.tar.gz     An accelerated server for cards using Mach8 chips
  214.     XF86_Mono.tar.gz      A Monochrome server
  215.     XF86_S3.tar.gz        An accelerated server for cards using S3 chips
  216.     XF86_SVGA.tar.gz      An SVGA server (most chipsets use this)
  217.     XF86_VGA16.tar.gz     A server for 16 colour graphics modes
  218.     xf86-svr-2.0.tar.gz   All of the above servers
  219.     xf86-bin-2.0.tar.gz   Client programs
  220.     xf86-cfg-2.0.tar.gz   XDM configuration files and chooser
  221.     xf86-fnt-2.0.tar.gz   Fonts (all of them)
  222.     xf86-kit-2.0.tar.gz   Linkkit for building your own X servers
  223.     xf86-lib-2.0.tar.gz   Dynamic libraries, bitmaps and minimal fonts
  224.     xf86-man-2.0.tar.gz   Manual pages (both client + programmer)
  225.     xf86-pex-2.0.tar.gz   PEX libraries and sample clients
  226.     xf86-prg-2.0.tar.gz   Static libs, dynamic stubs, configs and
  227.                             include files
  228.     xf86-doc-2.0.tar.gz   Documentation and release notes for XFree86 2.0
  229.     xf86-doc2-2.0.tar.gz  This file contains the manpage for Xconfig that
  230.                             has mistakenly been left out of the -doc- file.
  231.  
  232.     You will need libc 4.4.1 or newer to run XFree86-2.0. For the
  233.     accelerated servers you need Linux 0.99pl13 or newer (a working complete
  234.     mmap is needed for these).
  235.  
  236.     The SVGA, VGA16 and Mono servers will work on Linux 0.99pl12 and newer.
  237.     Furthermore you will need to install David Engel's shared dynamic linker
  238.     ld.so version 1.3 or newer. You can find the most recent version on all
  239.     mirrors of tsx-11 in the /pub/linux/packages/GCC directory.
  240.  
  241.     You will need a main memory of at least 8 MB and a virtual memory of at
  242.     least 16 MB (i.e. main memory + swap). It is possible to run X on a 4 MB
  243.     machine if you take some precautions on memory usage (look at section 4,
  244.     where a package for low memory systems is described). Note that you
  245.     should nevertheless have 16 MB of virtual memory. (So if you have 4 megs
  246.     of physical RAM, and 12 megs of swap, you're okay.) It is recommended
  247.     that you have *at least* 8 megs of physical RAM, as swap is very slow.
  248.     With only 4 megs of physical RAM, performance will suffer greatly.
  249.  
  250.     If you want to run memory-hog programs from within X (as e.g. gcc) you
  251.     should at least have 16 MB of main memory and another 16MB of swap.
  252.  
  253.     You will need about 17 MB of disk space for the complete installation
  254.     without LinkKit, 21 MB with LinkKit. By deleting those servers that you
  255.     don't need and removing the LinkKit after linking your own server, you
  256.     can save several MB of diskspace. A more concise listing on the needed 
  257.     disk space and the contents of the distribution files can be found in the
  258.     release notes by Simon Cooper. These can be found in the 00README file
  259.     residing in the XFree86-2.0 directory.
  260.  
  261.     Before installing XFree86, you should make a backup of all files that
  262.     you changed. They may not be usable, but they still hold a lot of
  263.     information you might want to preserve. (This includes your old XConfig
  264.     files.)
  265.  
  266.     To install the binary distribution you have to do the following as root
  267.     in the / directory with all needed tarfiles from above.  To get all
  268.     permission right you should use umask 022.
  269.     
  270.     gzip -dc tarfilename | tar xvvof -
  271.  
  272.     WARNING: This will overwrite all files from an older XFree86 version, of
  273.     course not the Xconfig file (if you did not link it to Xconfig.sample,
  274.     which you should NOT do). In other words, ionly if Xconfig.sample is
  275.     linked to your Xconfig, it will be overwritten.
  276.  
  277.     After installing it, you will have to set it up correctly to match your
  278.     system. This is described in section 3.
  279.  
  280. 2.1 What do I do if I want to compile it myself?
  281.  
  282.     This is explained in the INSTALL, README and README.Linux files coming
  283.     with XFree86. You should do that, however, only if you want to have some
  284.     special changes to the standard distribution, as you will need a lot of
  285.     CPU time and disk space to do this. If you only want to change the
  286.     configuration of a server, you should use the Link Kit, as this is much
  287.     easier to handle and will not need that much resources by far.
  288.  
  289.     For adding drivers to the SVGA server you will only need the Link Kit.
  290.     The Link Kit comes with documentation on writing drivers for SVGA. You
  291.     can find it in the directory /usr/X386/lib/Server/VGADriverDoc.
  292.  
  293. 3. Configuring XFree86
  294.  
  295.     From version 2.0 on all documentation files for XFree86 are combined in
  296.     one tarfile, xf86-doc-2.0.tar.gz. You have to get this file and look
  297.     through those files to configure XFree86 correctly. The following steps
  298.     are intended as a guide to these files.
  299.  
  300.     There is a very good introduction to configuring XFree86 in the
  301.     README.Config coming with XFree86-2.0. Start there to configure XFree86
  302.     and follow the instructions step by step.
  303.  
  304.     Furthermore you MUST read the manpages for Xconfig, XFree86 and the
  305.     server you want to set up (one of XF86_SVGA, XF86_Mono, XF86_VGA16,
  306.     XF86_S3, XF86_Mach8, XF86_Mach32 or XF86_8514). Just look in section 1,
  307.     which server supports the chipset of your graphic card and use this.
  308.  
  309.     If you are not sure, which chipset your graphic card has (this should
  310.     only happen, if you do not have a manual for your card), you can try to
  311.     identify it by running SuperProbe, a graphic hardware detection program
  312.     that comes with XFree86-2.0. You should, however, rely on the
  313.     information of your manuals and not on that of SuperProbe (even if it is
  314.     in most cases correct).
  315.  
  316.     Note that if SuperProbe does not detect your chipset correctly, the
  317.     XFree86 servers will neither. Note further that SuperProbe detects far
  318.     more hardware than XFree86 servers support.
  319.  
  320.     There is a list of accelerated graphic cards that are reported to work
  321.     with XFree86-2.0 in the file AccelCards. Look through it to see, whether
  322.     your card is already in the database. While other boards not listed may
  323.     well work, The XFree86 team gives no assurances of that.
  324.  
  325.     If you were running XS3, you should itake a look at README.XS3, as some 
  326.     things did change while incorporating the XS3 server into XFree86.
  327.  
  328.     For configuring you will need the following information on your system:
  329.  
  330.     1. The specifications of your monitor (i.e. which vertical and horizontal
  331.        frequences can it handle and which video bandwidth has it). This is 
  332.        the most important thing of all as you can toast your monitor using 
  333.        incorrect video modes and you will need these specifications to check 
  334.        the modes.
  335.     2. You need the name of the chipset (confer the remarks above). Note
  336.        that there are some companies using "s3" as a synonym for "accelerated"
  337.        chipset, so this is often not true. Please check it out in your
  338.        manuals.
  339.     3. Amount of video memory supplied by your card (this is usually detected
  340.        correctly, but it is better to have the exact number and compare it 
  341.        with the detected)
  342.     4. Which dot-clocks are available for your card, or is your dot-clock 
  343.        programmable. This is the hardest part for the graphic card setup.
  344.        How to obtain these is described in the README.config.
  345.     5. The protocol your mouse uses and the device it is connected to. The 
  346.        available mouse protocols are listed in the Xconfig manpage. The 
  347.        standard names of the mouse devices for Linux are:
  348.        /dev/bmouseatixl for the ATI XL busmouse (NOTE: the ATI GU busmouse
  349.                                 is in fact a logitech busmouse)
  350.        /dev/bmouselogitec for the Logitech busmouse (NOTE: this uses the 
  351.                                 busmouse protocol, NOT the Logitech protocol)
  352.        /dev/bmousems for the microsoft busmouse
  353.        /dev/ps2aux (or /dev/bmouseps2) for a ps/2 or quickport mouse
  354.        The other supported mice are serial mice and therefore connected
  355.        to one of the serial ports (named /dev/ttyS? or /dev/ttyS?? for Linux).
  356.  
  357.     So now procede as in README.Config. If your Monitor is not listed in the
  358.     modeDB.txt file, you should try one of the generic modes.  ENSURE THAT
  359.     THE SPECS OF THE MODES ARE WITHIN THE SPECS OF YOUR MONITOR.  If you
  360.     want to tune these modes or to compute a mode of your own, you MUST read
  361.     VideoModes.doc and follow the instructions there.  Before trying a mode,
  362.     compute the specs of this mode and again look if your monitor does
  363.     support it. Here is no further description of computing VideoModes,
  364.     as you should not do this without having read VideoModes.doc.
  365.  
  366.  
  367.     WARNING: Do NOT EVER share Xconfig files with people  who do not have
  368.        EXACTLY the same Configuration (i.e. graphic card AND monitor). By
  369.        doing  this you could  toast your  monitor.  It isn't  so hard  to
  370.        figure out modes (that is, for  multisync monitors) and you surely
  371.        shouldn't ever use a mode that you  didn't check by yourself to be
  372.        within your  monitor's specs.  Even if  you have  exactly the same
  373.        setup  you should check      all  modes yourself   before   trying
  374.        them. There are  many people who  run their hardware out of  specs
  375.        which may not damage their hardware but could yours.
  376.  
  377. 3.1 Configuring the keyboard for non-US-layout
  378.  
  379.     If you do not change the standard settings, the server will start up
  380.     with an US-american keyboard layout regardless which keyboard layout was
  381.     configured for the kernel. If you want to have a different layout, look
  382.     at the xmodmap(1) manpage. There are example Xmodmaps available at
  383.     sunsite.unc.edu:/pub/Linux/X11/misc for several languages and keyboard
  384.     layouts.
  385.  
  386. 4.  tinyX - a XFree86 based package for low memory systems
  387.  
  388.     If you have not enough memory to run the stock XFree86 distribution, you
  389.     might try to get this package. It is based on XFree86, so the difficult
  390.     parts of the configuration (setting up the Xconfig file) are
  391.     identical. To run it you need at least 4 MB RAM and another 8 MB swap
  392.     space.  There are now several tinyX versions, one for each of the
  393.     different servers supplied by XFree86-2.0. Please read the above
  394.     description of the servers to get the right version of tinyX. These
  395.     packages are named like
  396.  
  397.         tinyX-YYY-2.0.tar.gz, where YYY denotes the server name (without
  398.                                leading XF86_)
  399.  
  400.     You can find tinyX on sunsite.unc.edu in the /pub/Linux/X11 hierarchy.
  401.     Please look in your neighbourhood for a Mirror of it (cf. the BBS-list
  402.     that can be found on most linux sites).  You untar it as root from
  403.     /. After this you have to setup a Xconfig file as described in section
  404.     3.  The documentation and READMEs for tinyX as well as most of the
  405.     XFree86-2.0 documentation files can be found in /readmes. Read the
  406.     XFree86 documentation files _before_ setting up a Xconfig file as they
  407.     are required for this.
  408.  
  409.     The tinyX documentation includes a lot of useful information on memory
  410.     saving techniques. You should follow at least some of these suggestions,
  411.     as running X while swapping constantly is no fun at all :-(.  If you are
  412.     running out of memory your system will lock up completely (in many cases
  413.     the only way out is to turn off power or to make a hard reset - both is
  414.     very dangerous for your filesystem). So read these files before starting
  415.     X so that this does not happen.
  416.  
  417.     As tinyX does not include all documentation available with XFree86-2.0, 
  418.     you might notice that you are pointed to a file that is not included.
  419.     In this case you must get the rest of the documentation files (and
  420.     perhaps the manpages, too) from any XFree86-2.0 site (cf. 2.). If you 
  421.     have enough disk space for that, this is highly recommended anyway.
  422.         Note that XFree86 specific manpages (as the Server manpages,...)
  423.         are not in the *-man-* but in the *-doc* files.
  424.  
  425.  
  426. 5.  X - related packages
  427.  
  428.     There are a lot of packages that are related to X. I mention two here,
  429.     because they have a great influence on the look-and-feel of X.
  430.  
  431.     - The xview3L5.1.tar.gz package 
  432.  
  433.       This package is a port of SUN(TM)'s xview3.2 package by Kenneth
  434.       Osterberg to Linux. It includes the xview toolkit, a set of extensions
  435.       to X. It will give you the look-and-feel of the Open Look(TM)
  436.       extension to X (many will know that from open windows from SUN(TM)).
  437.  
  438.       To install it, untar the tarfile as root in some directory (e.g.
  439.       /usr/src), read the documentation that comes with it (most important
  440.       the README and run the INSTALL script. Note that you need about 25MB
  441.       free disk space to install it completely (with examples). This is
  442.       partly due to the fact, that for some time all files are twice on the
  443.       disk. After running the INSTALL script and removing the xview3L5.1
  444.       directory you will need about 11 MB (including all examples). If you
  445.       do not want to install the examples , you will need about 9 MB. If you
  446.       do not want to compile or program any program that uses xview, you can
  447.       spare another 2.5 MB.
  448.  
  449.       For running Xview you will need at least 8 MB of RAM, better 16 MB. To
  450.       run xview with XFree86-2.0 you should get the ld.so package version
  451.       1.3 or newer.
  452.  
  453.     - There is a port of Motif(TM) to Linux.
  454.      
  455.       This is commercial software, so you will have to pay for it. You can
  456.       find an advertisement from Metrolink (the company that provided the
  457.       port to Linux) on tsx-11:/pub/linux/advertisements.
  458.  
  459.     These packages provide different window managers than the standard twm
  460.     that comes with XFree86. There are several further window managers that
  461.     you can find on sunsite:/pub/Linux/X11/Window-managers.  All these use
  462.     different setups, so you have to read the documentation on the window
  463.     managers to set them up correctly.
  464.     
  465.     There are a lot of programs available for X. Look through the
  466.     /pub/Linux/X11 hierarchy at sunsite.unc.edu or at the usr.X11
  467.     directories of /pub/linux/binaries and /pub/linux/sources at
  468.     tsx-11.mit.edu for many of them.
  469.  
  470.  
  471. 6.  Compiling Programs that use X
  472.  
  473.     If you have the source code for a program that uses X11, usually it will
  474.     be shipped with an Imakefile instead of a Makefile. What to do now?
  475.     
  476.     Run "xmkmf" in the directory that containes the Imakefile. If there is a
  477.     hierarchy of directories with Imakefiles, you usually only have to run
  478.     xmkmf in the root directory of that hierachy. You can configure the rest
  479.     by typing make Makefiles. This will build the Makefiles in all
  480.     directories in the hierachy. Then you should run "make depend". Don't be
  481.     afraid if include files like stddef.h, varargs.h, ...  are not found,
  482.     they are gcc proprietary heare files and therefore not in the standard
  483.     include directories (the Imakefiles use makedepend, not gcc -M).  After
  484.     that you can make the program by running make and you can install it
  485.     (usually in /usr/X386/bin) by running "make install", installing of the
  486.     manpages is done by running make "install.man". Of course, before even
  487.     making xmkmf, you should have read the documentation that comes usually
  488.     with such packages.
  489.  
  490.  
  491. 7.  Programming in X
  492.  
  493.     If you want to write programs that use the X Window System, you should
  494.     get some books on the X Window System.  Most Subroutines provided by X
  495.     are documented in a manpage (residing in /usr/X386/man/man3), but these
  496.     will not provide enough information on programming in X if you do not
  497.     know some generals about X.
  498.    
  499.     There is a rather complete series on X by O'Reilly, called "The
  500.     definitive Guides to the X Window System", consisting of many volumes
  501.     (you will probably not need all of them). For more information check out
  502.     the O'Reilly and Associates Catalog from anonymous FTP on ftp.ora.com.
  503.     I suggest reading Volume 1, "Xlib Programming Manual", and Volume 4, "X
  504.     Toolkit Intrinsics Programming Manual", if you are serious about writing
  505.     X apps. As it turns out Xt (volume 4) is used for most X applications,
  506.     and you only need low-level Xlib stuff (volume 1) for certain things.
  507.  
  508. 8. Finding information on X on the net.
  509.  
  510.     For general X questions you should read the FAQ and the Xt-FAQ from the
  511.     comp.windows.x newsgroup (you can achieve them
  512.         from ftp.x.org in the directory /contrib or 
  513.         from rtfm.mit.edu in /pub/usenet_by_hierarchy/comp/windows/x 
  514.     by anonymous ftp). 
  515.     This is the newsgroup for general X questions.
  516.  
  517.     If you have questions on the XFree86 package and cannot find an answer
  518.     in the documentation files (XFree86, Xconfig, XF86_* manpages or the
  519.     README files in /usr/X386/lib/X11/etc) you may want to post a question
  520.     to a newsgroup. The appropriate newsgroup for that purpose is
  521.     comp.windows.x.i386unix, as this newsgroup is dedicated to the XFree86
  522.     system.  If you have a problem with the server and want to post a
  523.     question to this newsgroup, you should provide enough information for
  524.     those that want to help you. It is no good idea telling: XFree86 is not
  525.     working, what do I have to do? Here some things that should be included
  526.     in all postings that are concerned with server problems: 
  527.  
  528.       - which Operating System and which release of it are you running
  529.       - which hardware do you have (at least bus type (ISA/EISA/VLB), graphic 
  530.         card (including chipset, video RAM type (D/VRAM), size and speed))
  531.       - a concise decription of the problem
  532.       - a printout of the server startup (you can generate that by
  533.         redirecting the stderr output)
  534.       - the used parts of the Xconfig (It is NOT a good idea to include all
  535.         lines commented out by a leading #, as this then will be the largest
  536.         part of your post and most people will already know the copyright 
  537.         statements :-)
  538.  
  539.     Furthermore you should say what steps of trouble-shooting you already 
  540.     did (there are some mentioned in the XFree86 documentation files and in 
  541.     the Appendix).
  542.  
  543.     There are some other newsgroups that cover X related topics:
  544.       comp.windows.x.apps - for X applications
  545.       comp.windows.x.intrinsics - for X intrinsic 
  546.       comp.windows.x.motif - for the Motif(TM) extension to X
  547.       comp.windows.open-look - for OpenLook(TM) and the xview extensions to X
  548.  
  549.     Note that some of these groups have FAQ lists that are posted regularly
  550.     to the groups. As always with regular postings these can be obtained
  551.     from rtfm.mit.edu via anonymous ftp.
  552.  
  553.     Please do not post X related questions to _any_ newsgroup of the
  554.     comp.os.linux.* hierarchy. You will get better answers to your questions
  555.     in those newsgroups dedicated to those questions, as nearly all those
  556.     questions are not linux-specific.
  557.  
  558. Appendix: Some Questions & Answers
  559.  
  560. Q: I used XS3 up to now, what changed in XFree86-2.0
  561. A: The most important things that changed, are described in the README.XS3
  562.    file coming with XFree86-2.0
  563.  
  564. Q: Is there support for 16-bit or 24-bit colour modes?
  565. A: No, there is only support for 1-bit, 4-bit and 8-bit colour in the moment.
  566.    The 4-bit server is in addition in an experimental stage, so there
  567.    are bugs and problems using it. Most of the known problems are
  568.    mentioned in the manpage.
  569.  
  570. Q: I have a Logitech serial mouse but it does not work with the Logitech
  571.    keyword.
  572. A: The Logitech keyword is for older Logitech serial mice, more recent 
  573.    Logitech serial mice use the MouseMan or MicroSoft keyword.
  574.    Logitech serial mice plugged into a ps/2 port use the ps/2 keyword.
  575.  
  576. Q: My server is unable to find some of the fonts.
  577. A: First check that the directories in the font path in 
  578.    /usr/X386/lib/X11/Xconfig are named correctly and contain fonts. If that
  579.    is the case, running mkfontdir in all of those directories may help you.
  580.  
  581. Q: I had a normal SVGA card up to now with 1 MB of video RAM. With it
  582.    I could do a virtual resolution of 1152x900 or 1024x1024. Why does
  583.    it not work on my new s3 card?
  584. A: All but the most recent revisions of the s3 chips cannot use a line
  585.    length of 1152, so a length of 1280 is used for this resolution. 
  586.    Furthermore the s3 server needs 1k for the cursor, so a virtual 
  587.    resolution using 1MB will not work.
  588.    NOTE, that you will need some memory on the graphics card for font
  589.    and pixmap caching if you want to get maximum performance from your
  590.    graphic card. So the memory is NOT wasted, but will get you a great
  591.    performance boost. Try running some font or pixmap specific
  592.    mode of x11perf with maximal allowed virtual resolution (e.g. 
  593.    1024x1023) and with 1024x768 and compare the results!
  594.    Recommended resolutions are 1024x768 and 1152x800 for 1MB cards.
  595.    The latter resolution leaves not too much memory to the font cache,
  596.    so you will have a performance loss using large fonts.
  597.    For normal use with fonts <= 18 points it should be OK, though.
  598.  
  599. Q: I have a s3 card and it does not work properly. The screen gets
  600.    distorted when dragging windows and it frequently locks up.
  601. A: First try to use options nomemaccess or nolinear. If both does not help
  602.    and you have a s3 928, try specifying chipset s3_generic in your 
  603.    Xconfig. If nothing helps, it might be a incompatibility
  604.    problem between your graphic card and your motherboard. Try to see if the
  605.    card works in a different system, if you can get your hands.
  606.  
  607. Q: I have a Diamond Viper card. Why does it not work?
  608. A: In addition to being a diamond product, this card is based on the
  609.    P9000 chip by Weitek. This chip is not yet supported by XFree86, so
  610.    you have only a chance to get it working with one of the generic 
  611.    servers (i.e. Mono or VGA16). You will have nevertheless the clock
  612.    setting problem that prevents the other diamond cards from working.
  613.  
  614. Q: Are there some notes on tuning the performance of my X system?
  615. A: Yes there are. They are posted monthly to the comp.windows.x
  616.    newsgroup and can also be found on rtfm.mit.edu in the 
  617.    appropriate subdirectory.
  618.  
  619. Q: I want to reconfigure my XF86_S3 or XF86_VGA16 server using the LinkKit.
  620.    After editing sited.def and running mkmf, make will not work. 
  621. A: There is a little bug in the Imakefile for the LinkKit. You can either
  622.    change the line 326 in the Imakefile from
  623.    #if XF86SVGAServer || XF86MonoServer
  624.    to
  625.    #if XF86SVGAServer || XF86MonoServer || XF86VGA16Server || XF86S3Server
  626.    or you can configure the XF86_Mono or XF86_SVGA server additionally for 
  627.    building. Then all will work.
  628.  
  629. Q: I have a SPEA/Video 7 Mercury card. It is 928 based but I cannot
  630.    get it working correctly.
  631. A: The Mercury uses a clock chip that is not yet supported by XFree86.
  632.    So you cannot use it at the moment.
  633.  
  634. Q: I have a busmouse and am running selection. The server has problems with 
  635.    recognizing the mouse.
  636. A: Selection has some problems with busmice. XFree86 cannot open the mouse 
  637.    device if selection is running on it. So kill selection before staring
  638.    XFree86.
  639.  
  640. Q: The server dies with the message "Cannot find a free VT".
  641. A: XFree86 needs a free VT to run on. So if you have put a getty process on
  642.    every virtual console in you /etc/inittab, XFree86 will not be able
  643.    to start. I suggest to let /dev/tty8 (for kernel messages) and /dev/tty7
  644.    (for XFree86) free of a getty process.
  645.  
  646. ------------------------------------------------------------------------------
  647. Helmut Geyer                              geyer@kalliope.iwr.uni-heidelberg.de
  648.