Information for SVR3 Users -------------------------- Contents -------- 1) What and where is XFree86 2) SVR3 versions on which XFree86 has been tested 3) Installing the Binaries 4) Configuring X for your hardware 5) Manual pages 6) Running X 7) Kernel support for X 8) Notes for building XFree86 on SVR3 9) SVR3 shared libraries 10) Building new X clients 11) ISC 2.0.2 notes 1 - What and Where is XFree86? ------------------------------ XFree86 is a port of X11R5 that supports several versions of Intel-based Unix. It is derived from X386 1.2, which was the X server distributed with X11R5. This release consists of many new features and performance improvements as well as many bug fixes. The release is available as source patches against the MIT X11R5 code, as well as binary distributions for many architectures. For source and binary archive sites look into the supplied common README. You should read it anyway. 2 - SVR3 versions on which XFree86 has been tested -------------------------------------------------- XFree86 has been tested on the following versions of SVR3: ISC : 2.0.2, 2.2.1, 3.0, 3.0.1, 4.0 AT&T: 3.2.2 SCO : 3.2.2, 3.2.4 (For SCO look into README.SCO.) If you run XFree86 on a version of SVR3 that's not on this list, please let us know about it. 3 - Installing the Binaries --------------------------- The binary distribution is compiled on ISC 3.0. But it will also work on ISC 2.2.1, 4.0 and AT&T. It includes PEX. The server includes support for Type1 fonts although these must be obtained separately. The binary distribution comes in a number of split and gzip-compressed tar archives. For a "runtime" version you need only the archives bin, misc, cfg, font, man, doc) plus the appropriate server binary for your graphic hardware. For compiling of other X software you need also the lib archive and for relinking the servers (e.g. to get a server with PEX support or including the Hercules driver in the monochrom server) the lkit archive is required. It contains also a tutorial how to add an (S)VGA driver to XFree86 including stub driver code. The non-server PEX stuff is separated in the pex archive. bin-2.1tz.?? - Executables, including target shared libraries. The XFree86 server binaries: SVGA-2.1tz.? - XF86_SVGA: 256-color Super-VGA server. Contains accelerated support for Cirrus 542{6,8} and Western Digital 90C31 chipsets, unaccelerated for the rest of the supported chipsets. Mono-2.1tz.? - XF86_Mono: (S)VGA monochrome, optionally Hercules or other monochrome hardware support is linked in (not in the binary distribution). VGA16-2.1tz.? - XF86_VGA16: Generic VGA 16-color server (experimental). 8514-2.1tz.? - XF86_8514: 8514/A 256-color accelerated server. Mach32-2.1tz.? - XF86_Mach32: ATI Mach32 256-color accelerated server. Mach8-2.1tz.? - XF86_Mach8: ATI Mach8 256-color accelerated server. S3-2.1tz.? - XF86_S3: S3 256-color accelerated server. misc-2.1tz - Application default files, bitmaps, etc. cfg-2.1tz - Default xinit, xdm and fs config files. font-2.1tz.?? - Fonts (misc, 75dpi, 100dpi, Speedo). man-2.1tz.?? - Formatted X11R5 manual pages. doc-2.1tz - Documentation including XFree86-specific man pages. lib-2.1tz.?? - Libraries, configuration and header files. lkit-2.1tz.?? - LinkKit, including PEX support. pex-2.1tz.?? - The non-server parts of PEX (clients, libs, headers, etc.). gpc.tz.?? - The Graphics Performance Characterization suite of PEX. (Files needed for the 'plbpex' program.) It's separated because unpacked it needs ~9MB! It's unchanged since 1.3. Each archive has been cut into 256 kilobyte segments for easier transfer via slow links. These segments can be reassembled using cat. To unpack the archives you need gzip. If you don't have it you can find a binary distribution for SVR3 on ftp.prz.tu-berlin.de under /pub/pc/isc/gzip. If you want to use the "memory aperture" feature which S3 and Mach32 servers provide you need also the SVR3 mmap driver (at least v2.2.3) for memory mapped I/O support (i.e. accessing the frame buffer in a linear address space). The source of this driver is included in the binary distribution in lib/X11/etc/mmapSVR3.shar (in the etc-archive). Building and install- ing it should be straightforward. Please read the accompanied README file. Anyway, a binary distribution of this driver for ISC 3.0 is also available at ftp.prz.tu-berlin.de under /pub/pc/isc/mmap. To install the binaries you should do following steps: 1. Login as root 2. If you have previously installed XFree86 1.2, note that 2.1 contains an incompatible new revision of the shared Xlib (libX11.5.0.1). If you're using other X clients then the core stuff (like the actual XView 3.0 binary distribution from Thomas J. Wu on ftp.prz.tu-berlin.de) and you're unable to re-link them you must keep the old libX11.5.0 on-line. If you have previously installed XFree86 1.3 there should be no problems. Clients which are linked with the 1.3 shared libraries should also work with the installed shared libraries from 2.1. As for XView 3.0: if you plan to link XView clients with the XView shared libraries you must keep also the host shared libraries libX11_s.a and libXext_s.a from XFree86 1.2 on-line. Don't forget to move them to another directory to avoid overwriting them. Same applies probably for other packages so it may be better to save all 1.2 host shared libraries (*_s.a). If it is the first installation make a directory for X: # mkdir /usr/X386 # cd /usr/X386 Note: The binary package is no longer required to exist in /usr/X386. You can set the environment variable $XWINHOME for another location but the pathes to the target shared libraries are hardcoded in the client binaries and they contain "/usr/X386". So if you choose another location you have to make hard links for the target shared libraries to place them also in /usr/X386 (this works only for the same filesystem). E.g. for /usr/X11R5, after (!) unpacking the distribution: # /usr/X11R5/bin/mkdirhier /usr/X386/lib/X11/shlib # ln /usr/X11R5/lib/X11/shlib/* /usr/X386/lib/X11/shlib 3. Unpack the distribution (assume split archives are in /usr/tmp and a S3 video card): # cd /usr/X386 # cat /usr/tmp/bin-2.1tz.?? | gunzip | tar xfp - # cat /usr/tmp/S3-2.1.tz.? | gunzip | tar xfp - # cat /usr/tmp/misc-2.1tz | gunzip | tar xfp - # cat /usr/tmp/font-2.1tz.?? | gunzip | tar xfp - # cat /usr/tmp/man-2.1tz.?? | gunzip | tar xfp - # cat /usr/tmp/doc-2.1tz | gunzip | tar xfp - NOTE: Don't forget that p option for tar! Some programs (X servers itself, xterm, xload) must be setuid-root and p restores the original permissions. If this is not your first installation of XFree86 you should be careful if you want to unpack the cfg archive, it contains the default xinit, xdm and fs config files. If you have customized them already you may want to save them before you type: # cat /usr/tmp/cfg-2.1tz | gunzip | tar xfp - If you want to install the libraries and/or linkkit and/or PEX, same applies: # cat /usr/tmp/lib-2.1tz.?? | gunzip | tar xfp - # cat /usr/tmp/lkit-2.1tz.?? | gunzip | tar xfp - # cat /usr/tmp/pex-2.1tz.?? | gunzip | tar xfp - If you want the GPC stuff for PEX: # cat /usr/tmp/gpc-2.1tz.?? | gunzip | tar xfp - If you want PEX you need also the linkkit to get a server with PEX support. Make a link from the X server binary to `X'. E.g. for S3: # cd /usr/X386/bin # ln XS3 X Remember to add /usr/X386/bin to your shell's `PATH' variable now. 4. Look into install script, change it for your system (likely not needed for ISC) and run it: # cd /usr/X386/lib/X11/etc # x386install Among other things this script will increase the number of pty's from 16 to 32 if you don't have them anyway. If you don't like changing the STREAMS parameters answer the questions asked by the script with 'n'. If you running the script the first time (no XFree86 version installed before or don't have already more then 16 pty's) you must build a new kernel. 5. If you want to use "memory aperture" it's a good moment now to install the mmap driver, before you build a new kernel. And don't forget to add the "Operating Systems Messages" facility to the kernel, otherwise the `xconsole' utility cannot work. 6. Build a new kernel if this is the first installation of XFree86 (You haven't 32 pty's or some STREAMS parameters are changed, see also "7 - Kernel Support for X" for this.) or to include the mmap driver in the kernel. 7. Reboot to install new kernel. 8. Continue reading 4), 5), 6), 7). Some additional hints: - The Hercules driver is not included by default in the monochrome server XF86_Mono. If you want to use it you must relink XF86_Mono using the linkkit in /usr/X386/lib/Server. Informations how to do it you'll find also in /usr/X386/lib/X11/etc/INSTALL in section "Reconfiguring the server (binary distribution)". Note: If you don't use gcc anyway, you may also need to install libgcc.a in /lib or /usr/lib and set "NeedLibGcc" to YES in site.def (/usr/X386/lib/Server/site.def !). - Also PEX support is not included by default in XF86_SVGA. For including it you must relink XF86_SVGA with PEX enabled in /usr/X386/lib/Server/site.def. - Type1 fonts are not included in this distribution, so put them only in the font path if you have installed such fonts. - I've included some sample user resource files in the distribution. Copy them to your home directory if you want: # cp /usr/X386/lib/X11/etc/ExampleUser/.???* ~ If you have any problems with the SVR3 binary distribution please send email to Thomas Wolfram . 4 - Configuring X for Your Hardware ----------------------------------- Create a Xconfig file, you can use the sample file: # cd /usr/X386/lib/X11 # cp Xconfig.sample Xconfig You *must* edit /usr/X386/lib/X11/Xconfig to suit your hardware. Please read: - /usr/X386/lib/X11/etc/README - /usr/X386/lib/X11/etc/README.Config - XFree86 manual page - Xconfig manual page - server specific man pages (XF86_*) - /usr/X386/lib/X11/etc/VideoModes.doc before you do that. Once you understand the structure of Xconfig, try to find your specific monitor and vga card in /usr/X386/lib/X11/etc/modeDB.txt. If your Clocks and ModeDB lines are there, grab the values there and put them in your Xconfig. If modeDB.txt does not have your hardware, read /usr/X386/lib/X11/etc/VideoModes.doc for instructions on how to create the video timing values given your vga card and monitor specs. The manual for your monitor and adapter should have these values. If your mouse does not work try using kermit or cu to connect to the mouse serial port and verify that it does indeed generate characters. 5 - Manual pages ---------------- The 'xman' utility is capable of handling packed, compressed, freezed as well as gzip'ed manual pages (if pcat, zcat are hard links to gzip) now. For the binary distribution: ---------------------------- The manual pages are located in /usr/X386/catman. They are ISC 3.0-style compressed, not packed. The 'xman' utility has following in-built search path: "/usr/catman/u_man:/usr/catman/p_man:/usr/catman/ucb_man:\ /usr/catman/x_man:/usr/local/catman/u_man:/usr/local/catman/p_man:\" /usr/local/catman/ucb_man:/usr/local/catman/x_man:/usr/X386/catman/x_man" This is of course much more then the ISC's 'man' utility knows. It doesn't find the X man pages and you could want to move the man pages to a ISC default location. But since it is a very simple shell script (/usr/bin/man) you can better change it. It's not difficult. On ISC 2.0.2 and 2.2.1 adding support for displaying also compressed man pages should also be straight- forward. (A changed script is not included since it is AT&T copyrighted.) For the source distribution: ---------------------------- The usage of the macros .DE and .DS in the X manual pages breaks nroff of ISC's "Text Processing Workbench" (at least on TPW version 2.1.0). Hence RemoveDSDENroffMacros in defaults to YES on ISC. If you are using groff or another man-macro package (e.g. nroff -manbsd) you should set RemoveDSDENroffMacros to NO in site.def. For ISC installed manual pages are compressed by default. If you want compressed manual pages on other SVR3 version you can set CompressManPages to YES in site.def. If you want to use gzip instead compress uncomment the appropriate line in site.def. If you like to change the search path for the 'xman' utility you can put following to site.def (this is the path used in the binary distribution): #define XmanSearchPath /usr/catman/u_man:/usr/catman/p_man:/usr/catman/ucb_man:/usr/catman/x_man:/usr/local/catman/u_man:/usr/local/catman/p_man:/usr/local/catman/ucb_man:/usr/local/catman/x_man #define ManDirectoryRoot Concat(ProjectRoot,/catman/x_man) #define XmanLocalSearchPath ManDirectoryRoot 6 - Running X ------------- The easiest way for new users to start X windows is to type 'startx >& startx.log'. Note that this redirects error messages to a file that might otherwise be lost. To get out of X windows, exit from the console xterm. You can customize your X environment using .xinitrc, .xserverrc, and .twmrc files in your home directory as described in the xinit and startx man pages. Or you can run the X display manager (xdm). Root can invokes `xdm -nodaemon' on the console to start the display manager. If you would rather run xdm on bootup add something like the following to a /etc/init.d/xdm script: case $1 in 'start') if [ -x /usr/X386/bin/xdm ]; then echo -n ' xdm'; /usr/X386/bin/xdm fi ;; 'stop') pid=`/bin/ps -e | grep xdm | sed -e 's/^ *//' -e 's/ .*//'` if [ "${pid}" != "" ] then /bin/kill ${pid} fi ;; *) echo "usage: /etc/init.d/xdm {start|stop}" ;; esac Also add the hard link for this script to the /etc/rc3.d directory. 7 - Kernel Support for X ------------------------ You may need to increase certain STREAMS parameters to reliably run XFree86 on systems with less than 8 Megabytes of memory. If you've specified the default kernel memory size to be 4 Megabytes use the 'netstat -s' utility to track STREAMS buffer usage. Overflowing buffers should have their sizes increased to avoid applicatins getting killed. If you have NFS installed the STREAMS parameters have already been increased so this will not be a problem. 8 - Notes for building XFree86 on SVR3 -------------------------------------- 1. To make from the source distribution use the following BOOTSTRAPCFLAGS: ISC 4.0 "-DISC40 -DISC -DSYSV -DSYSV386" ISC 3.0, 3.0.1 "-DISC30 -DISC -DSYSV -DSYSV386" ISC 2.2.1 "-DISC22 -DISC -DSYSV -DSYSV386" ISC 2.0.2 "-DISC202 -DISC -DSYSV -DSYSV386" AT&T 3.2.2 "-DATT -DSYSV -DSYSV386" 2. It may not be possible to build XFree86 if you do not have a TCP/IP package installed. This will depend on what functions are included in your base OS. We are working in fixing the source tree to not depend on TCP/IP, but it is a fundamental piece of the MIT architecture, and all the problems have not yet been resolved. 3. Note for ISC: A limit in the hash table with ISC's 'make' will cause it to die in the middle of mit/lib/X. This can be overcome by uncommenting the MakeHashTableBug line in site.def. But a better alternative is to use GNU make. 4. If you want to compile XDM Authorization-1 in you must applying following patch to mit/lib/Xdmcp/Wraphelp.c: ---cut here--------------------------------------------------------------- *** Wraphelp.c.Ori Thu May 27 16:29:17 1993 --- Wraphelp.c Thu May 27 16:29:17 1993 *************** *** 12,15 **** --- 12,20 ---- */ + #ifdef SVR3SHLIB + #undef _XdmcpAuthSetup + #undef _XdmcpAuthDoIt + #endif + /* * Initial permutation, ---cut here--------------------------------------------------------------- for using in the shared Xlib. For information how to obtain a copy of mit/lib/Xdmcp/Wraphelp.c look into mit/RELNOTES.TXT. 6. We highly recommend gcc 2.4.5 or a recent 2.5.x version to build XFree86. It fixes several bugs of previous versions. See also 'SVR3 shared libraries' and /usr/X386/lib/X11/etc/INSTALL. You should have ran the `fixincludes' script from the gcc distribution, otherwise some non-ANSI-compliant declarations in ISC's will cause generating of false arguments for the SIOCIFCONF, etc. ioctl's which will affect the server and xdm. 9 - SVR3 shared libraries ------------------------- 1. The SVR3 shared libraries have been tested on ISC 2.0.2, 2.2.1, 3.0, 4.0, AT&T 3.2.2, SCO 3.2.2, 3.2.4. If you are using another SVR3 version you might have problems creating the shared libs. If you run into such problems you can contact Thomas Wolfram (wolf@prz.tu-berlin.de, thomas@aeon.in-berlin.de). 2. We highly recommend using gcc (currently gcc-2.4.5) for building the shared libraries. Building these libraries with the stock AT&T cc has not been tested. Don't use gcc 2.0 or 2.1 because they lack the -msvr3-shlib option. Using gcc 1.4x should be OK. 3. It is possible that you may have to re-link programs linked with shared libraries in future releases of XFree86 in order to make use of the newer libraries. This will depend on what (if any) changes are made to those libraries. It will be possible however to keep the older libraries on-line for use by such programs. 10 - Building New X Clients -------------------------- The easiest way to build a new client (X application) is to use xmkmf if an Imakefile is included in the sources. Type 'xmkmf -a' to create the Makefiles, check the configuration if necessary and then type 'make'. 11 - ISC 2.0.2 Notes -------------------- The above notes apply also to ISC 2.0.2 although you will need to take a few additional steps to build the system from source. Before we can continue, you must edit the system include files, since there will be function declaration conflicts. Also, some functions are simply not declared in header files, and this causes shared library build to fail. The correct thing to do is to add the missing function prototypes and correct the declarations that are already there. If you are lazy like me, you can do something like the following in your stdio.h file in GCC include directory (created when you run fixincludes during GCC installation) /usr/local/lib/gcc-lib/i386v32/2.4.5/include/stdio.h: ------------------------------------------------------------------- #ifndef __STDC__ extern int fclose(), fflush(), fread(), fwrite(), fseek(), fgetc(), getw(), pclose(), printf(), fprintf(), sprintf(), vprintf(), vfprintf(), vsprintf(), fputc(), putw(), puts(), fputs(), scanf(), fscanf(), sscanf(), setvbuf(), system(), ungetc(); #else extern int fclose(), fflush(), fread(), fwrite(), fseek(), fgetc(), getw(), pclose(), fprintf(), vprintf(), vfprintf(), vsprintf(), fputc(), putw(), puts(), fputs(), scanf(), fscanf(), setvbuf(), system(), ungetc(); extern int printf(char const *, ...); extern int sprintf(char *, char const *, ...); extern int sscanf(char *, char const *, ...); extern int open(), fcntl(), read(), write(); extern char toupper(), tolower(); extern int uname(); #endif ------------------------------------------------------------------ I can't publish the entire stdio.h that I have on my system due to copyright restraint. But if your compile fails because some standard system call is undefined, you should be able to correct the header file. Now follow steps in INSTALL file as well as the previous section in this file (README.SVR3). Edit site.def as necessary and compile with: make World BOOTSTRAPCFLAGS='-DSYSV -DSYSV386 -DISC -DISC202' > \ World.Log 2>&1 & Also note that PEX will not compile with ISC 2.0.2. There will be a patch at future date. Many thanks to - Thomas Wolfram for providing shared libraries for ISC Unix, and contributing to this README. - Rich Murphey for writing README.386BSD which this README is based on - All the ISC users who have been patient for all these months $XFree86: mit/server/ddx/x386/README.SVR3,v 2.5 1994/03/08 08:31:23 dawes Exp $