From: wissner@perlis.mcs.gvsu.edu (Jim Wissner)
Subject: X installation tips
Date: 16 Jun 92 03:43:55 GMT

X386 INSTALLATION TIPS
======================

     After many little "problems," I recently [finally] got X working
on my machine.  I put the word "problems" in quotes because that's not
really what they were - rather, they were the result of my inability
to interpret the existing documentation.  Fortunately, with the help
of some kind folks, I was able to get things working. Unfortunately,
with the help of my impatience, I was a pest in doing so.
     These are some tips that I gathered from the people who helped
me - it's certainly not meant to substitute the documentation that
already exists.  Hopefully, it will 1) help you get X going sooner,
and 2) save the newsgroup from wasting more bandwidth than I've already
wasted.  I'm not an expert, in fact at at the opposite end of the
spectrum - and I make no guarantees about any of this info - but here
goes.

     I'm going to assume that:
1) You have the hardware and disk space necessary to run X.
2) You've /read/ and /have handy/ all of the other documentation -
   install notes, readmes, and the FAQ - particularly the section
   "X11 and Linux" by Peter Hawkins in the most recent FAQ.  He
   describes some very good "debugging" techniques that I won't
   talk about.


A) What to get:
===============
     This was my first point of confusion, so forgive me if this
is a little redundant.  You should have:

- Linux version 0.96 (or later)
- GCC 2.11c, including shared libraries libc_v2_11c and libm_v2_11c
- xbase1.0.T.Z

If you don't already have 0.96 and GCC 2.11c, the easiest way to
go might be to get the 0.95c+ mcc interim version (which includes
images of GCC 2.11c) and then to rebuild w/ the 0.96a files.  This
procedure [knock on wood 8-)] went off without a hitch for me, so
I can't predict what problems you might have.  The documentation
for the mcc interim stuff is complete and straight-forward, you
shouldn't have a problem.  I don't remember seeing the shared
libraries come off of the GCC images, so I ended up getting them 
from the file 2.11cmisc.tar.Z.  
All of the necessary files are available from banjo.concert.net,
amongst other sites - see FAQ.  Just in case you still aren't sure
where to get what, here is a more specific list - extract what you
need:               (directories listed as on banjo)

/pub/Linux/mirrors/uk.mirror/mcc-interim/0.95c+/images/*
/pub/Linux/Linus/*           <--(I'm using X fine w/out the patches)
/pub/Linux/GCC/2.11cmisc.tar.Z
/pub/Linux/X11/x11v1.0/xbase1.0.T.Z  <--(and whatever else you want)


B) Getting everything ready:
============================
     OK, so you have the stuff you need and you're running 0.96(a);
and you have gcc installed.  Check to make sure you have the
following shared libraries in your /lib directory:

libc_v2_11c and libm_v2_11c

As I said before, these files are in 2.11cmisc.tar.Z.  You will
spot libc_v2_11c right away, but don't panic if you don't see the
other one.  Instead, there should be two files that look something
like this: libsoft & libhard.  These are actually the libm_v2_11c
files, one of which should be renamed to that - depending on whether
or not you have a math co-processor.  If you do have one, you should
rename libhard to libm_v2_11c.  If not, use libsoft.

     Next, untar the xbase1.0.T.Z file in the directory of your
choice.  As stated in all the other docs, this should be done as
root and then the proper links should be created.  This can be done
with the following command (I'll assume that you untarred xbase in
a directory named /x11v1.0):

ln -s /x11v1.0/usr/bin/X11 /usr/bin/X11
ln -s /x11v1.0/usr/lib/X11 /usr/lib/X11
ln -s /x11v1.0/usr/man/mann /usr/man/mann

You should also put the shared libraries /x11v1.0/lib/libX11_v1_0
and /x11v1.0/lib/libXaw_v1_0 into your /lib directory.

Next, you should make sure that the following three files are
setuid root: X386, xterm, and xinit.  This was another point of
confusion for me - I just plain 'ole didn't know what "setuid"
meant...  At any rate, it's done with the following commands:

chown root X386
chmod +s X386

Repeat these commands for the other two files (xterm and xinit).

Also check that you have the files /dev/tty0 and /dev/console (can
be a link to /dev/tty0).  The major/minor numbers on these devices
should be 4 and 0, and they should be set up as character devices.
Specifically, they should look like this:

crw-------   2 root     root       4,   0 Xxx 99 99:99 console
crw-------   2 root     root       4,   0 Xxx 99 99:99 tty0

If you don't have these, or if they are set wrong, do the following
commands:

rm /dev/tty0
rm /dev/console
mknod /dev/tty0 c 4 0
ln /dev/tty0 /dev/console


C: CONFIGURATION:
=================
     The first file to configure is the /usr/lib/X11/Xconfig file.
You should check to see that the FontPath is uncommented and that
it referrs to the correct path.  If you don't have the 75dpi stuff,
that part should be taken out of the path.
     Check to make sure that the mouse line points to the serial 
port that your mouse is connected to.
     The rest of the file is for your video settings.  See the
file /x11v1.0/doc/vga.dbase to get the settings for your video card,
and set them accordingly.  The file /x11v1.0/doc/video.tutorial will
help you figure out the correct settings for your monitor - it may
very well not be listed in the vga.dbase file.

     The file /usr/lib/X11/etc/xterm.termcap should be appended to
the file /etc/termcap.

     Your search path should be modified to include /usr/bin/X11,
and you should set DISPLAY=":0".  I put both of these into the
/etc/profile file.

D: RUNNING:
===========
     Type:  startx

     Does it work?!!  If not I suspect I'll hear about it!!    8-)
As I said before, most of this material is in other documentation,
all of which is manditory reading.  This is just the "spelling out"
of some of the details that proved troublesome for me, in hopes that
it will help someone else.  I apologize for the redundancy.


     Thanks to those who responded to my pleas; particularly Linus,
who gave me most of the above help.

Mail comments/questions/hatemail to:

wissner@perlis.mcs.gvsu.edu

Happy X'ing!

Jim.