AmigaSoc UK
Installing X

1 Hardware Requirements
In order to install X you will require at least 4 Megabytes of RAM and 30 Megabytes of diskspace. More RAM will be required if you intend to run other Applications under X. As with most Unix applications the more RAM and CPU power you have available the more pleasant the application will be to use.

2 Obtaining the Files
All of the files required to install X can be found at ftp.uni- regensburg.de in the /pub/NetBSD-Amiga/contrib/X11/X11R6.1/bin12 directory. The files required are

NameSizeDescription
X11R6.1-bin-01Oct96.tar.gz6.2 MBytesThe Binary Distribution
X11R6.1-fonts-01Oct96.tar.gz8.8 MBytesThe Fonts Distribution
X11R6.1-include-01Oct96.tar.gz4.4 MBytesThe Required Include Files
X11R6.1-lib-01Oct96.tar.gz6.3 MbytesThe Required Library Files
X11R6.1-man-01Oct96.tar.gz3.5 MBytesThe Man Pages


To transfer the files from an Amiga Filesystem to a NetBSD filesystem use the mount_ados command to mount an AmigaDOS partition under NetBSD.

> mount_ados -o ro /dev/sd0d /amiga

It is recommended that you copy the files to a meaningfull location such as /local/downloads/x11.

Unpacking The File Archives
The X Distribution files are supplied in GZipped TAR format. This means that they need to be unpacked before they can be installed. This is a two step process. First unzip each file useing the gunzip command.

> gunzip *.gz

This will extract all the .gz files and replace them with similarlly named files minus the .gz extension.
The next step is to extract the files from the five tar distribution files we have recently extracted. This step must be performed as root as the tar achive may contain files that have special permission flags that only root can create. The files should also be unpacked in the root directory as they contain references to absolute path names. If you have placed the X Distribution files in a directory other than /local/downloads/x11 you should use that path in the tar command instead of th e one illustrated.

> su
> cd /
> tar xvf /local/downloads/x11/*.tar

When the command completes you should have the X Distribution installed under /usr/local/X11R6.1

3 Configuring the System
It is now necesarry to make a few changes to some configuration files to tell NetBSD where to find the files X requires to operate. The first change that is necesarry is to add /usr/local/X11R6.1/bin into the path. The path is a list of directories that NetBSD checks everytime you type a command. If a command is in a directory that isn't in the path, NetBSD will not be ab le to find it. If you are using csh the path is defined in your .cshrc file. If you are using ksh or bash then the path is defined in your .profile file. Both of these files live in your home directory. You will need to make these changes to the .cshrc or .profile files of each user who wishes to run X.

.profile
Insert the following line or change the exisiting PATH line to read

PATH=:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/X11R6.1/bin

.cshrc
Insert the following line or change the existing PATH line to read

set path=(/sbin /usr/sbin /bin /usr/bin /usr/local/X11R6.1/bin)

The next change that is required is to inform NetBSD about the X11 shared librarys. These are defined in the /etc/rc.local file and initialised by the ldconfig command. To include the X11 libraries add change the line that reads

ldconfig

to read

ldconfig /usr/local/X11R6.1/lib

If you have other shared libraries already installed on your machine your ldconfig line include these. In this case add /usr/local/X11R6.1/lib to the end of the line.

ldconfig /usr/local/lib /usr/local/X11R6.1/lib

You will now need to reboot NetBSD for the changes to take effect.

4 Starting X
Assuming you have installed X correctly you can now start it using the command

startx

You can now carry out the remaining modifications using an xterm or shelltool.

5 Installing the Man Pages
Although the X11 installation process has copied all X11 man pages to the correct location NetBSD is not aware where to find them. To inform NetBSD of the location of the man pages we must edit the file /etc/man.conf. In particular there are 2 lines that require changing. The first line specifies the default search path for man pages and must be changed to include the X11 man pages. Edit /etc/man.conf and change the line

_default /usr/{share,X11R6,x386,X11,X11R4,contrib,gnu,local}/{man/,man/old}

to include /usr/local/X11R6.1 as follows

_default /usr/{share,local/X11R6.1,x386,X11,X11R4,contrib,gnu,local}/{man,man/old}

The entries for x386, X11 and X11R4 can also be safely removed if you desire.
The second line that requires changing is one of the complete man subdiretory definitions. Change the X11R6 line that reads

X11R6 /usr/X11R6/man

to refer to X11R6.1 as follows

X11R6.1 /usr/local/X11R6.1/man

Once you have saved the changes you will be able to reference the X11 manual pages. These describe how X11 works and where it stores it's configuration files. You can use the command man -k X11 to produce an index of all relavent pages or you can start with the startx manual page and follow the references from there.