diff --git a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml index aca2a11be0..8cd484d370 100644 --- a/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml @@ -1,2247 +1,2286 @@ Linux Binary Compatibility Restructured and parts updated by &a.jim;, 22 March 2000. Originally contributed by &a.handy; and &a.rich; Synopsis Linux binary compatibility binary compatibility Linux The following chapter will cover FreeBSD's Linux binary compatibility features, how to install it, and how it works. At this point, you may be asking yourself why exactly, does FreeBSD need to be able to run Linux binaries? The answer to that question is quite simple. Many companies and developers develop only for Linux, since it is the latest hot thing in the computing world. That leaves the rest of us FreeBSD users bugging these same companies and developers to put out native FreeBSD versions of their applications. The problem is, that most of these companies do not really realize how many people would use their product if there were FreeBSD versions too, and most continue to only develop for Linux. So what is a FreeBSD user to do? This is where the Linux binary compatibility of FreeBSD comes into play. In a nutshell, the compatibility allows FreeBSD users to run about 90% of all Linux applications without modification. This - includes applications such as Star Office, the Linux version of - Netscape, Adobe Acrobat, RealPlayer 5 and 7, VMWare, Oracle, - WordPerfect, Doom, Quake, and more. It is also reported that in - some situations, Linux binaries perform better on FreeBSD than they - do under Linux. + includes applications such as Star Office, + the Linux version of Netscape, + Adobe Acrobat, + RealPlayer + 5 and 7, VMWare, + Oracle, + WordPerfect, Doom, + Quake, and more. It is also reported + that in some situations, Linux binaries perform better on FreeBSD + than they do under Linux. Linux /proc filesystem There are, however, some Linux-specific operating system features that are not supported under FreeBSD. Linux binaries will not work on FreeBSD if they overly use the Linux /proc filesystem (which is different from FreeBSD's /proc filesystem), or i386-specific calls, such as enabling virtual 8086 mode. For information on installing the Linux binary compatibility mode, see the next section. Installation With the advent of 3.0-RELEASE, it is no longer necessary to specify options LINUX or options COMPAT_LINUX in your kernel configuration. KLD (kernel loadable object) The Linux binary compatibility is now done via a KLD object (Kernel LoaDable object), so it can be installed on-the-fly without having to reboot. You will, however, need to have the following in /etc/rc.conf: linux_enable=YES This, in turn, triggers the following action in /etc/rc.i386: # Start the Linux binary compatibility if requested. # case ${linux_enable} in [Yy][Ee][Ss]) echo -n ' linux'; linux > /dev/null 2>&1 ;; esac If you wish to verify that the KLD is loaded, kldstat will do that: &prompt.user; kldstat Id Refs Address Size Name 1 2 0xc0100000 16bdb8 kernel 7 1 0xc24db000 d000 linux.ko kernel options LINUX If for some reason you do not want to or cannot load the KLD, then you may statically link the binary compatibility in the kernel by adding options LINUX to your kernel configuration file. Then install your new kernel as described in the kernel configuration section of this handbook. Installing Linux Runtime Libraries Linux installing Linux libraries This can be done one of two ways, either by using the linux_base port, or by installing them manually. Installing using the linux_base port ports collection This is by far the easiest method to use when installing the runtime libraries. It is just like installing any other port from the ports collection. Simply do the following: &prompt.root; cd /usr/ports/emulators/linux_base &prompt.root; make install distclean You should now have working Linux binary compatibility. Some programs may complain about incorrect minor versions of the system libraries. In general, however, this does not seem to be a problem. Installing libraries manually If you do not have the ports collection installed, you can install the libraries by hand instead. You will need the Linux shared libraries that the program depends on and the runtime linker. Also, you will need to create a shadow root directory, /compat/linux, for Linux libraries on your FreeBSD system. Any shared libraries opened by Linux programs run under FreeBSD will look in this tree first. So, if a Linux program loads, for example, /lib/libc.so, FreeBSD will first try to open /compat/linux/lib/libc.so, and if that does not exist, it will then try /lib/libc.so. Shared libraries should be installed in the shadow tree /compat/linux/lib rather than the paths that the Linux ld.so reports. Generally, you will need to look for the shared libraries that Linux binaries depend on only the first few times that you install a Linux program on your FreeBSD system. After a while, you will have a sufficient set of Linux shared libraries on your system to be able to run newly imported Linux binaries without any extra work. How to install additional shared libraries shared libraries What if you install the linux_base port and your application still complains about missing shared libraries? How do you know which shared libraries Linux binaries need, and where to get them? Basically, there are 2 possibilities (when following these instructions you will need to be root on your FreeBSD system). If you have access to a Linux system, see what shared libraries the application needs, and copy them to your FreeBSD system. Look at the following example: Let us assume you used FTP to get the Linux binary of Doom, and put it on a Linux system you have access to. You then can check which shared libraries it needs by running ldd linuxdoom, like so: &prompt.user; ldd linuxdoom libXt.so.3 (DLL Jump 3.1) => /usr/X11/lib/libXt.so.3.1.0 libX11.so.3 (DLL Jump 3.1) => /usr/X11/lib/libX11.so.3.1.0 libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29 symbolic links You would need to get all the files from the last column, and put them under /compat/linux, with the names in the first column as symbolic links pointing to them. This means you eventually have these files on your FreeBSD system: /compat/linux/usr/X11/lib/libXt.so.3.1.0 /compat/linux/usr/X11/lib/libXt.so.3 -> libXt.so.3.1.0 /compat/linux/usr/X11/lib/libX11.so.3.1.0 /compat/linux/usr/X11/lib/libX11.so.3 -> libX11.so.3.1.0 /compat/linux/lib/libc.so.4.6.29 /compat/linux/lib/libc.so.4 -> libc.so.4.6.29
Note that if you already have a Linux shared library with a matching major revision number to the first column of the ldd output, you will not need to copy the file named in the last column to your system, the one you already have should work. It is advisable to copy the shared library anyway if it is a newer version, though. You can remove the old one, as long as you make the symbolic link point to the new one. So, if you have these libraries on your system: /compat/linux/lib/libc.so.4.6.27 /compat/linux/lib/libc.so.4 -> libc.so.4.6.27 and you find a new binary that claims to require a later version according to the output of ldd: libc.so.4 (DLL Jump 4.5pl26) -> libc.so.4.6.29 If it is only one or two versions out of date in the in the trailing digit then do not worry about copying /lib/libc.so.4.6.29 too, because the program should work fine with the slightly older version. However, if you like, you can decide to replace the libc.so anyway, and that should leave you with: /compat/linux/lib/libc.so.4.6.29 /compat/linux/lib/libc.so.4 -> libc.so.4.6.29
The symbolic link mechanism is only needed for Linux binaries. The FreeBSD runtime linker takes care of looking for matching major revision numbers itself and you do not need to worry about it.
Installing Linux ELF binaries Linux ELF binaries ELF binaries sometimes require an extra step of branding. If you attempt to run an unbranded ELF binary, you will get an error message like the following; &prompt.user; ./my-linux-elf-binary ELF binary type not known Abort To help the FreeBSD kernel distinguish between a FreeBSD ELF binary from a Linux binary, use the &man.brandelf.1; utility. &prompt.user; brandelf -t Linux my-linux-elf-binary GNU toolchain The GNU toolchain now places the appropriate branding information into ELF binaries automatically, so you this step should become increasingly more rare in the future. Configuring the host name resolver If DNS does not work or you get this message: resolv+: "bind" is an invalid keyword resolv+: "hosts" is an invalid keyword You will need to configure a /compat/linux/etc/host.conf file containing: order hosts, bind multi on The order here specifies that /etc/hosts is searched first and DNS is searched second. When /compat/linux/etc/host.conf is not - installed, linux applications find FreeBSD's + installed, Linux applications find FreeBSD's /etc/host.conf and complain about the incompatible FreeBSD syntax. You should remove bind if you have not configured a name server using the /etc/resolv.conf file.
- + Installing Mathematica - Updated for Mathematica version 4.X by &a.murray + Updated for Mathematica + version 4.X by &a.murray and merged with work by Bojan Bistrovic bojanb@physics.odu.edu. applications Mathematica This document describes the process of installing the Linux - version of Mathematica 4.X onto a FreeBSD system. + version of Mathematica 4.X onto + a FreeBSD system. - The Linux version of Mathematica runs perfectly under FreeBSD + The Linux version of Mathematica + runs perfectly under FreeBSD however the binaries shipped by Wolfram need to be branded so that FreeBSD knows to use the Linux ABI to execute them. - The Linux version of Mathematica or Mathematica for Students can + The Linux version of Mathematica + or Mathematica for Students can be ordered directly from Wolfram at http://www.wolfram.com/. Branding the Linux binaries The Linux binaries are located in the Unix - directory of the Mathematica CDROM distributed by Wolfram. You + directory of the Mathematica CDROM + distributed by Wolfram. You need to copy this directory tree to your local hard drive so that you can brand the Linux binaries with &man.brandelf.1; before running the installer: &prompt.root; mount /cdrom &prompt.root; cp -rp /cdrom/Unix/ /localdir/ &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Kernel/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/FrontEnd/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Installation/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Graphics/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/Converters/Binaries/Linux/* &prompt.root; brandelf -t Linux /localdir/Files/SystemFiles/LicenseManager/Binaries/Linux/mathlm &prompt.root; cd /localdir/Installers/Linux/ &prompt.root; ./MathInstaller Alternatively, you can simply set the default ELF brand to Linux for all unbranded binaries with the command: &prompt.root; sysctl -w kern.fallback_elf_brand=3 This will make FreeBSD assume that unbranded ELF binaries use the Linux ABI and so you should be able to run the installer straight from the CDROM. Obtaining your Mathematica Password - Before you can run Mathematica you will have to obtain a + Before you can run Mathematica + you will have to obtain a password from Wolfram that corresponds to your machine ID. Ethernet MAC address Once you have installed the Linux compatibility runtime - libraries and unpacked Mathematica you can obtain the + libraries and unpacked Mathematica + you can obtain the machine ID by running the program mathinfo in the Install directory. This machine ID is based solely on the MAC address of your first Ethernet card. &prompt.root; cd /localdir/Files/SystemFiles/Installation/Binaries/Linux &prompt.root; mathinfo disco.example.com 7115-70839-20412 When you register with Wolfram, either by email, phone or fax, you will give them the machine ID and they will respond with a corresponding password consisting of groups of numbers. You can then enter this information when you attempt to - run Mathematica for the first time exactly as you would for any - other Mathematica platform. + run Mathematica for the first time + exactly as you would for any other + Mathematica platform. Running the Mathematica front end over a network - Mathematica uses some special fonts to display characters not - present in any of the standard font sets (integrals, sums, greek + Mathematica uses some special + fonts to display characters not + present in any of the standard font sets (integrals, sums, Greek letters, etc.). The X protocol requires these fonts to be install locally. This means you will have to copy - these fonts from the CDROM or from a host with Mathematica + these fonts from the CDROM or from a host with + Mathematica installed to your local machine. These fonts are normally stored in /cdrom/Unix/Files/SystemFiles/Fonts on the CDROM, or /usr/local/mathematica/SystemFiles/Fonts on your hard drive. The actual fonts are in the subdirectories Type1 and X. There are several ways to use them, as described below. The first way is to copy them into one of the existing font directories in /usr/X11R6/lib/X11/fonts. This will require editing the fonts.dir file, adding the font names to it, and changing the number of fonts on the first line. Alternatively, you should also just be able to run mkfontdir in the directory you have copied them to. The second way to do this is to copy the directories to /usr/X11R6/lib/X11/fonts: &prompt.root; cd /usr/X11R6/lib/X11/fonts &prompt.root; mkdir X &prompt.root; mkdir MathType1 &prompt.root; cd /cdrom/Unix/Files/SystemFiles/Fonts &prompt.root; cp X/* /usr/X11R6/lib/X11/fonts/X &prompt.root; cp Type1/* /usr/X11R6/lib/X11/fonts/MathType1 &prompt.root; cd /usr/X11R6/lib/X11/fonts/X &prompt.root; mkfontdir &prompt.root; cd ../MathType1 &prompt.root; mkfontdir Now add the new font directories to your font path: &prompt.root; xset fp+ /usr/X11R6/lib/X11/fonts/X &prompt.root; xset fp+ /usr/X11R6/lib/X11/fonts/MathType1 &prompt.root; xset fp rehash If you are using the XFree86 server, you can have these font directories loaded automatically by adding them to your XF86Config file. fonts If you do not already have a directory called /usr/X11R6/lib/X11/fonts/Type1, you can change the name of the MathType1 directory in the example above to Type1. Installing Oracle Contributed by Marcel Moolenaar marcel@cup.hp.com applications Oracle Preface This document describes the process of installing Oracle 8.0.5 and Oracle 8.0.5.1 Enterprise Edition for Linux onto a FreeBSD machine Installing the Linux environment Make sure you have both linux_base and linux_devtools from the ports collection installed. These ports are added to the collection after the release of FreeBSD 3.2. If you are using FreeBSD 3.2 or an older version for that matter, update your ports collection. You may want to consider updating your FreeBSD version too. If you run into difficulties with linux_base-6.1 or linux_devtools-6.1 you may have to use version 5.2 of these packages. If you want to run the intelligent agent, you'll also need to install the Red Hat Tcl package: tcl-8.0.3-20.i386.rpm. The general command for installing packages with the official RPM port is : &prompt.root; rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm package Installation of the package should not generate any errors. Creating the Oracle environment Before you can install Oracle, you need to set up a proper environment. This document only describes what to do specially to run Oracle for Linux on FreeBSD, not what has been described in the Oracle installation guide. Kernel Tuning kernel tuning As described in the Oracle installation guide, you need to set the maximum size of shared memory. Don't use SHMMAX under FreeBSD. SHMMAX is merely calculated out of SHMMAXPGS and PGSIZE. Therefore define SHMMAXPGS. All other options can be used as described in the guide. For example: options SHMMAXPGS=10000 options SHMMNI=100 options SHMSEG=10 options SEMMNS=200 options SEMMNI=70 options SEMMSL=61 Set these options to suit your intended use of Oracle. Also, make sure you have the following options in your kernel config-file: options SYSVSHM #SysV shared memory options SYSVSEM #SysV semaphores options SYSVMSG #SysV interprocess communication Oracle account Create an Oracle account just as you would create any other account. The Oracle account is special only that you need to give it a Linux shell. Add /compat/linux/bin/bash to /etc/shells and set the shell for the Oracle account to /compat/linux/bin/bash. Environment Besides the normal Oracle variables, such as ORACLE_HOME and ORACLE_SID you must set the following environment variables: Variable Value LD_LIBRARY_PATH $ORACLE_HOME/lib CLASSPATH $ORACLE_HOME/jdbc/lib/classes111.zip PATH /compat/linux/bin /compat/linux/sbin /compat/linux/usr/bin /compat/linux/usr/sbin /bin /sbin /usr/bin /usr/sbin /usr/local/bin $ORACLE_HOME/bin It is advised to set all the environment variables in .profile. A complete example is: ORACLE_BASE=/oracle; export ORACLE_BASE ORACLE_HOME=/oracle; export ORACLE_HOME LD_LIBRARY_PATH=$ORACLE_HOME/lib export LD_LIBRARY_PATH ORACLE_SID=ORCL; export ORACLE_SID ORACLE_TERM=386x; export ORACLE_TERM CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip export CLASSPATH PATH=/compat/linux/bin:/compat/linux/sbin:/compat/linux/usr/bin:/compat/linux/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:$ORACLE_HOME/bin export PATH Installing Oracle Due to a slight inconsistency in the Linux emulator, you need to create a directory named .oracle in /var/tmp before you start the installer. Either make it world writable or let it be owner by the oracle user. You should be able to install Oracle without any problems. If you have problems, check your Oracle distribution and/or configuration first! After you have installed Oracle, apply the patches described in the next two subsections. A frequent problem is that the TCP protocol adapter is not installed right. As a consequence, you cannot start any TCP listeners. The following actions help solve this problem: &prompt.root; cd $ORACLE_HOME/network/lib &prompt.root; make -f ins_network.mk ntcontab.o &prompt.root; cd $ORACLE_HOME/lib &prompt.root; ar r libnetwork.a ntcontab.o &prompt.root; cd $ORACLE_HOME/network/lib &prompt.root; make -f ins_network.mk install Don't forget to run root.sh again! Patching root.sh When installing Oracle, some actions, which need to be performed as root, are recorded in a shell script called root.sh. root.sh is written in the orainst directory. Apply the following patch to root.sh, to have it use to proper location of - chown or alternatively run the script under a Linux native - shell. + chown or alternatively run the script under a + Linux native shell. *** orainst/root.sh.orig Tue Oct 6 21:57:33 1998 --- orainst/root.sh Mon Dec 28 15:58:53 1998 *************** *** 31,37 **** # This is the default value for CHOWN # It will redefined later in this script for those ports # which have it conditionally defined in ss_install.h ! CHOWN=/bin/chown # # Define variables to be used in this script --- 31,37 ---- # This is the default value for CHOWN # It will redefined later in this script for those ports # which have it conditionally defined in ss_install.h ! CHOWN=/usr/sbin/chown # # Define variables to be used in this script When you don't install Oracle from CD, you can patch the source for root.sh. It is called rthd.sh and is located in the orainst directory in the source tree. Patching genclntsh - The script genclntsh is used to create a single shared client + The script genclntsh is used to create + a single shared client library. It is used when building the demos. Apply the following patch to comment out the definition of PATH: *** bin/genclntsh.orig Wed Sep 30 07:37:19 1998 --- bin/genclntsh Tue Dec 22 15:36:49 1998 *************** *** 32,38 **** # # Explicit path to ensure that we're using the correct commands #PATH=/usr/bin:/usr/ccs/bin export PATH ! PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH # # each product MUST provide a $PRODUCT/admin/shrept.lst --- 32,38 ---- # # Explicit path to ensure that we're using the correct commands #PATH=/usr/bin:/usr/ccs/bin export PATH ! #PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin export PATH # # each product MUST provide a $PRODUCT/admin/shrept.lst Running Oracle When you have followed the instructions, you should be able to run - Oracle as if it was run on Linux itself. + Oracle as if it was run on Linux + itself. Installing SAP R/3 (4.6B - IDES) Contributed by Holger Kipp holger.kipp@alogis.com Converted to SGML by &a.logo; applications SAP R/3 Preface - This document describes a possible way of installing a SAP - R/3 4.6B IDES-System with Oracle 8.0.5 for Linux onto a - FreeBSD 4.3 machine, including the installation of FreeBSD 4.3 - stable and Oracle 8.0.5. + This document describes a possible way of installing a + SAP R/3 4.6B IDES-System + with Oracle 8.0.5 + for Linux onto a FreeBSD 4.3 machine, including the installation + of FreeBSD 4.3-STABLE and + Oracle 8.0.5. Even though this document tries to describe all important steps in a greater detail, it is not intended as a replacement - for the Oracle and SAP R/3 installation guides. - - Please see the documentation that comes with the SAP R/3 - Linux edition for SAP- and Oracle-specific questions, as well - as resources from Oracle and SAP OSS. + for the Oracle and + SAP R/3 installation guides. + + Please see the documentation that comes with the + SAP R/3 + Linux edition for SAP- and + Oracle-specific questions, as well + as resources from Oracle and + SAP OSS. Software The following CDROMs have been used for SAP-installation: Name Number Description KERNEL 51009113 SAP Kernel Oracle / Installation / AIX, Linux, Solaris RDBMS 51007558 Oracle / RDBMS 8.0.5.X / Linux EXPORT1 51010208 IDES / DB-Export / Disc 1 of 6 EXPORT2 51010209 IDES / DB-Export / Disc 2 of 6 EXPORT3 51010210 IDES / DB-Export / Disc3 of 6 EXPORT4 51010211 IDES / DB-Export / Disc4 of 6 EXPORT5 51010212 IDES / DB-Export / Disc5 of 6 EXPORT6 51010213 IDES / DB-Export / Disc6 of 6 Additionally, I used the Oracle 8 Server (Pre-production version 8.0.5 for Linux, Kernel Version 2.0.33) CD which is not really necessary, and of course FreeBSD 4.3 stable (it was only a few days past 4.3 RELEASE). SAP-Notes The following notes should be read before installing SAP R/3 or proved to be useful during installation: Number Title 0171356 SAP Software auf Linux: grundlegenden Anmerkungen 0201147 INST: 4.6C R/3 Inst. on UNIX - Oracle 0373203 Update / Migration Oracle 8.0.5 --> 8.0.6/8.1.6 LINUX 0072984 Release of Digital UNIX 4.0B for Oracle 0130581 R3SETUP step DIPGNTAB terminates 0144978 Your system has not been installed correctly 0162266 Questions and tips for R3SETUP on Windows NT / W2K Hardware-Requirements The following equipment is sufficient for a SAP R/3 System (4.6B): Component 4.6B 4.6C Processor 2 x 800MHz Pentium III 2 x 800MHz Pentium III Memory 1GB ECC 2GB ECC Hard Disc Space 50-60GB (IDES) 50-60GB (IDES) For use in production, Xeon-Processors with large cache, high-speed disc access (SCSI, RAID hardware controller), USV and ECC-RAM is recommended. The large amount of Hard disc space is due to the preconfigured IDES System, which creates 27 GB of database files during installation. Usually after installation it is then necessary to extend some tablespaces. I used a dual processor board with 2 800MHz Pentium III processors, Adaptec 29160 Ultra160 SCSI adapter (for accessing a 40/80 GB DLT tape drive and CDROM), Mylex AcelleRAID (2 channels, firmware 6.00-1-00 with 32MB RAM). To the Mylex Raid-controller are attached two 17GB hard discs (mirrored) and four 36GB hard discs (RAID level 5). Installation of FreeBSD 4.3 stable First I installed FreeBSD 4.3 stable. I did the default-installation via FTP. Installation via FTP Get the diskimages kern.flp and mfsroot.flp and put them on floppy disks (I got mine from ftp7.de.freebsd.org. Please choose the appropriate mirror). &prompt.root; dd if=kern.flp of=/dev/fd0 &prompt.root; dd if=mfsroot.flp of=/dev/fd0 Don't forget to use different disks for the two images :-), then boot from the floppy with the kern.flp-image on it and follow instructions. I used the following disk layout: Filesystem Size (1k-blocks) Size (GB) Mounted on /dev/da0s1a 1.016.303 1 / /dev/da0s1b 6 <swap> /dev/da0s1e 2.032.623 2 /var /dev/da0s1f 8.205.339 8 /usr /dev/da1s1e 45.734.361 45 /compat/linux/oracle /dev/da1s1f 2.032.623 2 /compat/linux/sapmnt /dev/da1s1g 2.032.623 2 /compat/linux/usr/sap - I had to configure and initialise the two logical drives + I had to configure and initialize the two logical drives with the Mylex software beforehand. It is located on the board itself and can be started during the boot phase of the - pc. + PC. Please note that this disk layout differs slightly from the SAP recommendations, as SAP suggests mounting the oracle-subdirectories (and some others) separately - I decided to just create them as real subdirectories for simplicity. Get the latest stable-sources For FreeBSD 4.3 stable onwards, it is quite easy to get the latest stable sources. With the older versions of FreeBSD, I had my own script located in /etc/cvsup. Setting - up cvsup for FreeBSD 4.3 is quite easy. As user + up CVSup for FreeBSD 4.3 is quite + easy. As user root do the following: &prompt.root; cp /etc/defaults/make.conf /etc/make.conf &prompt.root; vi /etc/make.conf The file /etc/make.conf requires the following entries to be active: SUP_UPDATE= yes SUP= /usr/local/bin/cvsup SUPFLAGS= -g -L 2 SUPHOST= cvsup8.FreeBSD.org SUPFILE= /usr/share/examples/cvsup/stable-supfile PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile Change the SUPHOST-value appropriately. The supfiles in /usr/share/examples/cvsup should be fine. If you don't want to load all the docfiles, leave the corresponding DOCSUPFILE-entry - inactive. Starting cvsup to get the latest stable-sources - is then very easy: + inactive. Starting cvsup + to get the latest stable-sources is then very easy: &prompt.root; cd /usr/src &prompt.root; make update Make world and a new kernel The first thing to do is to install the sources. As user root, do the following: &prompt.root; cd /usr/src &prompt.root; make world If this goes through, one can then continue creating and configuring the new kernel. Usually this is where to customize the kernel configuration file. As the computer is - named troubadix, the natural name for the config file also - is troubadix: + named troubadix, the natural name for the + config file also is troubadix: &prompt.root; cd /usr/src/sys/i386/conf &prompt.root; cp GENERIC TROUBADIX &prompt.root; vi TROUBADIX At this stage one can define the drivers to use and not to use, etc. See the appropriate documentation or have a look at file LINT for some additional explanations. One can then also include the parameters as described below Creating the new kernel then requires: &prompt.root; cd /usr/src/sys/i386/conf &prompt.root; config TROUBADIX &prompt.root; cd /usr/src/sys/compile/TROUBADIX &prompt.root; make depend &prompt.root; make &prompt.root; make install After make install finished successfully, one should reboot the computer to have the new kernel available. Installing the Linux environment I had some trouble downloading the required RPM-files (for 4.3 stable, 2nd May 2001), so you might try one of the following locations (if all the others fail and the following aren't out of date): ftp7.de.freebsd.org/pub/FreeBSD/distfiles/rpm ftp.redhat.com/pub/redhat/linux/6.1/en/os/i386/RedHat/RPMS Installing Linux base-system - First the linux base-system needs to be installed (as root): + First the Linux base-system needs to be installed (as root): &prompt.root; cd /usr/ports/emulators/linux_base &prompt.root; make package Installing Linux development - Next, the linux development is needed: + Next, the Linux development is needed: &prompt.root; cd /usr/ports/devel/linux_devtools &prompt.root; make package Installing necessary RPMs RPMs To start the R3SETUP-Program, pam support is needed. As this also requires some other packages, I ended up installing several packages. After that, pam still complained about a missing package, so I forced the installation and it worked. I wonder if the other packages are really needed or if it would have been sufficient to install the pam-package. Anyway, here is the list of packages I installed: cracklib-2.7-5.i386.rpm cracklib-dicts-2.7-5.i386.rpm pwdb-0.60-1.i386.rpm pam-0.68-7.i386.rpm I installed these packages with the following command: &prompt.root; rpm -i --ignoreos --root /compat/linux --dbpath /var/lib/rpm <package_name> except for the pam package, which I forced with &prompt.root; rpm -i --ignoreos --nodeps --root /compat/linux --dbpath /var/lib/rpm pam-0.68-7.i386.rpm For Oracle to run the intelligent agent, I also had to install the following RedHat Tcl package (as is stated in the FreeBSD Handbook): tcl-8.0.5-30.i386.rpm (otherwise the relinking during Oracle install won't work). There are some other issues regarding relinking of Oracle, but that is a Oracle-Linux issue, not FreeBSD specific as far as I understand it. Creating the SAP/R3 environment Creating the necessary filesystems and mountpoints For a simple installation, it is sufficient to create the following filesystems: mountpoint size in GB /compat/linux/oracle 45 GB /compat/linux/sapmnt 2 GB /compat/linux/usr/sap 2 GB I also created some links, so FreeBSD will also find the correct path: &prompt.root; ln -s /compat/linux/oracle /oracle &prompt.root; ln -s /compat/linux/sapmnt /sapmnt &prompt.root; ln -s /compat/linux/usr/sap /usr/sap Creating users and directories - SAP R/3 needs two users and three groups. The usernames - depend on the SAP system id (SID) which consists of three - letters. Some of these SIDs are reserved by SAP (for example - SAP and NIX. For - a complete list please see the SAP documentation). For the - IDES installation I used IDS. We have - therefore the following groups (group ids might differ, - these are just the values I used with my installation): + SAP R/3 needs two users and + three groups. The usernames depend on the + SAP system id (SID) which consists + of three letters. Some of these SIDs are reserved + by SAP (for example + SAP and NIX. For a + complete list please see the SAP documentation). For the IDES + installation I used IDS. We have + therefore the following groups (group ids might differ, these + are just the values I used with my installation): group id group name description 100 dba Data Base Administrator 101 sapsys SAP System 102 oper Data Base Operator For a default Oracle-Installation, only group dba is used. As oper-group, one also uses group dba (see Oracle- and SAP-documentation for further information). We also need the following users: user id username generic name group additional groups description 1000 idsadm <sid>adm sapsys oper SAP Administrator 1002 oraids ora<sid> dba oper DB Administrator Adding the users with adduser requires the following (please note shell and home directory) entries for SAP-Administrator: Name: idsadm <sid>adm Password: ****** Fullname: SAP IDES Administrator Uid: 1000 Gid: 101 (sapsys) Class: Groups: sapsys dba HOME: /home/idsadm /home/<sid>adm Shell: /bin/sh and for Database-Administrator: Name: oraids ora<sid> Password: ****** Fullname: Oracle IDES Administrator Uid: 1002 Gid: 100 (dba) Class: Groups: dba HOME: /oracle/IDS /oracle/<sid> Shell: /bin/sh This should also include group oper in case you are using both groups dba and oper. Creating directories These directories are usually created as separate filesystems. This depends entirely on your requirements. I choose to create them as simple directories, as they are all located on the same RAID 5 anyway: First we'll set owners and right of some directories (as user root): &prompt.root; chmod 775 /oracle &prompt.root; chmod 777 /sapmnt &prompt.root; chown root:dba /oracle &prompt.root; chown idsadm:sapsys /compat/linux/usr/sap &prompt.root; chmow 775 /compat/linux/usr/sap Second we'll create directories as user ora<sid>. These will all be subdirectories of /oracle/IDS: &prompt.root; su - oraids &prompt.root; mkdir mirrlogA mirrlogB origlogA origlogB &prompt.root; mkdir sapdata1 sapdata2 sapdata3 sapdata4 sapdata5 sapdata6 &prompt.root; mkdir saparch sapreorg &prompt.root; exit - In the third step we create directories as user idsadm - (<sid>adm): + In the third step we create directories as user + idsadm (<sid>adm): &prompt.root; su - idsadm &prompt.root; cd /usr/sap &prompt.root; mkdir IDS &prompt.root; mkdir trans &prompt.root; exit Entries in /etc/services SAP R/3 requires some entries in file /etc/services , which will not be set correctly during installation under FreeBSD. Please add the following entries (you need at least those entries corresponding to the instance number - in this case, 00. It'll do no harm adding all entries from 00 to 99 for dp, gw, sp and ms); sapdp00 3200/tcp # SAP Dispatcher. 3200 + Instance-Number sapgw00 3300/tcp # SAP Gateway. 3300 + Instance-Number sapsp00 3400/tcp # 3400 + Instance-Number sapms00 3500/tcp # 3500 + Instance-Number sapmsIDS 3600/tcp # SAP Message Server. 3600 + Instance-Number Necessary locales locale SAP requires at least two locales that aren't part of the default RedHat installation. SAP offers the required RPMs as download from their FTP-server (which is only accessible if you are a customer with OSS-access). See note 0171356 for a list of RPMs you need. It is also possible to just create appropriate links (for example from de_DE and en_US ), but I wouldn't recommend this for a production system (so far it worked with the IDES system without any problems, though). The following locales are needed: de_DE.ISO-8859-1 en_US.ISO-8859-1 If they are not present, there will be some problems during the installation. If these are then subsequently ignored (eg by setting the status of the offending steps to OK in file CENTRDB.R3S), it will be impossible to log onto the SAP-system without some additional effort. Kernel Tuning kernel tuning SAP R/3 Systems need a lot of resources. I therefore added the following parameters to my kernel config-file: # Set these for memory pigs (SAP and Oracle): options MAXDSIZ="(1024*1024*1024)" options DFLDSIZ="(1024*1024*1024)" # System V options needed. options SYSVSHM #SYSV-style shared memory options SHMMAXPGS=262144 #max amount of shared mem. pages options SHMMNI=256 #max number of shared memory ident if. options SHMSEG=100 #max shared mem.segs per process options SYSVMSG #SYSV-style message queues options MSGSEG=32767 #max num. of mes.segments in system options MSGSSZ=32 #size of msg-seg. MUST be power of 2 options MSGMNB=65535 #max char. per message queue options MSGTQL=2046 #max amount of msgs in system options SYSVSEM #SYSV-style semaphores options SEMMNU=256 #number of semaphore UNDO structures options SEMMNS=1024 #number of semaphores in system options SEMMNI=520 #number of semaphore indentifiers options SEMUME=100 #number of UNDO keys The minimum values are specified in the documentation that comes from SAP. As there is no description for Linux, see the HP-UX-section (32-bit) for further information. Installing SAP R/3 Preparing SAP CDROMs There are lots of CDROMs to mount and unmount during installation. Assuming you have enough CDROM-drives, you can just mount them all. I decided to copy the CDROM contents to corresponding directories: /oracle/IDS/sapreorg/<cd-name> - where <cd-name> was one of KERNEL, RDBMS, EXPORT1, - EXPORT2, EXPORT3, EXPORT4, EXPORT5 and EXPORT6. All the - filenames should be in capital letters, otherwise use the -g - option for mounting. So use the following commands: + where <cd-name> was one of KERNEL, + RDBMS, EXPORT1, + EXPORT2, EXPORT3, + EXPORT4, EXPORT5 and + EXPORT6. All the + filenames should be in capital letters, otherwise use the -g + option for mounting. So use the following commands: &prompt.root; mount_cd9660 -g /dev/cd0a /mnt &prompt.root; cp -R /mnt/* /oracle/IDS/sapreorg/<cd-name> &prompt.root; umount /mnt Running the install-script First we need to prepare an install-directory: &prompt.root; cd /oracle/IDS/sapreorg &prompt.root; mkdir install &prompt.root; cd install Then the install-script is started, which will copy nearly all the relevant files into the install-directory: /oracle/IDS/sapreorg/KERNEL/UNIX/INSTTOOL.SH As this is an IDES-Installation with a fully customized SAP R/3 Demo-System, we have six instead of just three EXPORT-CDs. At this point the installation template CENTRDB.R3S is for installing a standard central instance (R/3 and Database), not an IDES central instance, so copy the corresponding CENTRDB.R3S from the EXPORT1 directory, otherwise R3SETUP will only ask for three EXPORT-CDs. Start R3SETUP Make sure LD_LIBRARY_PATH is set correctly: &prompt.root; export LD_LIBRARY_PATH=/oracle/IDS/lib:/sapmnt/IDS/exe:/oracle/805_32/lib Start R3SETUP as user root from installation directory: &prompt.root; cd /oracle/IDS/sapreorg/install &prompt.root; ./R3SETUP -f CENTRDB.R3S The script then asks some questions (defaults in brackets, followed by actual input): Question Default Input Enter SAP System ID [C11] IDS<ret> Enter SAP Instance Number [00] <ret> Enter SAPMOUNT Directory [/sapmnt] <ret> Enter name of SAP central host [troubadix.domain.de] <ret> Enter name of SAP db host [troubadix] <ret> Select character set [1] (WE8DEC) <ret> Enter Oracle server version (1) Oracle 8.0.5, (2) Oracle 8.0.6, (3) Oracle 8.1.5, (4) Oracle 8.1.6 1<ret> Extract Oracle Client archive [1] (Yes, extract) <ret> Enter path to KERNEL CD [/sapcd] /oracle/IDS/sapreorg/KERNEL Enter path to RDBMS CD [/sapcd] /oracle/IDS/sapreorg/RDBMS Enter path to EXPORT1 CD [/sapcd] /oracle/IDS/sapreorg/EXPORT1 Directory to copy EXPORT1 CD [/oracle/IDS/sapreorg/CD4_DIR] <ret> Enter path to EXPORT2 CD [/sapcd] /oracle/IDS/sapreorg/EXPORT2 Directory to copy EXPORT2 CD [/oracle/IDS/sapreorg/CD5_DIR] <ret> Enter path to EXPORT3 CD [/sapcd] /oracle/IDS/sapreorg/EXPORT3 Directory to copy EXPORT3 CD [/oracle/IDS/sapreorg/CD6_DIR] <ret> Enter path to EXPORT4 CD [/sapcd] /oracle/IDS/sapreorg/EXPORT4 Directory to copy EXPORT4 CD [/oracle/IDS/sapreorg/CD7_DIR] <ret> Enter path to EXPORT5 CD [/sapcd] /oracle/IDS/sapreorg/EXPORT5 Directory to copy EXPORT5 CD [/oracle/IDS/sapreorg/CD8_DIR] <ret> Enter path to EXPORT6 CD [/sapcd] /oracle/IDS/sapreorg/EXPORT6 Directory to copy EXPORT6 CD [/oracle/IDS/sapreorg/CD9_DIR] <ret> Enter amount of RAM for SAP + DB 850<ret> (in Megabytes) Service Entry Message Server [3600] <ret> Enter Group-ID of sapsys [101] <ret> Enter Group-ID of oper [102] <ret> Enter Group-ID of dba [100] <ret> Enter User-ID of <sid>adm [1000] <ret> Enter User-ID of ora<sid> [1002] <ret> Number of parallel procs [2] <ret> If I had not copied the CDs to the different locations, then the SAP-Installer can't find the CD needed (identified by the LABEL.ASC-File on CD) and would then ask you to insert / mount the CD and confirm or enter - the mountpath. + the mount path. The CENTRDB.R3S might not be error-free. In my case, it requested EXPORT4 again (but indicated the correct key (6_LOCATI ON, then 7_LOCATION etc.), so one can just continue with entering the correct values. Don't get irritated. Apart from some problems mentioned below, everything - should go straight throught up to the point where the Oracle + should go straight through up to the point where the Oracle database software needs to be installed. Installing Oracle 8.0.5 Please see the corresponding SAP-Notes and Oracle Readmes regarding Linux and Oracle DB for possible problems. Most if not all problems stem from incompatible libraries For more information on installing Oracle, refer to the Installing Oracle chapter. Installing the Oracle 8.0.5 with orainst If Oracle 8.0.5 is to be used, some additional libraries are needed for successfully relinking, as Oracle 8.0.5 was linked with an old glibc (RedHat 6.0), but RedHat 6.1 already uses a new glibc. So you have to install the following additional packages to ensure that linking will work: compat-libs-5.2-2.i386.rpm compat-glibc-5.2-2.0.7.2.i386.rpm compat-egcs-5.2-1.0.3a.1.i386.rpm compat-egcs-c++-5.2-1.0.3a.1.i386.rpm compat-binutils-5.2-2.9.1.0.23.1.i386.rpm See the corresponding SAP-Notes or Oracle Readmes for further information. If this is no option (at the time of installation I didn't have enough time to check this), one could use the original binaries, or use the relinked binaries from an original RedHat System. For compiling the intelligent agent, the RedHat Tcl package must be installed. If you can't get tcl-8.0.3-20.i386.rpm, a newer one like tcl-8.0.5-30.i386.rpm for RedHat 6.1 should also do. Apart from relinking, the installation is straightforward: &prompt.root; su - oraids &prompt.root; export TERM=xterm &prompt.root; export ORACLE_TERM=xterm &prompt.root; export ORACLE_HOME=/oracle/IDS &prompt.root; cd /ORACLE_HOME/orainst_sap &prompt.root; ./orainst Confirm all Screens with Enter until the software is installed, except that one has to deselect the Oracle On-Line Text Viewer , as this is not currently available for Linux. Oracle then wants to relink with i386-glibc20-linux-gcc instead of the available gcc, egcs or i386-redhat-linux-gcc . Due to time constrains I decided to use the binaries - from an Oracle 8.0.5 PreProduction release, after the first + from an Oracle 8.0.5 PreProduction + release, after the first attempt at getting the version from the RDBMS-CD working, failed, and finding / accessing the correct RPMs was a nightmare at that time. Installing the Oracle 8.0.5 Pre-Production release for Linux (Kernel 2.0.33) This installation is quite easy. Mount the CD, start the installer. It will then ask for the location of the Oracle home directory, and copy all binaries there. I did not delete the remains of my previous RDBMS-installation tries, though. Afterwards, Oracle Database could be started with no problems. Continue with SAP R/3 installation - First check the environment settings of users idsamd - (<sid>adm) and oraids (ora<sid>). They should now + First check the environment settings of users + idsamd + (<sid>adm) and + oraids (ora<sid>). They should now both have the files .profile , .login and .cshrc which are all using hostname. In case the system's hostname is the fully qualified name, you need to change hostname to hostname -s within all three files. Database load Afterwards, R3SETUP can either be restarted or continued (depending on whether exit was chosen or not). R3SETUP then creates the tablespaces and loads the data from EXPORT1 to EXPORT6 (remember, it is an IDES system, otherwise it would only be EXPORT1 to EXPORT3) with R3load into the database. When the database load is finished (might take a few hours), some passwords are requested. For test installations, one can use the well known default passwords (use different ones if security is an issue!): Question Input Enter Password for sapr3 sap<ret> Confirum Password for sapr3 sap<ret> Enter Password for sys change_on_install<ret> Confirm Password for sys change_on_install<ret> Enter Password for system manager<ret> Confirm Password for system manager<ret> - At this point I had a few problems with dipgntab. + At this point I had a few problems with + dipgntab. Listener - Start the Oracle-Listener as user oraids (ora<sid>) as - follows: + Start the Oracle-Listener as user + oraids (ora<sid>) as follows: umask 0; lsnrctl start Otherwise you might get ORA-12546 as the sockets won't have the correct permissions. See SAP note 072984. Post-installation steps Request SAP R/3 license key This is needed, as the temporary license is only valid for four weeks. Don't forget to enter the correct Operating System: (X) Other: FreeBSD 4.3 Stable. First get the hardware key. Log on as user idsadm and call saplicense: &prompt.root; /sapmnt/IDS/exe/saplicense -get Calling saplicense without options gives a list of options. Upon receiving the license key, it can be installed using &prompt.root; /sapmnt/IDS/exe/saplicense -install You are then required to enter the following values: SAP SYSTEM ID = <SID, 3 chars> CUSTOMER KEY = <hardware key, 11 chars> INSTALLATION NO = <installation, 10 digits> EXPIRATION DATE = <yyyymmdd, usually "99991231"> LICENSE KEY = <license key, 24 chars> Creating Users Create a user within client 000 (for some tasks required to be done within client 000, but with a user different from users sap* and ddic). As a username, I usually choose wartung (or service in English). Profiles required are sap_new and sap_all. For additional safety the passwords of default users within all clients should be changed (this includes users sap* and ddic). Configure Transport System, Profile, Operation Modes, etc. - Within client 000, user different from ddic and sap*, do - at least the following: + Within client 000, user different from ddic + and sap*, do at least the following: Task Transaction Configure Transport System, eg as Stand-Alone Transport Domain Entity STMS Create / Edit Profile for System RZ10 Maintain Operation Modes and Instances RZ04 These and all the other post-installation steps are thoroughly described in SAP installation guides. Edit init<sid>.sap (initIDS.sap) The file /oracle/IDS/dbs/initIDS.sap contains the SAP backup profile. Here the size of the tape to be used, type of compression and so on need to be defined. To get this running with sapdba / brbackup, I changed the following values: compress = hardware archive_function = copy_delete_save cpio_flags = "-ov --format=newc --block-size=128 --quiet" cpio_in_flags = "-iuv --block-size=128 --quiet" tape_size = 38000M tape_address = /dev/nsa0 tape_address_rew = /dev/sa0 Explanations: compress The tape I use is a HP DLT1 which does hardware compression. archive_function This defines the - default behaviour for saving Oracle archive logs: New logfiles + default behavior for saving Oracle archive logs: New logfiles are saved to tape, already saved logfiles are saved again and are then deleted. This prevents lots of trouble if one needs to recover the database, and one of the archive-tapes has gone bad. cpio_flags Default is to use -B which sets blocksize to 5120 Bytes. For DLT-Tapes, HP recommends at least 32K blocksize, so I used --block-size=128 for 64K. --format=newc is needed I have inode numbers greater than - 65535. The last option --quiet is needed as otherwise brbackup - complains as soon as cpio outputs the numbers of blocks - saved. + 65535. The last option --quiet is needed as otherwise + brbackup + complains as soon as cpio outputs the + numbers of blocks saved. cpio_in_flags Flags needed for - loading data back from tape. Format is reckognized + loading data back from tape. Format is recognized automagically. tape_size This usually gives the raw storage capability of the tape. For security reason (we use hardware compression), the value is slightly lower than the actual value. tape_address The non-rewindable - device to be used with cpio. + device to be used with cpio. tape_address_rew The rewindable device to be used with cpio. Problems during installation OSUSERSIDADM_IND_ORA during R3SETUP If R3SETUP complains at this stage, edit file CENTRDB.R3S. Locate [OSUSERSIDADM_IND_ORA] and edit the following values: HOME=/home/idsadm (was empty) STATUS=OK (had status ERROR) Then you can restart R3SETUP with: &prompt.root; ./R3SETUP -f CENTRDB.R3S OSUSERDBSID_IND_ORA during R3SETUP Possibly R3SETUP also complains at this stage. Just edit CENTRDB.R3S. Locate [OSUSERDBSID_IND_ORA] and edit the following value in that section: STATUS=OK Then just restart R3SETUP again: &prompt.root; ./R3SETUP -f CENTRDB.R3S oraview.vrf FILE NOT FOUND during Oracle installation You haven't deselected Oracle On-Line Text Viewer before starting the installation. This is marked for installation even though this option is currently not available for Linux. Deselect this product inside the Oracle installation menu and restart installation. TEXTENV_INVALID during R3SETUP, RFC or SAPGUI start If this error is encountered, the correct locale is - missing. SAP note 0171356 lists the necessary RPMs that - need be installed (eg saplocales-1.0-3, - saposcheck-1.0-1 for RedHat 6.1). In - case you ignored all the related errors and set the - corresponding status from ERROR to OK (in CENTRDB.R3S) every - time R3SETUP complained and just restarted R3SETUP, the - SAP-System will not be properly configured and you will then - not be able to connect to the system with a sapgui, even - though the system can be started. Trying to connect with the - old Linux sapgui gave the following messages: + missing. SAP note 0171356 lists the necessary RPMs that need + be installed (eg saplocales-1.0-3, + saposcheck-1.0-1 for RedHat 6.1). In case + you ignored all the related errors and set the corresponding + status from ERROR to OK (in CENTRDB.R3S) every time R3SETUP + complained and just restarted R3SETUP, the SAP-System will not + be properly configured and you will then not be able to + connect to the system with a + sapgui, even though the system + can be started. Trying to connect with the old Linux + sapgui gave the following + messages: Sat May 5 14:23:14 2001 *** ERROR => no valid userarea given [trgmsgo. 0401] Sat May 5 14:23:22 2001 *** ERROR => ERROR NR 24 occured [trgmsgi. 0410] *** ERROR => Error when generating text environment. [trgmsgi. 0435] *** ERROR => function failed [trgmsgi. 0447] *** ERROR => no socket operation allowed [trxio.c 3363] Speicherzugriffsfehler - This behaviour is due to SAP R/3 being unable to + This behavior is due to SAP R/3 being unable to correctly assign a locale and also not being properly configured itself (missing entries in some database tables). To be able to connect to SAP, add the following entries to file DEFAULT.PFL (see note 0043288): abap/set_etct_env_at_new_mode =0 install/collate/active =0 rscp/TCP0B =TCP0B Restart the SAP system. Now one can connect to the system, even though country-specific language settings might not work as expected. After correcting country-settings (and providing the correct locales), these entries can be removed from DEFAULT.PFL and the SAP system can be restarted. ORA-12546. Start Listener with correct permissions Start the Oracle Listener as user oraids with the following commands: &prompt.root; umask 0; lsnrctl start Otherwise one might get ORA-12546 as the sockets won't have the correct permissions. See SAP note 0072984. [DIPGNTAB_IND_IND] during R3SETUP - In general, see SAP note 0130581 (R3SETUP step DIPGNTAB + In general, see SAP note 0130581 (R3SETUP step + DIPGNTAB terminates). During this specific installation, for some reasons the installation process was not using the proper SAP system name "IDS", but the empty string "" instead. This lead to some minor problems with accessing directories, as the paths are generated dynamically using <sid> (in this case IDS). So instead of accessing: /usr/sap/IDS/SYS/... /usr/sap/IDS/DVMGS00 the following path were used: /usr/sap//SYS/... /usr/sap/D00i To continue with the installation, I created a link and an additional directory: &prompt.root; pwd /compat/linux/usr/sap &prompt.root; ls -l total 4 drwxr-xr-x 3 idsadm sapsys 512 May 5 11:20 D00 drwxr-x--x 5 idsadm sapsys 512 May 5 11:35 IDS lrwxr-xr-x 1 root sapsys 7 May 5 11:35 SYS -> IDS/SYS drwxrwxr-x 2 idsadm sapsys 512 May 5 13:00 tmp drwxrwxr-x 11 idsadm sapsys 512 May 4 14:20 trans I also found SAP notes (0029227 and 0008401) describing - this behaviour. + this behavior. [RFCRSWBOINI_IND_IND] during R3SETUP Set STATUS of the offending step from ERROR to OK (file - CENTRDB.R3S) and restart R3SETUP. After - installation, you have to execute the report RSWBOINS from - transaction SE38. See SAP note 0162266 for additional - information about phase RFCRSWBOINI and RFCRADDBDIF. + CENTRDB.R3S) and restart R3SETUP. After + installation, you have to execute the report + RSWBOINS from transaction SE38. See SAP + note 0162266 for additional information about phase + RFCRSWBOINI and + RFCRADDBDIF. [RFCRADDBDIF_IND_IND] during R3SETUP Set STATUS of the offending step from ERROR to OK (file - CENTRDB.R3S) and restart R3SETUP. After - installation, you have to execute the report RADDBDIF from - transaction SE38. See SAP note 0162266 for further - information. + CENTRDB.R3S) and restart R3SETUP. After + installation, you have to execute the report + RADDBDIF from transaction SE38. + See SAP note 0162266 for further information. Advanced Topics If you are curious as to how the Linux binary compatibility works, this is the section you want to read. Most of what follows is based heavily on an email written to &a.chat; by Terry Lambert tlambert@primenet.com (Message ID: <199906020108.SAA07001@usr09.primenet.com>). How Does It Work? execution class loader FreeBSD has an abstraction called an execution class loader. This is a wedge into the &man.execve.2; system call. What happens is that FreeBSD has a list of loaders, instead of a single loader with a fallback to the #! loader for running any shell interpreters or shell scripts. Historically, the only loader on the Unix platform examined the magic number (generally the first 4 or 8 bytes of the file) to see if it was a binary known to the system, and if so, invoked the binary loader. If it was not the binary type for the system, the &man.execve.2; call returned a failure, and the shell attempted to start executing it as shell commands. The assumption was a default of whatever the current shell is. Later, a hack was made for &man.sh.1; to examine the first two characters, and if they were :\n, then it invoked the &man.csh.1; shell instead (we believe SCO first made this hack). What FreeBSD does now is go through a list of loaders, with a generic #! loader that knows about interpreters as the characters which follow to the next whitespace next to last, followed by a fallback to /bin/sh. ELF For the Linux ABI support, FreeBSD sees the magic number as an ELF binary (it makes no distinction between FreeBSD, Solaris, Linux, or any other OS which has an ELF image type, at this point). Solaris The ELF loader looks for a specialized brand, which is a comment section in the ELF image, and which is not present on SVR4/Solaris ELF binaries. For Linux binaries to function, they must be branded as type Linux; from &man.brandelf.1;: &prompt.root; brandelf -t Linux file When this is done, the ELF loader will see the Linux brand on the file. ELF branding When the ELF loader sees the Linux brand, the loader replaces a pointer in the proc structure. All system calls are indexed through this pointer (in a traditional Unix system, this would be the sysent[] structure array, containing the system calls). In addition, the process flagged for special handling of the trap vector for the signal trampoline code, and sever other (minor) fix-ups that are handled by the Linux kernel module. The Linux system call vector contains, among other things, a list of sysent[] entries whose addresses reside in the kernel module. When a system call is called by the Linux binary, the trap code dereferences the system call function pointer off the proc structure, and gets the Linux, not the FreeBSD, system call entry points. In addition, the Linux mode dynamically reroots lookups; this is, in effect, what the union option to FS mounts (not the unionfs!) does. First, an attempt is made to lookup the file in the /compat/linux/original-path directory, then only if that fails, the lookup is done in the /original-path directory. This makes sure that binaries that require other binaries can run (e.g., the Linux toolchain can all run under Linux ABI support). It also means that the Linux binaries can load and exec FreeBSD binaries, if there are no corresponding Linux binaries present, and that you could place a &man.uname.1; command in the /compat/linux directory tree to ensure that the Linux binaries could not tell they were not running on Linux. In effect, there is a Linux kernel in the FreeBSD kernel; the various underlying functions that implement all of the services provided by the kernel are identical to both the FreeBSD system call table entries, and the Linux system call table entries: file system operations, virtual memory operations, signal delivery, System V IPC, etc… The only difference is that FreeBSD binaries get the FreeBSD glue functions, and Linux binaries get the Linux glue functions (most older OS's only had their own glue functions: addresses of functions in a static global sysent[] structure array, instead of addresses of functions dereferenced off a dynamically initialized pointer in the proc structure of the process making the call). Which one is the native FreeBSD ABI? It does not matter. Basically the only difference is that (currently; this could easily be changed in a future release, and probably will be after this) the FreeBSD glue functions are statically linked into the kernel, and the Linux glue functions can be statically linked, or they can be accessed via a kernel module. Yeah, but is this really emulation? No. It is an ABI implementation, not an emulation. There is no emulator (or simulator, to cut off the next question) involved. So why is it sometimes called Linux emulation? To make it hard to sell FreeBSD! 8-). Really, it is because the historical implementation was done at a time when there was really no word other than that to describe what was going on; saying that FreeBSD ran Linux binaries was not true, if you did not compile the code in or load a module, and there needed to be a word to describe what was being loaded—hence the Linux emulator.
diff --git a/en_US.ISO8859-1/books/handbook/x11/chapter.sgml b/en_US.ISO8859-1/books/handbook/x11/chapter.sgml index 5040b09af4..b27000549f 100644 --- a/en_US.ISO8859-1/books/handbook/x11/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/x11/chapter.sgml @@ -1,2295 +1,2378 @@ The X Window System This chapter has been graciously donated by &a.grog; from his book, The Complete FreeBSD, and remains copyright of him. Modifications for the handbook made by &a.jim;. The section on - fonts in XFree86 was contributed by &a.murray; and the section on - XDM was contributed by &a.sethk;. + fonts in XFree86 was contributed by &a.murray; + and the section on XDM was contributed by &a.sethk;. Synopsis The following chapter will cover installing and configuring X11 on your system. For more information on X11 and to see whether your video card is supported, check the XFree86 web site. Overview - FreeBSD comes with XFree86, a port of X11R6 that supports - several versions of Intel-based Unix. This chapter describes how - to set up your XFree86 server. It is based on material supplied - with the FreeBSD release, specifically the files README.FreeBSD - and README.Config in the directory + FreeBSD comes with XFree86, a + port of X11R6 that supports several versions of Intel-based Unix. + This chapter describes how to set up your + XFree86 server. It is based on + material supplied with the FreeBSD release, specifically the files + README.FreeBSD and + README.Config in the directory /usr/X11R6/lib/X11/doc. If you find any discrepancy, the material in those files will be more up-to-date than this description. In addition, the file /usr/X11R6/lib/X11/doc/RELNOTES contains OS-independent information about the current release. X uses a lot of memory. In order to run X, your system should have an absolute minimum of 8 MB of memory, but performance will be painful with so little memory. A more practical minimum is 16 MB, and you can improve performance by adding more memory. If you use X intensively, you will continue seeing performance improvement by increasing to as much as 128 MB of RAM. There is lots of useful information in the rest of this chapter, but maybe you are not interested in information right now. You just want to get your X server up and running. However, be warned: An incorrect installation can burn out your monitor or your video board. However, if you know you are in spec, and you have a standard Super VGA board and a good multi-frequency monitor, then you can probably get things up and running without reading this chapter. Installing XFree86 - The easiest way to install XFree86 is with the sysinstall + The easiest way to install XFree86 + is with the &man.sysinstall.8; program, either when you are installing the system, or later by starting the program /stand/sysinstall. In the rest of this chapter, we will look at what makes up the distribution, and we will also take a look at manually installing X11. The XFree86 Distribution - XFree86 is distributed as a bewildering number of archives. + XFree86 is distributed as a bewildering + number of archives. In the following section, we will take a look at what you should install. Do not worry too much, though; if you cannot decide what to pick and you have 200MB of disk space free, it's safe to unpack everything. At a minimum you need to unpack the archives in the following table and at least one server that matches your VGA board. You will need 10Mb for the minimum required run-time binaries only, and between 1.7 and 3 MB for the server. Below is a table of the required components. Archive Description Xbin.tgz All the executable X client applications and shared libraries. Xfnts.tgz The misc and 75 dpi fonts. Xlib.tgz Data files and libraries needed at runtime. The X Server In addition to the archives above, you need at least one server, which will take up about 3 MB of disk. The choice depends primarily on what kind of display board you have. The default server name is /usr/X11R6/bin/X, and it is a link to a specific server binary /usr/X11R6/bin/XF86_xxxx. You will find the server archives for the standard PC architecture in /cdrom/XF86336/Servers, and the servers for the Japanese PC98 architecture in /cdrom/XF86336/PC98-Servers if you have the CD set. Alternatively, they are available on our FTP site at ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/XF86336/Servers/ or ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/XF86336/PC98-Servers/ Available X servers for the standard PC architecture: Archive Description X8514.tgz 8-bit color for IBM 8514 and true compatibles. XAGX.tgz 8 and 16-bit color for AGX and XGA boards. XI128.tgz 8 and 16-bit color for I128 boards. XMa32.tgz 8 and 16-bit color for ATI Mach32 boards. XMa64.tgz 8, 16, and 32-bit color fot ATI Mach64 boards. XMa8.tgz 8-bit color for ATI Mach8 boards. XMono.tgz 1-bit monochrome for VGA, Super-VGA, Hercules, and others. XP9K.tgz 8, 16, and 32-bit color for Weitek P9000 boards (Diamond Viper). XS3.tgz 8, 16, and 32-bit color for S3 boards. XS3V.tgz 8 and 16-bit color for S3 ViRGE boards. XSVGA.tgz >=8-bit color for Super-VGA cards. XVG16.tgz 4-bit color for VGA and Super-VGA cards. XW32.tgz 8-bit color for ET4000/W32, /W32i, /W32p, and ET6000 cards. Available X servers for the Japanese PC98 architecture: Archive Description X9GAN.tgz 8-bit color for PC98 GA-98NB/WAP boards. X9GA9.tgz 8, 16, and 32-bit color for PC98 S3 GA-968 boards. X9480.tgz 8-bit color for PC98 PEGC X9NKV.tgz 8-bit color for PC98 NEC-CIRRUS/EPSON NKV/NKV2 boards. X9WBS.tgz 8-bit color for PC98 WAB-S boards. X9WEP.tgz 8-bit color for PC98 WAB-EP boards. X9WSN.tgz 8-bit color for PC98 WSN-A2F boards. X9EGC.tgz 4-bit color for PC98 EGC. X9TGU.tgz 8 and 16-bit color for PC98 Trident Cyber9320/9680 boards. X9NS3.tgz 8 and 16-bit color for PC98 NEC S3 boards. X9SPW.tgz 8 and 16-bit color for PC98 S3 PW/PCSKB boards. X9LPW.tgz 8 and 16-bit color for PC98 S3 PW/LB boards. Each of these servers includes a manual page which contains details of supported chipsets and server-specific configuration options. There are also a number of archives are provided for X programmers: Archive Description Xprog.tgz Config, lib*.a, and *.h files needed for compiling clients. Xctrb.tgz Contributed sources. Xlk98.tgz The link kit for building servers, Japanese PC98 version. Xlkit.tgz The link kit for building servers, normal PC architecture. Xsrc-1.tgz Part 1 of the complete sources. Xsrc-2.tgz Part 2 of the complete sources. Xsrc-3.tgz Part 3 of the complete sources. You will need Xprog.tgz if you intend to install ports of X software. - XFree86 also includes a number of optional parts, such as - documentation, and setup programs. + XFree86 also includes a number + of optional parts, such as documentation, and setup + programs. Archive Description Xdoc.tgz READMEs Xjdoc.tgz READMEs in Japanese. Xps.tgz READMEs in PostScript. Xhtml.tgz READMEs in HTML. Xman.tgz Manual pages. Xcfg.tgz Customizable xinit and xdm runtime configuration files. Xset.tgz The X86Setup utility; a graphical version of the xf86config utility. Xjset.tgz The XF86Setup utility, Japanese version, for the normal PC architecture. - XF86Setup is a graphical mode setup - program for XFree86, and you may prefer it to the standard setup - program xf86config. You do not need any - special archives for xf86config; it is - included in Xbin.tgz. + XF86Setup is a graphical mode setup + program for XFree86, and you may + prefer it to the standard setup program + xf86config. You do not need any special + archives for xf86config; it is included in + Xbin.tgz. The first time you install, you will need Xcfg.tgz to create your initial configuration files. Do not use it when upgrading; it overwrites your configuration files. There are also additional fonts that are available with - XFree86: + XFree86: Archive Description Xf100.tgz 100 dpi fonts. Xfscl.tgz Speedo and Type1 fonts. Xfnon.tgz Japanese, Chinese, and other non-english fonts. Xfcyr.tgz Cyrillic fonts. Unlike the X servers described above, the archives for the following servers are all in the main directory. Archive Description Xfsrv.tgz The font server. Xnest.tgz A nested server running as a client window on another display. Xprt.tgz The print server. Xvfb.tgz The Virtual Framebuffer X server, which renders into memory or an mmapped file. Installing XFree86 Manually - If you do not use sysinstall to install X, you need to perform - a number of steps: + If you do not use sysinstall + to install X, you need to perform a number of steps: Create the directories and unpack the required archives. Choose and install an X server. Set up the environment to be able to access X. Find a virtual terminal in which to run X. Configure X for your hardware. This sounds like a lot of work, but if you approach it methodically, it is not too bad. In the rest of this section, we will look at each step in turn. Unpacking the Archives You must unpack the archives as root, since a number of the executables are set-user-id (they run as root even when started by other users). If you unpack the server as an ordinary user, it may abort when you try to run it. You must also use a umask value of 022 (permissions rwxr-xr-x), because the X server requires special permissions. &prompt.user; su Password: &prompt.root; umask 022 If you do not have enough space in the /usr file system, create a directory on another partition and symlink it to /usr. For example, if you have a file system /home with adequate space, you could do: &prompt.root; cd /home &prompt.root; mkdir X11R6 &prompt.root; ln -s /home/X11R6 /usr/X11R6 Next, decide which archives you want to install. For a minimal installation, choose Xbin.tgz, Xfnts.tgz, Xlib.tgz, and Xcfg.tgz. If you have already configured X for your hardware, you can omit Xcfg.tgz. If you are using sh, unpack like this: &prompt.root; mkdir -p /usr/X11R6 &prompt.root; cd /usr/X11R6 &prompt.root; for i in bin fnts lib cfg; do &prompt.root; tar xzf X$i.tgz &prompt.root; done - If you are using csh, enter: + If you are using csh, enter: &prompt.root; mkdir -p /usr/X11R6 &prompt.root; cd /usr/X11R6 &prompt.root; foreach i (bin fnts lib cfg) ? tar xzf X$i.tgz ? end Installing the Server Choose a server archive corresponding to your VGA board. If the table in the section above does not give you enough information, check the server man pages, /usr/X11R6/man/man1/XF86_*, which list the VGA chipsets supported by each server. For example, if you have an ET4000 based board you will use the XF86_SVGA server. In this case you would enter: &prompt.root; cd /usr/X11R6 &prompt.root; tar xzf XSVGA.tgz [substitute your server name here] Setting up the environment Next, you may wish to create a symbolic link /usr/X11/bin/X that points to the server that matches your video board. In this example, it is the XF86_SVGA server: &prompt.root; cd /usr/X11R6/bin &prompt.root; rm X &prompt.root; ln -s XF86_SVGA X X needs this symbolic link in order to be able to work correctly, but you have the option of setting it when you run xf86config – see below. Next, check that the directory /usr/X11R6/bin is in the default path for - sh in /etc/profile and for csh in + sh in /etc/profile and for + csh in /etc/csh.login, and add it if it is not. It is best to do this with an editor, but if you want to take a shortcut, you can enter: &prompt.root; echo 'PATH=$PATH:/usr/X11R6/bin' >>/etc/profile or: &prompt.root; echo 'set path = ($path /usr/X11R6/bin)' >>/etc/csh.login Alternatively, make sure everybody who uses X puts /usr/X11R6/bin in their shell's PATH variable. - Next, invoke ldconfig to put the shared libraries in - ld.so's cache: + Next, invoke ldconfig to put the + shared libraries in ld.so's cache: &prompt.root; ldconfig -m /usr/X11R6/lib You can omit invoking ldconfig if you plan to reboot before using X. You do not need to uncompress the font files, but if you do, you must run mkfontdir in the corresponding font directory, otherwise your server will abort with the message could not open default font `fixed'. Assigning a virtual terminal to X Next, make sure you have a spare virtual console which is - running a getty. First check how many virtual consoles you + running a &man.getty.8;. First check how many virtual consoles you have: &prompt.root; dmesg | grep virtual sc0: VGA color <16 virtual consoles, flags=0x0> Then check /etc/ttys to make sure there is at least one virtual terminal (ttyvxx device) which - does not have a getty enabled. Look for the keyword + does not have a &man.getty.8; enabled. Look for the keyword off: &prompt.root; grep ttyv /etc/ttys ttyv0 "/usr/libexec/getty Pc" cons25 on secure ttyv1 "/usr/libexec/getty Pc" cons25 on secure ttyv2 "/usr/libexec/getty Pc" cons25 on secure ttyv3 "/usr/libexec/getty Pc" cons25 off secure In this case, /dev/ttyv3 is - available, if your kernel has least 4 VTs. If not, either - disable a getty in /etc/ttys by - changing on to off, or build another kernel with more virtual + available, if your kernel has least 4 + vts. If not, either disable a + &man.getty.8; in /etc/ttys by changing on + to off, or build another kernel with more virtual terminals. Configuring X for Your Hardware After installing the X software, you will need to customize the file XF86Config, which tells the X server about your hardware and how you want to run it. In order to set up XF86Config, you will need the following hardware information: Your mouse type, the bit rate if it is a serial mouse, and the name of the device to which it is connected. This will typically be /dev/ttyd0 or /dev/ttyd1 for a serial mouse, /dev/psm0 for a PS/2 mouse, or /dev/mse0 for a bus mouse. The type of the video board and the amount of display memory. If it is a no-name board, establish what VGA chip set it uses. The parameters of your monitor; vertical and horizontal frequency. Identifying the hardware How do you decide what your hardware is? The manufacturer should tell you, but very often the information you get about your display board and monitor is pitiful; Super VGA board with 76 Hz refresh rate and 16,777,216 colors. This tells you the maximum pixel depth (24 bits – - the number of colors is 2(pixel depth)), but it doesn't tell you anything else about the display board. As we will see later, the real parameters you need to know are the maximum horizontal frequency, the dot clock range, the chipset and the amount of display memory. You could be unlucky trying to get some of this information, but you can get some with the SuperProbe program. It should always be able to tell you the chipset and the amount of memory on board. Occasionally SuperProbe can crash your system. Make sure you are not doing anything important when - you run it. Running SuperProbe looks like this: + you run it. Running SuperProbe looks like + this: &prompt.root; SuperProbe (warnings and acknowledgments omitted) First video: Super-VGA Chipset: Tseng ET4000 (Port Probed) Memory: 1024 Kbytes RAMDAC: Generic 8-bit pseudo-color DAC (with 6-bit wide lookup tables (or in 6-bit mode)) SuperProbe is very finicky about running at all, and you will often get messages like: SuperProbe: Cannot be run while an X server is running SuperProbe: If an X server is not running, unset $DISPLAY and try again SuperProbe: Cannot open video In other words, even if no X server is running, SuperProbe will not work if you have the environment variable DISPLAY set. How do you unset it? With Bourne-style shells, you enter: &prompt.root; unset DISPLAY In the C shell, you enter: &prompt.root; unsetenv DISPLAY Running <command>xf86config</command> The easy way to create your configuration file is with one of the utilities xf86config (note the lower case name) or XF86Setup. Both lead you through the configuration step by step. xf86config runs in character mode, while XF86Setup runs in a graphical mode. XF86Setup can have problems with unusual hardware, so I personally prefer xf86config. - You can also use sysinstall, but this does not change + You can also use sysinstall, + but this does not change much; sysinstall just starts xf86config for you, and it is easier to start it directly. In this section, we will use an example to illustrate configuration via xf86config. We are installing X for an ancient Diamond SpeedStar with 1 MB of display memory, a Logitech MouseMan mouse, and an ADI MicroScan 5AP monitor. The mouse is connected to the system via the first serial port, /dev/ttyd0. To run xf86config, type in the name. If /usr/X11R6/bin is included in your PATH environment variable, you just need to type xf86config. If it is not, you need to type out the full path to xf86config, like so: &prompt.root; /usr/X11R6/bin/xf86config This program will create a basic XF86Configfile, based on menu selections you make. The XF86Config file usually resides in /usr/X11R6/lib/X11 or /etc. A sample - XF86Config file is supplied with XFree86; + XF86Config file is supplied with + XFree86; it is configured for a standard VGA card and monitor with 640x480 resolution. This program will ask for a pathname when it is ready to write the file. You can either take the sample XF86Config as a base and edit it for your configuration, or let this program produce a base XF86Config file for your configuration and fine-tune it. Refer to /usr/X11R6/lib/X11/doc/README.Config for a detailed overview of the configuration process. For accelerated servers (including accelerated drivers in the SVGA server), there are many chipset and card-specific options and settings. This program does not know about these. On some configurations some of these settings must be specified. Refer to the server man pages and chipset-specific READMEs. Before continuing with this program, make sure you know the chipset and amount of video memory on your video card. SuperProbe can help with this. It is also helpful if you know what server you want to run. Press enter to continue, or ctrl-c to abort. ENTER First specify a mouse protocol type. Choose one from the following list: 1. Microsoft compatible (2-button protocol) 2. Mouse Systems (3-button protocol) 3. Bus Mouse 4. PS/2 Mouse 5. Logitech Mouse (serial, old type, Logitech protocol) 6. Logitech MouseMan (Microsoft compatible) 7. MM Series 8. MM HitTablet 9. Microsoft IntelliMouse If you have a two-button mouse, it is most likely of type 1, and if you have a three-button mouse, it can probably support both protocol 1 and 2. There are two main varieties of the latter type; mice with a switch to select the protocol, and mice that default to 1 and require a button to be held at boot-time to select protocol 2. Some mice can be convinced to do 2 by sending a special sequence to the serial port (see the ClearDTR/ClearRTS options). Enter a protocol number: 6 Logitech MouseMan You have selected a Logitech MouseMan type mouse. You might want to enable ChordMiddle which could cause the third button to work. Please answer the following question with either 'y' or 'n'. Do you want to enable ChordMiddle? n You definitely want to enable the third button on your mouse, since many X clients use it. With a genuine Logitech mouse, however, you don't need to enable ChordMiddle in order to use the button. If you find that the third button does not work when you start X, you can enable ChordMiddle by editing the configuration file – it is much easier and less error-prone than re-running XF86Setup. Continuing through the setup: If your mouse has only two buttons, it is recommended that you enable Emulate3Buttons. Please answer the following question with either 'y' or 'n'. Do you want to enable Emulate3Buttons? n Now give the full device name that the mouse is connected to, for example /dev/tty00. Just pressing enter will use the default, /dev/mouse. Mouse device: /dev/ttyd1 Be very careful about this entry. You must specify the correct name for the device to which the mouse is connected. xf86config is not specific to FreeBSD, and the suggested example is just plain wrong for FreeBSD. Use the names /dev/ttyd0 through /dev/ttyd3 for serial mice, /dev/psm0 for PS/2 mice or /dev/mse0 for a bus mouse. Continuing, we see: Beginning with XFree86 3.1.2D, you can use the new X11R6.1 XKEYBOARD extension to manage the keyboard layout. If you answer 'n' to the following question, the server will use the old method, and you have to adjust your keyboard layout with xmodmap. Please answer the following question with either 'y' or 'n'. Do you want to use XKB? y The following dialogue will allow you to select from a list of already preconfigured keymaps. If you don't find a suitable keymap in the list, the program will try to combine a keymap from additional information you are asked then. Such a keymap is by default untested and may require manual tuning. Please report success or required changes for such a keymap to XFREE86@XFREE86.ORG for addition to the list of preconfigured keymaps in the future. Press enter to continue, or ctrl-c to abort. List of preconfigured keymaps: 1 Standard 101-key, US encoding 2 Microsoft Natural, US encoding 3 KeyTronic FlexPro, US encoding 4 Standard 101-key, US encoding with ISO9995-3 extensions 5 Standard 101-key, German encoding 6 Standard 101-key, French encoding 7 Standard 101-key, Thai encoding 8 Standard 101-key, Swiss/German encoding 9 Standard 101-key, Swiss/French encoding 10 None of the above Enter a number to choose the keymap. 1 Choose the standard US keyboard Now we want to set the specifications of the monitor. The two critical parameters are the vertical refresh rate, which is the rate at which the whole screen is refreshed, and most importantly the horizontal sync rate, which is the rate - at which scanlines are displayed. + at which scan-lines are displayed. The valid range for horizontal sync and vertical sync should be documented in the manual of your monitor. If in doubt, check the monitor database /usr/X11R6/lib/X11/doc/Monitors to see if your monitor is there. Press enter to continue, or ctrl-c to abort. ENTER You must indicate the horizontal sync range of your monitor. You can either select one of the predefined ranges below that correspond to industry- standard monitor types, or give a specific range. It is VERY IMPORTANT that you do not specify a monitor type with a horizontal sync range that is beyond the capabilities of your monitor. If in doubt, choose a conservative setting. hsync in kHz; monitor type with characteristic modes 1 31.5; Standard VGA, 640x480 @@ 60 Hz 2 31.5 - 35.1; Super VGA, 800x600 @@ 56 Hz 3 31.5, 35.5; 8514 Compatible, 1024x768 @@ 87 Hz interlaced (no 800x600) 4 31.5, 35.15, 35.5; Super VGA, 1024x768 @@ 87 Hz interlaced, 800x600 @@ 56 Hz 5 31.5 - 37.9; Extended Super VGA, 800x600 @@ 60 Hz, 640x480 @@ 72 Hz 6 31.5 - 48.5; Non-Interlaced SVGA, 1024x768 @@ 60 Hz, 800x600 @@ 72 Hz 7 31.5 - 57.0; High Frequency SVGA, 1024x768 @@ 70 Hz 8 31.5 - 64.3; Monitor that can do 1280x1024 @@ 60 Hz 9 31.5 - 79.0; Monitor that can do 1280x1024 @@ 74 Hz 10 31.5 - 82.0; Monitor that can do 1280x1024 @@ 76 Hz 11 Enter your own horizontal sync range Enter your choice (1-11): Unfortunately, our monitor is not mentioned in the file /usr/X11R6/lib/X11/doc/Monitors, but by chance the manual does specify the frequency range in the Technical Data section. The horizontal frequency range is from 30 to 64 kHz, and the vertical frequency range is from 50 to 100 Hz. The horizontal frequency range is almost exactly covered by choice 8, but that setting threatens to go 0.3 kHz higher in frequency than the technical data state. Do you want to risk it? Doing so will most likely not be a problem, since it is unlikely that the monitor will die at such a small deviation from the specs, and it is also unlikely that your XF86Config will actually generate a horizontal frequency between 64.0 and 64.3 kHz. However, there is no need to take even this slight risk. Just specify the real values: Enter your choice (1-11): 11 Please enter the horizontal sync range of your monitor, in the format used in the table of monitor types above. You can either specify one or more continuous ranges (e.g. 15-25, 30-50), or one or more fixed sync frequencies. Horizontal sync range: 30-64 Next, we select the vertical frequency range: You must indicate the vertical sync range of your monitor. You can either select one of the predefined ranges below that correspond to industry-standard monitor types, or give a specific range. For interlaced modes, the number that counts is the high one (e.g., 87 Hz rather than 43 Hz). 1 50-70 2 50-90 3 50-100 4 40-150 5 Enter your own vertical sync range Enter your choice: 3 exactly the range of the monitor The next step is to specify identification strings. You can think out names if you want, but unless you are juggling a lot of different hardware, you can let xf86config do it for you: You must now enter a few identification/description strings, namely an identifier, a vendor name, and a model name. Just pressing enter will fill in default names. The strings are free-form, spaces are allowed. Enter an identifier for your monitor definition: ENTER Enter the vendor name of your monitor: ENTER Enter the model name of your monitor: ENTER Next comes the choice of the video board. We have an elderly Diamond SpeedStar Plus with an ET4000 chip, and unknown Ramdac and Clock Chip. Let's see how we fare: Now we must configure video card specific settings. At this point you can choose to make a selection out of a database of video card definitions. Because there can be variation in Ramdacs and clock generators even between cards of the same model, it is not sensible to blindly copy the settings (e.g., a Device section). For this reason, after you make a selection, you will still be asked about the components of the card, with the settings from the chosen database entry presented as a strong hint. The database entries include information about the chipset, what server to run, the Ramdac and ClockChip, and comments that will be included in the Device section. However, a lot of definitions only hint about what server to run (based on the chipset the card uses) and are untested. If you can't find your card in the database, there's nothing to worry about. You should only choose a database entry that is exactly the same model as your card; choosing one that looks similar is just a bad idea (e.g. a GemStone Snail 64 may be as different from a GemStone Snail 64+ in terms of hardware as can be). Do you want to look at the card database? y 0 2 the Max MAXColor S3 Trio64V+ S3 Trio64V+ 1 928Movie S3 928 2 AGX (generic) AGX-014/15/16 3 ALG-5434(E) CL-GD5434 4 ASUS 3Dexplorer RIVA128 5 ASUS PCI-AV264CT ATI-Mach64 6 ASUS PCI-V264CT ATI-Mach64 7 ASUS Video Magic PCI V864 S3 864 8 ASUS Video Magic PCI VT64 S3 Trio64 9 AT25 Alliance AT3D 10 AT3D Alliance AT3D 11 ATI 3D Pro Turbo ATI-Mach64 12 ATI 3D Xpression ATI-Mach64 13 ATI 3D Xpression+ PC2TV ATI-Mach64 14 ATI 8514 Ultra (no VGA) ATI-Mach8 15 ATI All-in-Wonder ATI-Mach64 16 ATI Graphics Pro Turbo ATI-Mach64 17 ATI Graphics Pro Turbo 1600 ATI-Mach64 Enter a number to choose the corresponding card definition. Press enter for the next page, q to continue configuration. ENTER Dozens of board definitions come in alphabetic order. Finally we see: 108 DSV3325 S3 ViRGE 109 DSV3326 S3 Trio64V+ 110 DataExpert DSV3325 S3 ViRGE 111 DataExpert DSV3365 S3 Trio64V+ 112 Dell S3 805 S3 801/805 113 Dell onboard ET4000 ET4000 114 Diamond Edge 3D nv1 115 Diamond Multimedia Stealth 3D 2000 S3 ViRGE 116 Diamond Multimedia Stealth 3D 2000 PRO S3 ViRGE/DX 117 Diamond SpeedStar (Plus) ET4000 118 Diamond SpeedStar 24 ET4000 119 Diamond SpeedStar 24X (not fully supported) WD90C31 120 Diamond SpeedStar 64 CL-GD5434 121 Diamond SpeedStar HiColor ET4000 122 Diamond SpeedStar Pro (not SE) CL-GD5426/28 123 Diamond SpeedStar Pro 1100 CL-GD5420/2/4/6/8/9 124 Diamond SpeedStar Pro SE (CL-GD5430/5434) CL-GD5430/5434 125 Diamond SpeedStar64 Graphics 2000/2200 CL-GD5434 Enter a number to choose the corresponding card definition. Press enter for the next page, q to continue configuration. 117 Your selected card definition: Identifier: Diamond SpeedStar (Plus) Chipset: ET4000 Server: XF86_SVGA Press enter to continue, or ctrl-c to abort.ENTER Now you must determine which server to run. Refer to the man pages and other documentation. The following servers are available (they may not all be installed on your system): 1 The XF86_Mono server. This a monochrome server that should work on any VGA-compatible card, in 640x480 (more on some SVGA chipsets). 2 The XF86_VGA16 server. This is a 16-color VGA server that should work on any VGA-compatible card. 3 The XF86_SVGA server. This is a 256 color SVGA server that supports a number of SVGA chipsets. On some chipsets it is accelerated or supports higher color depths. 4 The accelerated servers. These include XF86_S3, XF86_Mach32, XF86_Mach8, XF86_8514, XF86_P9000, XF86_AGX, XF86_W32, XF86_Mach64, XF86_I128 and XF86_S3V. These four server types correspond to the four different "Screen" sections in XF86Config (vga2, vga16, svga, accel). 5 Choose the server from the card definition, XF86_SVGA. Which one of these screen types do you intend to run by default (1-5)? The system already chose XF86_SVGA for us. Do we want to change? We would need a good reason. In this case, we do not have a reason, so we will keep the server from the card definition: Which one of these screen types do you intend to run by default (1-5)? 5 The server to run is selected by changing the symbolic link 'X'. For example, the SVGA server. Please answer the following question with either 'y' or 'n'. Do you want me to set the symbolic link? y - All the programs that start X (xinit, startx, and xdm) + All the programs that start X (xinit, + startx, and xdm) start a program /usr/X11R6/bin/X. This symbolic link makes /usr/X11R6/bin/X point to your X server. If you don't have a link, you will not be able to start X. Now you must give information about your video card. This will be used for the "Device" section of your video card in XF86Config. You must indicate how much video memory you have. It is probably a good idea to use the same approximate amount as that detected by the server you intend to use. If you encounter problems that are due to the used server not supporting the amount memory you have (e.g. ATI Mach64 is limited to 1024K with the SVGA server), specify the maximum amount supported by the server. How much video memory do you have on your video card: 1 256K 2 512K 3 1024K 4 2048K 5 4096K 6 Other Enter your choice: 3 You must now enter a few identification/description strings, namely an identifier, a vendor name, and a model name. Just pressing enter will fill in default names (possibly from a card definition). Your card definition is Diamond SpeedStar (Plus). The strings are free-form, spaces are allowed. Enter an identifier for your video card definition: ENTER You can simply press enter here if you have a generic card, or want to describe your card with one string. Enter the vendor name of your video card: ENTER Enter the model (board) name of your video card: ENTER Especially for accelerated servers, Ramdac, Dacspeed and ClockChip settings or special options may be required in the Device section. The RAMDAC setting only applies to the S3, AGX, W32 servers, and some drivers in the SVGA servers. Some RAMDAC's are auto-detected by the server. The detection of a RAMDAC is forced by using a Ramdac "identifier" line in the Device section. The identifiers are shown at the right of the following table of RAMDAC types: 1 AT&T 20C490 (S3 and AGX servers, ARK driver) att20c490 2 AT&T 20C498/21C498/22C498 (S3, autodetected) att20c498 3 AT&T 20C409/20C499 (S3, autodetected) att20c409 4 AT&T 20C505 (S3) att20c505 5 BrookTree BT481 (AGX) bt481 6 BrookTree BT482 (AGX) bt482 7 BrookTree BT485/9485 (S3) bt485 8 Sierra SC15025 (S3, AGX) sc15025 9 S3 GenDAC (86C708) (autodetected) s3gendac 10 S3 SDAC (86C716) (autodetected) s3_sdac 11 STG-1700 (S3, autodetected) stg1700 12 STG-1703 (S3, autodetected) stg1703 Enter a number to choose the corresponding RAMDAC. Press enter for the next page, q to quit without selection of a RAMDAC. q We don't need this A Clockchip line in the Device section forces the detection of a programmable clock device. With a clockchip enabled, any required clock can be programmed without requiring probing of clocks or a Clocks line. Most cards don't have a programmable clock chip. Choose from the following list: 1 Chrontel 8391 ch8391 2 ICD2061A and compatibles (ICS9161A, DCS2824) icd2061a 3 ICS2595 ics2595 4 ICS5342 (similar to SDAC, but not completely compatible) ics5342 5 ICS5341 ics5341 6 S3 GenDAC (86C708) and ICS5300 (autodetected) s3gendac 7 S3 SDAC (86C716) s3_sdac 8 STG 1703 (autodetected) stg1703 9 Sierra SC11412 sc11412 10 TI 3025 (autodetected) ti3025 11 TI 3026 (autodetected) ti3026 12 IBM RGB 51x/52x (autodetected) ibm_rgb5xx Just press enter if you don't want a Clockchip setting. What Clockchip setting do you want (1-12)? ENTER For most configurations, a Clocks line is useful since it prevents the slow and nasty sounding clock probing at server start-up. Probed clocks are displayed at server startup, along with other server and hardware configuration info. You can save this information in a file by running imprecise; some clocks may be slightly too high (varies per run). At this point I can run X -probeonly, and try to extract the clock information from the output. It is recommended that you do this yourself and add a clocks line (note that the list of clocks may be split over multiple Clocks lines) to your Device section afterwards. Be aware that a clocks line is not appropriate for drivers that have a fixed set of clocks and don't probe by default (e.g. Cirrus). Also, for the P9000 server you must simply specify clocks line that matches the modes you want to use. For the S3 server with a programmable clock chip you need a 'ClockChip' line and no Clocks line. You must be root to be able to run X -probeonly now. Do you want me to run 'X -probeonly' now? This last question is worth thinking about. You should run X -probeonly at some point, but it requires some extra work. We'll take the recommendation and try it later. Do you want me to run 'X -probeonly' now? n For each depth, a list of modes (resolutions) is defined. The default resolution that the server will start-up with will be the first listed mode that can be supported by the monitor and card. Currently it is set to: "640x480" "800x600" "1024x768" for 8bpp "640x480" "800x600" for 16bpp "640x480" for 24bpp "640x400" for 32bpp Note that 16, 24 and 32bpp are only supported on a few configurations. Modes that cannot be supported due to monitor or clock constraints will be automatically skipped by the server. 1 Change the modes for 8pp (256 colors) 2 Change the modes for 16bpp (32K/64K colors) 3 Change the modes for 24bpp (24-bit color, packed pixel) 4 Change the modes for 32bpp (24-bit color) 5 The modes are OK, continue. Enter your choice: 5 accept the defaults You can have a virtual screen (desktop), which is screen area that is larger than the physical screen and which is panned by moving the mouse to the edge of the screen. If you don't want virtual desktop at a certain resolution, you cannot have modes listed that are larger. Each color depth can have a differently-sized virtual screen Please answer the following question with either 'y' or 'n'. Do you want a virtual screen that is larger than the physical screen? n It is difficult to decide whether you want a virtual screen larger than the physical screen. I find it extremely disturbing, so I suggest you answer n. You might find it useful, especially if your highest resolution is small. Now the configuration is complete, and sysinstall just need to write the configuration file: I am going to write the XF86Config file now. Make sure you don't accidently overwrite a previously configured one. Shall I write it to /etc/XF86Config? y File has been written. Take a look at it before running 'startx'. Note that the XF86Config file must be in one of the directories searched by the server (e.g. /usr/X11R6/lib/X11) in order to be used. Within the server press ctrl, alt and '+' simultaneously to cycle video resolutions. Pressing ctrl, alt and backspace simultaneously immediately exits the server (use if the monitor doesn't sync for a particular mode). For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config. Once you have completed this configuration, you are ready to start X. XFree86 4.X Configuration Contributed by &a.cshumway;, July 2001. Introduction This chapter will introduce the steps necessary to install - and configure the XFree86 X Windows System under FreeBSD. + and configure the XFree86 + X Windows System under FreeBSD. Once the server is installed and configured properly. The user can read to setup their desktop environment. XFree86 4.X XFree86 Before You Start - Before the user is to start configuration of XFree86-4, - the the following information will need to be known about the - target system: + Before the user is to start configuration of + XFree86-4, the the following + information will need to be known about the target + system: Monitor specifications Video Adapter chipset Video Adapter memory horizontal scan rate vertical scan rate The specifications for the target system's monitor are - used by XFree86 to determine the resolution and refresh rate - to run at. These specifications can usually be obtained from - the documentation that came with the target system's monitor - or from the manufacturer's website. There are two ranges of - numbers that are needed, the horizontal scan rate and the - vertical synchronization rate. + used by XFree86 to determine the + resolution and refresh rate to run at. These specifications can + usually be obtained from the documentation that came with the + target system's monitor or from the manufacturer's website. + There are two ranges of numbers that are needed, the horizontal + scan rate and the vertical synchronization rate. The video adapter's chipset defines what driver module - XFree86 uses to talk to the graphics hardware. With most - chipsets, this can be automatically determined, but it is still - useful to know in case the automatic detection doesn't work - correctly. + XFree86 uses to talk to the graphics + hardware. With most chipsets, this can be automatically + determined, but it is still useful to know in case the automatic + detection doesn't work correctly. Video memory on the graphic adapter determines the resolution and color depth the target system can run at. This is important to know so the user knows the limitations of the target system. Installing XFree86 4.X software - XFree86 4 can be installed using the FreeBSD ports system - or using &man.pkg.add.1;. If the user is building XFree86-4 - from source and has USA_RESIDENT set in + XFree86 4 can be installed + using the FreeBSD ports system or using &man.pkg.add.1;. If the + user is building XFree86-4 from + source and has USA_RESIDENT set in /etc/make.conf, the user may first have to fetch Wraphelp.c if XDM-AUTHORIZATION-1 support is desired. This file is to be placed in the port's - files/ sub-directory before the port is + files/ sub-directory before the port is built. Configuring XFree86 4.X - Configuration of XFree86 4.1 is a several step process. - The first step is to build an initial configuration file with - the configure option to XFree86. As the super user, simply run: + Configuration of XFree86 4.X is + a several step process. The first step is to build an initial + configuration file with the configure option to + XFree86. As the super user, simply + run: &prompt.root; XFree86 -configure - This will generate a skeleton XFree86 configuration file - in the current working directory called - XF86Config.new. The XFree86 program will - attempt to probe the graphics hardware on the system and will - write a configuration file to load the proper drivers for the - detected hardware on the target system. + This will generate a skeleton + XFree86 configuration file in the + current working directory called + XF86Config.new. The + XFree86 program will attempt to probe + the graphics hardware on the system and will write a + configuration file to load the proper drivers for the detected + hardware on the target system. The next step is to test the currently existing - configuration to verify that XFree86 can work with the graphics + configuration to verify that XFree86 + can work with the graphics hardware on the target system. To preform this task, the user needs to run: &prompt.root; XFree86 -xf86config XF86Config.new If the user is presented with a black and grey grid and an X mouse cursor, then the configuration was successful. To exit the test, just press ctrl, alt and backspace simultaneously. XFree86 4 Tuning Next, the user needs to tune the XF86Config.new configuration file to their personal taste. Open up the file in a text editor such as &man.emacs.1; or &man.ee.1;. The first thing the user will want to do is add the frequencies for the target system's monitor. These are usually expressed as a horizontal and vertical synchronization rate. These values are added to the XF86Config.new file under the "Monitor" section as such: Section "Monitor" Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Monitor Model" Horizsync 30-107 VertRefresh 48-120 EndSection The Horizsync and VertRefresh keywords may not exist in the user's configuration file. If they do not, they need to be added, with the correct horizontal synchronization rate placed after the Horizsync keyword and the vertical synchronization rate after the VertRefresh keyword. In the example above the target monitor's rates where entered. XF86Config While the XF86Config.new configuration file is still open in an editor, next the user needs to select what the default resolution and color depth is desired. This is defined in the Screen section. Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" DefaultColorDepth 24 SubSection "Display" Depth 24 Modes "1024x768" EndSubSection EndSection The DefaultColorDepth keyword describes the color depth the user wishes to run at by default. This can be overridden with the -bpp command line switch to XFree86 1. The Modes keyword describes the resolution the user wishes to run at for the given color depth. In the example above, the default color depth is twenty four bits per pixel. At this color depth, the accepted resolution is one thousand twenty four pixels by seven hundred and sixty eight pixels. If a user wants to run at a resolution of one thousand twenty four pixels by seven hundred sixty eight pixels at twenty four bits per pixel, then the user needs to add the DefaultColorDepth keyword with the value of twenty four, and add to the "Display" subsection with the desired Depth the Modes keyword with the resolution the user wishes to run at. Note that only VESA standard modes are supported as defined by the target system's graphics hardware. Finally, the user can write out the configuration file and test it using the test mode given above. If all is well, then the configuration file needs to be installed in a common location where XFree86 1 can source it in the future. This is typically /etc/X11/XF86Config or /usr/X11R6/etc/X11/XF86Config. &prompt.root; cp XF86Config.new /etc/X11/XF86Config Once the configuration file has been placed in a common - location, XFree86 can then be used through &man.xdm.1;. In + location, XFree86 can then be used through &man.xdm.1;. In order to use startx 1 the user will have to install the X11/wrapper port. Advanced Configuration Topics Configuration with Intel i810 graphics chipsets Intel i810 graphic chipset Configuration with Intel i810 integrated chipsets - requires the agpgart AGP programming interface for XFree86 to - be able to drive the card. To enable the agpgart programming + requires the agpgart AGP programming interface for + XFree86 to be able to drive the + card. To enable the agpgart programming interface, the agp.ko kernel loadable module needs to be loaded into the kernel with &man.kldload.8;. This can be done automatically with the &man.loader.8;. Simply add this line to /boot/loader.conf to have the loader load - agp.ko at boot time: + agp.ko at boot time: agp_load="YES" Next, a device node needs to be created for the - programming interface. To create the agp device node, run + programming interface. To create the AGP device node, run &man.MAKEDEV.8; in the /dev directory as such: &prompt.root; cd /dev &prompt.root; sh MAKEDEV agpgart This will allow the user to configure the graphics hardware as any other graphics board. Using Fonts in XFree86 Type1 Fonts The default fonts that ship with XFree86 are less than ideal for typical desktop publishing applications. Large presentation fonts show up jagged and unprofessional looking and small fonts in Netscape are almost completely unintelligible. However, there are several free, high quality Type1 (PostScript) fonts available which can be readily used with XFree86, either version 3.X or version 4.X. For instance, the URW font collection (/usr/ports/x11-fonts/urwfonts) includes high quality versions of standard type1 fonts (Times Roman, Helvetica, Palatino and others). The Freefont collection (/usr/ports/x11-fonts/freefont) includes many more fonts, but most of them are intended for use in graphics software such as the Gimp, and are not complete enough to serve as screen fonts. In addition, XFree86 can be configured to use TrueType fonts with a minimum of effort: see the section on TrueType fonts later. To install the above Type1 font collections from the ports collection you can run the following commands. &prompt.root; cd /usr/ports/x11-fonts/urwfonts &prompt.root; make install clean And likewise with the freefont or other collections. To tell the X server that these fonts exist, you can add an appropriate line to your XF86Config file (in /etc/ for XFree86 version 3, or in /etc/X11/ for version 4), which reads: FontPath "/usr/X11R6/lib/X11/fonts/URW/" Alternatively, at the command line in your X session you can write: &prompt.user; xset fp+ /usr/X11R6/lib/X11/fonts/URW &prompt.user; xset fp rehash This will work but will be lost when you log out from this session, unless you add it to your startup file - (~/.xinitrc for a normal startx session, + (~/.xinitrc for a normal + startx session, or ~/.xsession when logging in through a graphical login manager like XDM). A third way is to use the new - XftConfig file: see the + XftConfig file: see the section on anti-aliasing, later. TrueType Fonts XFree86 4.0 has built in support for rendering TrueType fonts. There are two different modules that can enable this functionality. The "freetype" module is used in this example because it is more consistent with the other font - rendering backends. To enable the freetype module just add the + rendering back-ends. To enable the freetype module just add the following line to the module section of your /etc/X11/XF86Config file. Load "freetype" For XFree86 3.3.X you will need to run a separate TrueType font server. Xfstt is commonly used for this purpose. To install Xfstt on your FreeBSD system simply install the port from /usr/ports/x11-servers/Xfstt You should now make a directory for your TrueType fonts (e.g. /usr/X11R6/lib/X11/fonts/TrueType) and copy all of your TrueType fonts into this directory. Keep in mind that you cannot take TrueType fonts directly from a Macintosh; they must be in Unix/DOS/Windows format for use by XFree86. Once you have copied the files into this directory you need to use ttmkfdir to create a fonts.dir file so that the X font renderer knows that you've installed these new files. There is a FreeBSD port for ttmkfdir in /usr/ports/x11-fonts/ttmkfdir. &prompt.root; cd /usr/X11R6/lib/X11/fonts/TrueType &prompt.root; ttmkfdir > fonts.dir Now you need to add your TrueType directory to your fonts path. This is just the same as described above for Type1 fonts, that is, use &prompt.user; xset fp+ /usr/X11R6/lib/X11/fonts/TrueType &prompt.user; xset fp rehash - or add a FontPath line to the XF86Config file. - - That's it. Now Netscape, Gimp, StarOffice, and all of your - other X applications should now recognize your installed - TrueType fonts. Extremely small fonts (as with text in a high - resolution display on a web page) and extremely large fonts - (within StarOffice) will look much better now. + or add a line to the + XF86Config file. + + That's it. Now Netscape, + Gimp, + StarOffice, and all of your other X + applications should now recognize your installed TrueType + fonts. Extremely small fonts (as with text in a high resolution + display on a web page) and extremely large fonts (within + StarOffice) will look much better + now. Anti-Aliasing your fonts - Starting with version 4.0.2, XFree86 supports anti-aliased + Starting with version 4.0.2, XFree86 + supports anti-aliased fonts. Currently, most software has not been updated to take advantage of this new functionality. However, Qt (the toolkit - for the KDE desktop) does; so if you are running XFree86 4.0.2 - (or higher), Qt 2.3 (or higher) and KDE, all your KDE/Qt - applications can be made to use anti-aliased fonts. + for the KDE desktop) does; so if you + are running XFree86 4.0.2 + (or higher), Qt 2.3 (or higher) and KDE, + all your KDE/Qt applications can be made to use anti-aliased + fonts. To configure anti-aliasing, you need to create (or edit, if it already exists) the file /usr/X11R6/lib/X11/XftConfig. Several advanced things can be done with this file; this section describes only the simplest possibilities. First, you need to tell the X server about the fonts which you want anti-aliased. To do that, for each font directory you have a line, which looks like this: dir "/usr/X11R6/lib/X11/Type1" And likewise for the other font directories (URW, truetype, etc) containing fonts you'd like anti-aliased. Anti-aliasing makes sense only for scalable fonts (basically, Type1 and TrueType) so don't include bitmap font directories here. The directories which you included here can now be commented out of your XF86Config file. Next, you may not want to anti-alias normal-sized text. (Antialiasing makes borders slightly fuzzy, which makes very small text more readable and removes "staircases" from large text, but can cause eyestrain if applied to normal text.) To exclude point sizes between 9 and 13 from anti-aliasing, include these lines: match any size > 8 any size < 14 edit antialias = false; You may also find that the spacing for some monospaced fonts gets messed up when you turn on anti-aliasing. This seems to - be an issue with KDE, in particular. One possible fix for this + be an issue with KDE, in particular. + One possible fix for this is to force the spacing for such fonts to be 100: add the following lines: match any family == "fixed" edit family =+ "mono"; match any family == "console" edit family =+ "mono"; (this aliases the other common names for fixed fonts as "mono"), and then add: match any family == "mono" edit spacing = 100; - Supposing you want to use the Lucidux fonts whenever monospaced - fonts are required (these look nice, and don't seem to suffer - from the spacing problem), you could replace that last line - with these: + Supposing you want to use the + Lucidux fonts whenever + monospaced fonts are required (these look nice, and don't seem + to suffer from the spacing problem), you could replace that last + line with these: match any family == "mono" edit family += "LuciduxMono"; match any family == "Lucidux Mono" edit family += "LuciduxMono"; match any family == "LuciduxMono" edit family =+ "Lucidux Mono"; (the last lines alias different equivalent family names). Finally, you want to allow users to add commands to this file, via their personal .xftconfig files. To do this, add a last line: includeif "~/.xftconfig" That's all; anti-aliasing should be enabled the next time you start the X server. However, note that your programs must know how to take advantage of it. At the present time, the toolkit - Qt does, so the entire KDE environment can use anti-aliased fonts - (see on KDE for + Qt does, so the entire KDE environment + can use anti-aliased fonts + (see on + KDE for details); there are patches for gtk+ to do the same, so if compiled against such a patched gtk+, the GNOME environment and Mozilla can also use anti-aliased fonts. - Anti-aliasing is still new to FreeBSD and XFree86; + Anti-aliasing is still new to FreeBSD and + XFree86; configuring it should get easier with time, and it will soon be supported by many more applications. The X Display Manager Overview - The X Display Manager (XDM) is an optional part of the X - Window System that is used for login session management. This is - useful for several types of situations, including minimal - X Terminals (see + The X Display Manager (XDM) is + an optional part of the X Window System that is used for login + session management. This is useful for several types of + situations, including minimal X Terminals (see ), desktops, and large network display servers. Since the X Window System is network and protocol independent, there are a wide variety of possible configurations for running X clients and servers on different machines - connected by a network. XDM provides a graphical interface for - choosing which display server to connect to, and entering - authorization information such as a login and password - combination. - - You may think of XDM as providing the same functionality to - the user as the &man.getty.8; utility (see for details). That is, it performs system - logins to the display being connected to and then runs a session - manager on behalf of the user (usually an X window manager). XDM - then waits for this program to exit, signaling that the user is - done and should be logged out of the display. At this point, XDM - can display the login and display chooser screens for the next - user to login. + connected by a network. XDM provides + a graphical interface for choosing which display server to + connect to, and entering authorization information such as a + login and password combination. + + You may think of XDM as + providing the same functionality to the user as the + &man.getty.8; utility (see for + details). That is, it performs system logins to the display + being connected to and then runs a session manager on behalf of + the user (usually an X window + manager). XDM then waits for this + program to exit, signaling that the user is done and should be + logged out of the display. At this point, + XDM can display the login and display + chooser screens for the next user to login. Using XDM - The XDM daemon program is located in - /usr/X11R6/bin/xdm. You can run this - program at any time as root and it will start managing the X - display on the local machine. If you want XDM to run in the - background every time the machine boots up, a convenient way to - do this is by adding an entry to /etc/ttys. - For more information about the format and usage of this file, - see . There is a line in the - default /etc/ttys file for running the xdm - daemon on a virtual terminal: + + The XDM daemon program is + located in /usr/X11R6/bin/xdm. You can run + this program at any time as root and it will start managing the + X display on the local machine. If you want + XDM to run in the background every + time the machine boots up, a convenient way to do this is by + adding an entry to /etc/ttys. For more + information about the format and usage of this file, see . There is a line in the default + /etc/ttys file for running the + XDM daemon on a virtual terminal: ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure By default this entry is disabled, and in order to enable it you will need to change field 5 from off to on and then restart &man.init.8; using the directions in . The first field, the name of the terminal this program will manage, is - ttyv8. This means that XDM will start running - on the 9th virtual terminal. + ttyv8. This means that XDM + will start running on the 9th virtual terminal. Configuring XDM - The XDM configuration directory is located in - /usr/X11R6/lib/X11/xdm. In this directory - you will see several files used to change the behavior and - appearance of XDM. Typically you will find these files: + + The XDM configuration directory + is located in /usr/X11R6/lib/X11/xdm. In + this directory you will see several files used to change the + behavior and appearance of + XDM. Typically you will find these + files: File Description Xaccess Client authorization ruleset. Xresources Default X resource values. Xservers List of remote and local displays to manage. Xsession Default session script for logins. Xsetup_* xdm-config Global configuration for all displays running on this machine. xdm-errors Errors generated by the server program. xdm-pid The process ID of the currently running XDM. Also in this directory are a few scripts and programs used - to setup the desktop when XDM is running. In the next few - sections I will briefly describe the purpose of each of these - files. The exact syntax and usage of all of these files is - described in &man.xdm.1; + to setup the desktop when XDM is + running. In the next few sections I will briefly describe the + purpose of each of these files. The exact syntax and usage of + all of these files is described in &man.xdm.1; The default configuration is a simple rectangular login window with the hostname of the machine displayed at the top in a large font and Login: and Password: prompts below. This is a good starting point if you are planning to design your own look and feel for - the XDM screens. + the XDM screens. Xaccess - The protocol for connecting to XDM controlled displays is - called the X Display Manager Connection Protocol (XDMCP). This - file is basically just a ruleset for controlling XDMCP - connections from remote machines. By default, it allows any - client to connect, but you will see this will not matter - because the default xdm-config file does not listen for remote - connections. + + The protocol for connecting to + XDM controlled displays is called + the X Display Manager Connection Protocol (XDMCP). This file + is basically just a ruleset for controlling XDMCP connections + from remote machines. By default, it allows any client to + connect, but you will see this will not matter because the + default xdm-config file does not listen + for remote connections. Xresources This is an application-defaults file for the display chooser and the login screens. This is where you can customize the appearance of the login program. The format is identical - to the app-defaults file described in the XFree86 + to the app-defaults file described in the XFree86 documentation. Xservers This is a list of the remote displays the chooser should provide as choices. Xsession - This is the default session script for XDM to run after a - user has logged in. Normally each user will have a customized - session script in ~/.xsessionrc that - overrides this script. + This is the default session script for + XDM to run after a user has logged + in. Normally each user will have a customized session script + in ~/.xsessionrc that overrides this + script. Xsetup_* These files contain scripts that will be run automatically before displaying the chooser or login interfaces. There is a script for each display being used, named Xsetup_followed by the local display number (for instance Xsetup_0). Typically these scripts will run one or two programs in the background such as xconsole. xdm-config This file contains settings in the form of app-defaults that are applicable to every display that this installation manages. xdm-errors - This file contains the output of the X servers that XDM is - trying to run. If a display that XDM is trying to start hangs + This file contains the output of the X servers that + XDM is trying to run. If a display + that XDM is trying to start hangs for some reason, this is a good place to look for error messages. These messages are also written to the user's - ~/.xsession-errors file on a per-session basis + ~/.xsession-errors file on a per-session + basis Running A Network Display Server In order for other clients to connect to your display server, you will need to edit the access control rules, and enable the connection listener. By default these are set to conservative values, which is a good decision security-wise. To - get XDM to listen for connections first comment out a line in - the xdm-config file: + get XDM to listen for connections + first comment out a line in the xdm-config + file: ! SECURITY: do not listen for XDMCP or Chooser requests ! Comment out this line if you want to manage X terminals with xdm DisplayManager.requestPort: 0 - and then restart XDM. Remember that comments in app-defaults - files begin with a ! character, not a - #. After this, you may need to put more strict - access controls in place. Look at the example entries in - Xaccess file, and refer to the &man.xdm.1; - manual page. + and then restart XDM. Remember that + comments in app-defaults files begin with a ! + character, not a #. After this, you may need to + put more strict access controls in place. Look at the example + entries in Xaccess file, and refer to the + &man.xdm.1; manual page. Replacements for XDM - Several replacements for the default XDM program exist. - One of them, KDM (bundled with KDE) is described in a later - section. Apart from - various visual improvements and cosmetic frills, it can be - easily configured to let users choose their window manager of - choice at the time they log in. + Several replacements for the default + XDM program exist. One of them, + KDM (bundled with + KDE) is described in a later section. Apart from various + visual improvements and cosmetic frills, it can be easily + configured to let users choose their window manager of choice + at the time they log in. Desktop Environments Written by &a.logo;, June 2001 This section describes the different desktop environments available for X-Windows on FreeBSD. For our purposes a "desktop environment" will mean anything ranging from a simple window - manager, to a complete suite of desktop applications such as KDE - or GNOME. + manager, to a complete suite of desktop applications such as + KDE or GNOME. + GNOME About GNOME - GNOME is a user-friendly desktop environment that - enables users to easily use and configure their computers. - GNOME includes a panel (for starting applications and displaying - status), a desktop (where data and applications can be placed), - a set of standard desktop tools and applications, and a set of - conventions that make it easy for applications to cooperate and - be consistent with each other. Users of other operating systems - or environments should feel right at home using the powerful - graphics-driven environment that GNOME provides. + GNOME is a user-friendly + desktop environment that enables users to easily use and + configure their computers. GNOME + includes a panel (for starting applications and displaying + status), a desktop (where data and applications can be + placed), a set of standard desktop tools and applications, and + a set of conventions that make it easy for applications to + cooperate and be consistent with each other. Users of other + operating systems or environments should feel right at home + using the powerful graphics-driven environment that + GNOME provides. Installing GNOME - To install GNOME from the network, simply type: + To install GNOME from the network, + simply type: &prompt.root; pkg_add -r gnome - If you would rather build GNOME from source, then use - the ports tree: + If you would rather build + GNOME from source, then use the + ports tree: &prompt.root; cd /usr/ports/x11/gnome &prompt.root; make install clean - Once GNOME is installed, we must have the X server start - GNOME instead of a default window mananger. If you have - already customized your .xinitrc file - then you should simply replace the line that starts your - current window manager with one that starts - /usr/X11R6/bin/gnome-wm instead. If - you haven't added anything special to your configuration - file, then it is enough to simply type: + Once GNOME is installed, we + must have the X server start GNOME + instead of a default window manager. If you have already + customized your .xinitrc file then you + should simply replace the line that starts your current window + manager with one that starts + /usr/X11R6/bin/gnome-wm instead. If you + haven't added anything special to your configuration file, + then it is enough to simply type: &prompt.root; echo "/usr/X11R6/bin/gnome-wm" > ~/.xinitrc - That's it. Type 'startx' and you will be in the - GNOME desktop environment. - Note: if you're running a display manager like xdm, - this will not work. Instead, you should create an - executable .xsession file with the same - command in it. To do this, edit your file (if you already - have one) and replace the existing wm command with - /usr/X11R6/bin/gnome-wm; or - else, + That's it. Type startx and you will be in the + GNOME desktop environment. + + If you're running a display manager like + XDM, this will not work. Instead, + you should create an executable .xsession + file with the same command in it. To do this, edit your file + (if you already have one) and replace the existing + window manager command with + /usr/X11R6/bin/gnome-wm; or else, &prompt.root; echo "#!/bin/sh" > ~/.xsession &prompt.root; echo "/usr/X11R6/bin/gnome-wm" >> ~/.xsession &prompt.root; chmod +x ~/.xsession Another option is to configure your display manager to allow choosing the window manager at login time; the section on KDE2 details explains how to do this for kdm, the - display manager of KDE. + display manager of KDE. KDE2 About KDE2 - KDE is an easy to use contemporary desktop environment. - Some of the things that KDE brings to the user are: + KDE is an easy to use + contemporary desktop environment. Some of the things that + KDE brings to the user are: + A beautiful contemporary desktop A desktop exhibiting complete network transparency An integrated help system allowing for convenient, - consistent access to help on the use of the KDE desktop and its - applications - Consistent look and feel of all KDE applications + consistent access to help on the use of the + KDE desktop and its + applications + Consistent look and feel of all + KDE applications Standardized menu and toolbars, keybindings, color-schemes, etc. - Internationalization: KDE is available in more than 40 languages + Internationalization: KDE + is available in more than 40 languages Centralized consisted dialog driven desktop configuration - A great number of useful KDE applications + A great number of useful + KDE applications - KDE has an office application suite based on KDE's - KParts technology consisting of a spread-sheet, a - presentation application, an organizer, a news client and - more. KDE is also comes with a web browser called Konqeuror, - which represents already a solid competitor to other - existing web browsers on Unix systems. More information on - KDE can be found on the KDE + KDE has an office application + suite based on KDE's + KParts technology consisting + of a spread-sheet, a presentation application, an organizer, a + news client and more. KDE is also + comes with a web browser called + Konqeuror, which represents already + a solid competitor to other existing web browsers on Unix + systems. More information on KDE + can be found on the KDE website + Installing KDE2 At the time of writing, a package for kde2 doesn't exist yet. No problem! The ports tree hides all the complexity of building a package from source. To install - KDE2, do this : + KDE2, do this : &prompt.root; cd /usr/ports/x11/kde2 &prompt.root; make install clean This command will fetch all the necessary files from the - Internet, configure and compile KDE2, install the - applications, and then clean up after itself. + Internet, configure and compile KDE2, + install the applications, and then clean up after itself. Now you're going to have to tell the X server to launch - KDE2 instead of a default window manager. Do this by typing - this: + KDE2 instead of a default window manager. + Do this by typing this: &prompt.root; echo "/usr/X11R6/bin/startkde" > ~/.xinitrc - Now, whenever you go into X-Windows, KDE2 will be your + Now, whenever you go into X-Windows, + KDE2 will be your desktop. (Note: this will not work if you're logging in via a display manager like xdm. In that case you have two options: create an .xsession file as described in the section on GNOME, but with the /usr/X11R6/bin/startkde command instead of the gnome-wm command; or, configure your display manager to allow choosing a desktop at login time. Below it is explained how - to do this for kdm, KDE's display - manager.) + to do this for kdm, + KDE's display manager.) More details on KDE2 - Now that KDE2 is installed on your system, you'll find - that you can learn a lot from its help pages, or just by - pointing and clicking at various menus. Windows or Mac - users will feel quite at home. - - The best reference for KDE is the on-line documentation. - KDE comes with its own web browser, Konqueror, dozens of - useful applications, and extensive documentation. This - section only discusses somewhat technical things which are - difficult to learn just by random exploration. + Now that KDE2 is installed on + your system, you'll find that you can learn a lot from its + help pages, or just by pointing and clicking at various menus. + Windows or Mac users will feel quite at home. + + The best reference for KDE is + the on-line documentation. KDE + comes with its own web browser, + Konqueror, dozens of useful + applications, and extensive documentation. This section only + discusses somewhat technical things which are difficult to + learn just by random exploration. The KDE display manager If you're an administrator on a multi-user system, you - may like to have a graphical login screen to welcome users. - You can use xdm, as - described earlier. However, KDE includes an alternative, - kdm, which is designed to look more attractive and include - more login-time options. In particular, users can easily - choose (via a menu) which desktop environment (KDE2, GNOME, - or something else) to run after logging on. If you're slightly - adventurous and you want this added flexibility and visual - appeal, read on. - - To begin with, run the KDE2 control panel, - kcontrol, as root. Note: it is - generally considered unsafe to run your entire X environment - as root. Instead, run your window manager as a normal user, - open a terminal window (such as xterm - or KDE's konsole, become root with - su (you need to be in the "wheel" + may like to have a graphical login screen to welcome users. + You can use xdm, as described + earlier. However, KDE includes an + alternative, KDM, which is designed + to look more attractive and include more login-time options. + In particular, users can easily choose (via a menu) which + desktop environment (KDE2, + GNOME, or something else) to run + after logging on. If you're slightly adventurous and you want + this added flexibility and visual appeal, read on. + + To begin with, run the KDE2 + control panel, kcontrol, as + root. Note: it is generally considered + unsafe to run your entire X environment as + root. Instead, run your window manager + as a normal user, open a terminal window (such as + xterm or KDE's + konsole, become root + with su (you need to be in the + wheel group in /etc/group for this), and then type kcontrol. Click on the icon on the left marked "System", then on - "Login manager". On the right you'll see various - configurable options, which the KDE manual will explain in - greater detail. Click on "sessions" on the right. - Depending on what window managers or desktop environments - you have currently installed, you can type their names in - "New type" and add them. (These are just labels so far, not - commands, so you can write "KDE" and "GNOME" rather than - "startkde" or "gnome-wm".) Include a label - "failsafe". + "Login manager". On the right you'll see various configurable + options, which the KDE manual will + explain in greater detail. Click on "sessions" on the right. + Depending on what window managers or desktop environments you + have currently installed, you can type their names in "New + type" and add them. (These are just labels so far, not + commands, so you can write KDE and + GNOME rather than + startkde or gnome-wm.) + Include a label failsafe. Play with the other menus as you like (those are mainly cosmetic and self-explanatory). When you're done, click on "Apply" at the bottom, and quit the control center. - To make sure kdm understands what your above labels - (KDE, GNOME etc) mean, you need to edit some more files: the - same ones used by xdm. In your - terminal window, as root, edit the file - /usr/X11R6/lib/X11/xdm/Xsession. You - will come across a section in the middle looking like this - (by default): + To make sure kdm understands + what your above labels (KDE, + GNOME etc) mean, you need to edit + some more files: the same ones used by xdm. In your terminal window, as root, + edit the file + /usr/X11R6/lib/X11/xdm/Xsession. You + will come across a section in the middle looking like this (by + default): + case $# in 1) case $1 in failsafe) exec xterm -geometry 80x24-0-0 ;; esac esac You will need to add a few lines to this section. Assuming the labels you gave earlier were KDE2 and GNOME, the following will do: case $# in 1) case $1 in KDE2) exec /usr/X11R6/bin/startkde ;; GNOME) exec /usr/X11R6/bin/gnome-wm ;; failsafe) exec xterm -geometry 80x24-0-0 ;; esac esac - To make sure your KDE choice of a login-time desktop - background is also honored, you will need to add the - following line to - /usr/X11R6/lib/X11/xdm/Xsetup_0: + To make sure your KDE choice + of a login-time desktop background is also honored, you will + need to add the following line to + /usr/X11R6/lib/X11/xdm/Xsetup_0: /usr/X11R6/bin/kdmdesktop - - Now, you need only to make sure kdm is started at the - next bootup. To learn how to do this, read the section on - xdm, and do the same thing - replacing references to the xdm program - by kdm. + + Now, you need only to make sure + kdm is started at the next bootup. + To learn how to do this, read the section on xdm, and do the same thing replacing + references to the xdm program by + kdm. That's it. Your next login screen should have a pretty face and lots of menus. Anti-aliased fonts Tired of blocky staircase edges to your fonts under X11? Tired of unreadable text in web browsers? Well, no more. - Starting with version 4.0.2, XFree86 supports - anti-aliasing via its "RENDER" extension, and starting with - version 2.3, Qt (the toolkit used by KDE) supports this - extension. Configuring this is described in on antialiasing X11 fonts. - So if you're running up-to-date software, - anti-aliasing is possible on your KDE2 desktop. Just go to - your KDE2 menu, go to Preferences -> Look and Feel -> Style, - and click on the checkbox "Use Anti-Aliasing for Fonts and - Icons". That's all. If you're running a Qt application - which is not part of KDE, you may need to set the - environment variable QT_XFT to true before starting your - program. + Starting with version 4.0.2, + XFree86 supports anti-aliasing via + its "RENDER" extension, and starting with version 2.3, Qt (the + toolkit used by KDE) supports this + extension. Configuring this is described in on antialiasing X11 fonts. So if you're + running up-to-date software, anti-aliasing is possible on your + KDE2 desktop. Just go to your KDE2 + menu, go to Preferences -> Look and Feel -> Style, and click + on the checkbox "Use Anti-Aliasing for Fonts and Icons". + That's all. If you're running a Qt application which is not + part of KDE, you may need to set + the environment variable QT_XFT to true before starting your + program. XFCE About XFCE - XFCE is based on the gtk+ toolkit used by GNOME, but is - much more lightweight and meant for those who want a simple, - efficient desktop which is nevertheless easy to use and - configure. Visually, it looks very much like CDE, found on - commercial Unix systems. - Some of XFCE's features are: + + XFCE is based on the gtk+ + toolkit used by GNOME, but is much + more lightweight and meant for those who want a simple, + efficient desktop which is nevertheless easy to use and + configure. Visually, it looks very much like + CDE, found on commercial Unix + systems. Some of XFCE's features + are: A simple, easy-to-handle desktop Fully configurable via mouse, with drag and drop, etc - Main panel similar to CDE, with menus, applets and + Main panel similar to CDE, with menus, applets and app launchers Integrated window manager, file manager, - sound manager, GNOME compliance module, and other things - Themable (since it uses gtk+) + sound manager, GNOME compliance module, and other things + Themeable (since it uses gtk+) Fast, light and efficient: ideal for - older/slower machines or machiens with memory limitations + older/slower machines or machines with memory limitations - More information on - XFCE can be found on the XFCE - website. + More information on XFCE + can be found on the XFCE + website. Installing XFCE - A binary package for xfce exists (at the time of - writing). To install, simply do this: + A binary package for xfce + exists (at the time of writing). To install, simply do + this: &prompt.root; pkg_add -r xfce Alternatively, you may prefer to build from source. The ports tree comes to the rescue again: &prompt.root; cd /usr/ports/x11-wm/xfce &prompt.root; make install clean All necessary source packages (including dependencies) will be automagically fetched, built and installed, and the build areas cleaned up afterwards. Now you want to tell the X server to launch - XFCE the next time you start X. Simply type - this: + XFCE the next time you start + X. Simply type this: &prompt.root; echo "/usr/X11R6/bin/startxfce" > ~/.xinitrc - The next time you start X, XFCE will be your + The next time you start X, XFCE will be your desktop. (Note, as before: if you're logging in via a display manager like xdm, you should either create an .xsession, as described in the section on GNOME, but with the /usr/X11R6/bin/startxfce command; or, configure your display manager to allow choosing a desktop at login time, as explained in the section on kdm.)