diff --git a/en_US.ISO8859-1/books/handbook/x11/chapter.sgml b/en_US.ISO8859-1/books/handbook/x11/chapter.sgml index a58e7c77cd..c955e1e22c 100644 --- a/en_US.ISO8859-1/books/handbook/x11/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/x11/chapter.sgml @@ -1,2380 +1,1139 @@ 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;. - 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 FreeBSD uses XFree86 to provide users with a powerful + graphical user interface. XFree86 is a open-source + implementation of the X Window System. The following chapter + will cover installation and configuration of XFree86 on your + FreeBSD 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 - /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. + After reading this chapter you will know: + + How to install and configure XFree86. + How to install and use different window managers + How to use TrueType fonts in XFree86 + How to setup your system for graphical logins (XDM). + + + Before reading this chapter you should: + + + Know how to install additional third-party + software () + Installing XFree86 - 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. - 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. - - - - - - 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. - - 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: - - - - - - 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: - - - - 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: - - &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 - /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: + XFree86 is available as a port + and as a package, making it easy to install. You can also + download the binaries directly from the XFree86 organization and + install them by hand, following the instructions provided by the + XFree86 group. + + Your only decision is which version of XFree86 to run. + XFree86 3.X is the maintenance branch of XFree86 development. + It's very stable, and it supports a huge number of graphics + cards. However, no new development is happening there. XFree86 + 4.X is a redesign of XFree86. As well as introducing many new + features (including much better support for fonts and + anti-aliasing), XFree86 4.X supports slightly fewer graphics + cards. + + If your card is supported we recommend you run 4.X. If it + is not then run 3.X. + + The rest of this chapter will explain how to configure + XFree86, and suggest various programs for X that you might want + to try. + + - &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: - - &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 &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 &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 - &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: - - &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 - 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; - 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 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) - 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. - + + + + + Christopher + Shumway + + + + + XFree86 Configuration Introduction This chapter will introduce the steps necessary to install 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: 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. 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. 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 /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 built. Configuring XFree86 4.X 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. The next step is to test the currently existing 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 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 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_load="YES" Next, a device node needs to be created for the 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. + + + + Murray + Stokely + Section on fonts + + + 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, or ~/.xsession when logging in through a graphical login manager like XDM). A third way is to use the new 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 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 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 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. 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 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: 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 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; configuring it should get easier with time, and it will soon be supported by many more applications. + + + + Seth + Kingsley + Section on XDM + + + 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 ), 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. 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: 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. 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: 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; 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. 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. 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 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. 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 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 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: ! 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. 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. 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. 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. Installing GNOME 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: &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 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. 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. KDE2 About KDE2 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 Standardized menu and toolbars, keybindings, color-schemes, etc. Internationalization: KDE is available in more than 40 languages Centralized consisted dialog driven desktop configuration 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 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 : &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. 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: &prompt.root; echo "/usr/X11R6/bin/startkde" > ~/.xinitrc 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.) 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. 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 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. 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): 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: /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. 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. 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: A simple, easy-to-handle desktop Fully configurable via mouse, with drag and drop, etc Main panel similar to CDE, with menus, applets and app launchers Integrated window manager, file manager, sound manager, GNOME compliance module, and other things Themeable (since it uses gtk+) Fast, light and efficient: ideal for older/slower machines or machines with memory limitations 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: &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: &prompt.root; echo "/usr/X11R6/bin/startxfce" > ~/.xinitrc 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.)