XFree86
on Solaris
Table Of Contents
Installing and Configuring XFree86
I Why Use Xfree86?
II Where Can I Get A
Current Copy of Xfree86?
III What Files do I Need?
IV Creating A Temporary
Storage Directory
2 Pre Installation Instructions
I Creating The X11R6 Directory
II Insufficient Disk
Space For The /usr/X11R6
III The Pre Installation Script
IV Extracting The Binaries
V Installing The Binaries
VI Extracting Binaries To
/usr/X11R6
I Starting The Configuration
Process
II The Intro Screen
III Getting your PATH right
IV Mouse setup
V Keyboard setup
VI Monitor setup
VII Selecting your card
VIII Server selection
IX Screen/Video configuration
X Mode Selection
XI Creating the XF86Config
file
XII Some final notes
I Correcting Display Problems
II Making
CDE Fonts Available To The XFree86 Server
III Adding The Solaris
Openwin Fonts
IV Adding The Solaris
Mouse Driver
V Working Around dtlogin
The XFree86 Project, Inc is a non-profit organization that produces XFree86. XFree86 is a freely redistributable implementation of the X Window System that runs on UNIX(R) and UNIX-like operating systems (and OS/2). The XFree86 Project has traditionally focused on Intel x86-based platforms, but current releases also support other platforms.
Why would you want to? if your graphics board isn't supported by Solaris. Solaris for Intel does not currently support a lot of graphics cards, in addition, SUN has been slow in upgrading their drivers for the Intel platform. So if you want to run Solaris and dont have the compatible hardware, Xfree86 is probably your solution.
The primary site for XFree86 servers and clients is ftp.XFree86.org. However there are numerous mirror sites that provide and maintain current releases of Xfree86. A few of the mirror sites are as follows:
ftp://ftp.cdrom.com/pub/XFree86 (source and binaries)
ftp://ftp.infomagic.com/pub/mirrors/XFree86 (source and binaries)
ftp://ftp.varesearch.com/pub/mirrors/xfree86 (source and binaries)
ftp://ftp.cs.umn.edu/pub/XFree86 (source and binaries)
ftp://ftp.kernel.org/pub/mirrors/xfree86 (source and binaries)
ftp://ftp.caldera.org/pub/mirrors/xfree86 (source and binaries)
You will need to get everything under the /binaries/Solaris directory. This directory includes the configuration files and libraries needed for the Xfree86 installation. In addition, you will note that there is a sub-directory called /Servers. This is where you will get the correct Xserver to run with your particular video card. I would suggest pulling all the files, however at minimum you will need the XVG16.tgz since this file will be used to run the program XF86Setup.
preinst.sh | Pre-installation script |
postinst.sh | Post-installation script |
extract | XFree86 extraction utility |
Xbin.tgz | Clients, run-time libs, and app-defaults files |
Xdoc.tgz | Documentation |
Xfnts.tgz | 75dpi, misc and PEX fonts |
Xlib.tgz | Data files required at run-time |
Xman.tgz | Manual pages |
Xset.tgz | XF86Setup utility |
Xjset.tgz | XF86Setup utility (if you prefer the Japanese version) |
XVG16.tgz | 16 colour VGA server (XF86Setup needs this server) |
Xcfg.tgz | sample config files for xinit, xdm |
You will need to select an X server, you do not however need to download them all:
X3DL.tgz | 3 Dlabs server |
X8514.tgz | 8514/A server |
XAGX.tgz | AGX server |
XI128.tgz | I128 server |
XMa32.tgz | Mach 32 server |
XMa64.tgz | Mach 64 server |
XMa8.tgz | Mach 8 server |
XMono.tgz | Mono server |
XP9K.tgz | P9000 server |
XS3.tgz | S3 server |
XS3V.tgz | old S3 ViRGE server (please use SVGA server) |
XSVGA.tgz | SVGA server (for all others not listed, use this server) |
XVG16.tgz | 16 colour VGA server (XF86Setup needs this server) |
XW32.tgz | ET4000/W32, ET6000 server |
We need to make sure that we have created a directory to store the archived. If you have placed the binaries in a suitable directory and wish to install from that directory, skip to section 2. For the purpose of this document we will assume that the /var/tmp directory is going to be our storage area. Once you have created the directory, download the files into that directory.
# mkdir /var/tmp
Once the installation has been completed you can remove these files and free up the disk space.
This section assumes that you are installing Xfree86 for the first time, if you are upgrading an existing copy please refer to the release notes for further instructions.
In order to begin our installation we need to setup some directories and links to let the setup program know where our binaries reside. If you have insufficient disk space to store the binaries on /usr/X11R6 then skip this section and refer to section 2.3 for further guidance. The following actions need to be taken:
# mkdir /usr/X11R6
If you have insufficient space to store the Xfree86 files in /usr dont worry. Identify a partition on your drive that you have enough space to store roughly 30 megabytes of data. Once you have completed this, you can create the X11R6 directory on that partition, however we must create a symbolic link to that directory so the operating system knows where to find the files. To accomplish this lets say that you have decided that adequate space resides in the /export/home directory. The following actions would be taken:
# mkdir /export/home/X11R6
# ln -s /export/home/X11R6 /usr
The next step you need to perform is to run the pre-installation script. This script makes some preliminary checks of your system. For some OSs, it may tell you to install new versions of some system components before proceeding with the installation. This script may also remove some outdated files and symbolic links from a previous installation that could cause problems.
For the purposes of these installation instructions, it is assumed that you have downloaded all the files to the /var/tmp directory. If you've put them in another directory, that's fine -- just replace all occurrences of "/var/tmp" in this documentation to reflect the name of the directory which you stored the compressed files.
To run the pre-installation script, change directory to /usr/X11R6 and initiate the /var/tmp/preinst.sh:
# cd /usr/X11R6
# sh /export/home/X11R6/preinst.sh
The next step is to make the installation utility executable. To do this, make sure the "extract" file is in the same directory as all the X*.tgz files, and run the following from that directory:
# chmod 755 extract
The installation utility "extract" is used to unpack the .tgz files that make up the XFree86 distribution. The .tgz files are gzipped tar files. However, "tar" in its standard form on most OSs is not well suited to the task of installing XFree86. The extract utility is a modified version of GNU tar 1.12 built with the options required to make it suitable for installing XFree86. The source for extract is available from the same place you got the XFree86 distribution.
It is strongly recommended that you use the provided extract utility to unpack the XFree86 distribution. If you choose to ignore this and use something else, we don't want to hear from you if you run into problems. It is also important that you do not rename the extract utility. If renamed, it behaves just like the normal GNU tar.
Now that you have completed the prep work, it is time to extract the compressed binaries so that we can setup our Xfree86.
The downloaded binaries are in a compressed tar format. We need to extract these files before we can actually setup our Xfree86 environment. To extract the XFree86 binaries, run the following as root:
# cd /usr/X11R6
# /var/tmp/extract /var/tmp/X*.tgzOnce the required .tgz files have been extracted, run the post installation script:
# cd /usr/X11R6
# sh /var/tmp/postinst.sh
Once you have completed the installation you should run the one of the configuration utilities (XF86Setup or xf86config) to configure the X server. This is essential for a new installation but optional for an existing installation. For the purpose of this document we will use the xf86config script to configure the X server. If you prefer to use the gui version (XF86Setup) for setting up the X server then refer to the Quick Start notes that are provided with the Xfree86.
Before running the xf86config program you need to know some basic information about your computer system. This is important because during the installation process you will be ask to supply certain parameters in order to complete the installation. Most of this information is vendor supplied in the reference manuals that were supplied with your hardware. If you can no longer find the manuals, go to the company's Web site and look up your product. Most companies keep a technical reference page for products by make, model number. What you will need to know before you begin:
Monitor:
Horizontal Sync Range (can be fixed or a range 35 - 65)
Vertical Sync Range (can be fixed or a range 5 - 120)
Video Card:
Make, Model (3D banshee, ATI Graphics Pro, Intel 740)
RAM on board (1, 2, 4, 8 megabytes)
RAMDAC (if used the type)
From a text screen, run the xf86config program. This program should be run as root (although not absolutely necessary, it will allow xf86config to do more of the work for you). You can press your interrupt character (usually Control-C or perhaps Delete), at any time to stop the program, if you need to. You can just start it over again. To start the process complete the following:
# cd /usr/X11R6/bin
# ./xf86config
First, xf86config begins by telling you a few things like the fact that it can help you setup a XF86Config file or that you can do the job yourself with an editor. Just read what it says and press Enter when done.
The program will next check that you have the directory /usr/X11R6 (the standard installation directory) on your system and tell you that it needs to be in your PATH environment variable.
It will also check if you have the /usr/X386 directory as used by older (pre 3.0) versions of XFree86. If by chance you do, it will warn you that /usr/X11R6 must be before /usr/X386 in your PATH.
If everything is okay, just press Enter and go on, otherwise press Control-C to exit and make any necessary changes and restart xf86config.
Pick the mouse type from the menu and enter the name of the device to which mouse is connected, as directed.
1. Microsoft Compatible
2. Mouse Systems
3. Bus Mouse
Enter a protocol number: 1 <enter>
Do you want to enable Emulate3Buttons? N <enter>
Mouse Device: <enter> "This will select the default /dev/mouse"
Solaris has a built in mouse driver that the Xserver needs to use, you'll need to edit the XF86Config file to setup your mouse after the installation, for now just pick any mouse from the list and press enter when asked for the device. Changing the XF86Config file to use the Solaris mouse driver is discussed in section 4, Post Installation Instructions.
If you don't know which protocol your mouse uses, you'll just have to guess (the xf86config program will give you some hints as to which might be most likely) and then see the troubleshooting section if it doesn't work when you run the server.
The xf86config program has not been updated to allow you to select the latest mouse protocols, so you may have to edit the /etc/XF86Config file by hand after xf86config has finished.
Simply answer yes to the question regarding keyboard setup.
Do you want to use XKB? Y <enter>
List of preconfigured keymaps:
- Standard 101-key, US encoding
- Microsoft Natural, US encoding
- Etc.
Enter a number to choose the keymap: 1 <enter>
Setting up a monitor consists of entering the specifications of your monitor and a description of the model and manufacturer.
You are first asked for the horizontal sync rate. It is VERY important to enter the correct value(s) from the vendor manual. If one of the ranges given matches the rate of your monitor, then pick it, otherwise pick custom and enter the values from your vendor manual.
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
Enter your own horizontal sync range
Enter your choice (1-11): 11 <enter>
Horizontal sync range: 60 85 <enter>
Next is the vertical refresh rate. Again, it is VERY important that this parameter be specified correctly. Enter it in a manner similar to the horizontal sync rate.
- 50-70
- 50-90
- 50-100
- 40-150
- Enter your own vertical sync range
Enter your choice: 5 <enter>
Vertical sync range: 50-80 <enter>
Note: If either rate is incorrect, it can result in damage to your monitor.
Finally, you are asked for an "identifier", your monitor manufacturer, and model. You can just press enter to get through these quickly. However I strongly suggest that enter an identifier for each of the three fields requested, this will make modifying the /etc/XF86Config easier later on.
You are next asked if you would like to view the database of cards. Picking your card from the list will cause the answers to the questions in the next two sections to be filled in for you and so can save a little time.
If your card does not appear in the list, just press q and enter to skip on to the next step - where you'll have to answer the questions yourself.
If you selected your card in the previous step, then server selection is easy just use the recommendation from the database.
If you have a card which uses one of the chipsets for which a specific server exists (Mach8, Mach32, Mach64, AGX/XGA, 8514/A, S3, I128, P9000) you'll want to pick the accel option.
Otherwise you'll probably want to use the SVGA server.
Next, answer yes when the program asks if you want it to set the symbolic link for you. If you picked the accel option, you'll also need to indicate which particular accelerated server to link to.
Pick the appropriate option from the list to indicate the amount of memory on your video card.
Then you are asked to provide and identifier, the manufacturer, and the model of your card. You can just press enter to skip through these, if you wish.
Next, the program will ask for the type of RAMDAC and Clockchip on your card. If your card was in the database, you should just to tell it to use the values from the database.
If you don't have one of the listed RAMDACs or Clockchips on your card, just press enter when asked what type you have. If you do not have a programmable clock chip, the program will next attempt to probe to find out what clock rates are supported by your clock chip.
Now you get to tell the program which video modes you would like to be able to run.
The program will show you the common modes that should work with your card (some might not work with your monitor, but if you've correctly specified the monitor's sync rates, the X server will just ignore them when it runs).
You could just accept the settings as they are given, but you'll probably wish to reverse the order. For example, if you have a card with 1 Meg RAM, it will list the modes
"640x480" "800x600" "1024x768" for 8bpp
Select 1 to change the settings for 8bpp and the type 432 to select the reverse order.
When you've selected the modes, in the order you wish, select option 4 to continue.
The program will now ask if you would like to write the configuration settings you've selected to the file XF86Config. Answer yes.
Lastly, the program tells you that it's finished its part of this process and counsels you to check the file before using it. The next section covers the changes that are most likely to be needed.
In order to get the XFree86 X server functioning correctly you will need to tweak some settings a bit to get everything working. This section will cover what modifications need to be made and how to make them.
On Solaris 2.6, Sun changed the way X client communicates with X server when both the client and X server are on the local machine (DISPLAY variable is set to ":0"). In short, instead of using /tmp/.X11-unix, the client connects to the X server using /tmp/.X11-pipe. Since XFree86 doesn't support /tmp/.X11-pipe, CDE will not work out-of-the-box on the local display under the XFree86 server.
After installing and configuring XFree86 the file /usr/dt/config/Xservers needs to be copied to /etc/dt/config/Xservers:
# cp /usr/dt/config/Xservers /etc/dt/config/Xservers
Next we need to edit and modify a line in the Xservers file:
# cd /etc/dt/config
# vi Xservers
Locate the line with the following entry:
:0 Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner
Comment the out by adding the pound sign at the start of the entry.
# :0 Local local_uid@console root /usr/openwin/bin/Xsun :0 nobanner
Next add one of the three suggested lines
(only one) with the required modifications.unix:0 Local local_uid@console root /usr/X11R6/bin/X :0 -bpp 16
or
* Local local_uid@console root /usr/X11R6/bin/X :0 -bpp 16
or
* Local local@console /usr/X11R6/bin/X :0 -bpp 16
For 8-bit displays, "-bpp 16" should be omitted, or changed to "-bpp 24" for 24-bit displays. After that, dtlogin will set the DISPLAY variable for local session to "unix:0.0" instead of ":0.0" and CDE will be able to connect to the local X server.
In order to make CDE fonts available to the Xfree86 server you must make the font sever available. This is accomplished by adding the font server to the end of the font path in the /etc/dt/config/Xservers file.
# vi /etc/dt/config/xservers
Locate one of the following entries:
unix:0 Local local_uid@console root /usr/X11R6/bin/X :0 -bpp 16
* Local local_uid@console root /usr/X11R6/bin/X :0 -bpp 16
* Local local@console /usr/X11R6/bin/X :0
Append to the end of one of the entries the following:
/usr/X11R6/lib/X11/fonts/misc:unscaled,
/usr/X11R6/lib/X11/fonts/75dpi:unscaled,
/usr/X11R6/lib/X11/fonts/100dpi:unscaled,
/usr/X11R6/lib/X11/fonts/Type1,
/usr/X11R6/lib/X11/fonts/Speedo,
/usr/X11R6/lib/X11/fonts/misc,
/usr/X11R6/lib/X11/fonts/75dpi,
/usr/X11R6/lib/X11/fonts/100dpi,
tcp/localhost:7100
Note: Though the font paths appear as separate lines, this is not to be the case when appending the paths to the end of the line. This should be one single continuos line.
To add fonts from the /usr/openwin/lib/X11/fonts directory to the default font path for XFree86 server, edit /etc/XF86Config file and add these lines under the section named "Files":
# cd /etc
# vi XF86Config
Add the following lines immediately after the section "
Files":FontPath
"/usr/openwin/lib/X11/fonts/F3bitmaps/"
FontPath "/usr/openwin/lib/X11/fonts/Type1/"
FontPath "/usr/openwin/lib/X11/fonts/Speedo/"
FontPath "/usr/openwin/lib/X11/fonts/misc/"
FontPath "/usr/openwin/lib/X11/fonts/75dpi/"
FontPath "/usr/openwin/lib/X11/fonts/100dpi/"
At minimum you will need to add the F3bitmaps line since aliases for the CDE fonts are in the F3bitmaps directory.
Solaris does not use the /dev/mouse driver, but instead uses the /dev/kdmouse. You will immediately notice once you start CDE or Openwin that the mouse does not respond. In order to remedy this situation we need to let XFree86 know where the correct mouse driver can be located. This is done by modifying an entry in the /etc/XF86Config file.
# vi /etc/XF86Config
Locate the section "Pointer" and modify the "Device" entry to read:
Section "Pointer"
Protocol "PS/2"
Device "/dev/kdmouse"
BaudRate 1200
Emulate3Timeout 50
EndSection
There is a known problem that when you log out of a CDE session that you are dropped to the X windows backdrop and not back to the dtlogin screen. There are several solutions to this problem, thought I am not sure which is more correct then the other. I will present one solution that works for me and should also work for your setup.
The problem appears to be that the Xserver is sending a SIGUSR1 signal to the dtlogin as part of its startup well before dtlogin expects the signal. A solution then would be to setup a delay in order to slow down the sending of the SIGUSR1 signal. I found the following solution on the news groups:
Remove the link to the Xfree86 server:
# cd /usr/X11R6/bin
# rm XCreate a script to introduce the delay:
# cd /usr/X11R6/bin
# vi X> #!/bin/sh
>
>sleep 1 # This line is optional
>exec /usr/X11R6/bin/XF86_SVGA $* # The name of you X server/wq
Make the script executable:
# chmod 755 X
Next time you exit the CDE session a call will be made to X. This will call the script, initiate the delay and then execute the server. This will then place you back at the dtlogin screen. This has worked for me with absolutely no problem. If the 1-second delay does not work try experimenting with other delay times in one-second increments.