XFree86 Notes

From OS2World.com Wiki
Jump to: navigation, search

By Dave Saville

This is a summary of the presentation that Dave Saville gave at the Warp UK User Group meeting on August 4th 2001. Download from XFree86 for OS/2 project or your Warp UK CD.

Contents

Installation

Installation is just a case of following the readme ;-) - But some points to note:

  1. The xfree86 directory may be on any drive but must be in the root directory of that drive. Most unixy ports assume this.
  2. Unzip Xbase, Xdoc, Xfnts & Xbin from the drive root.
  3. "Add DEVICE=?:\XFree86\lib\xf86sup.sys" to config.sys
   At this point you may wish to add the other environment variables - see the readme
  1. Reboot
  2. Run "?:\XFree86\bin\SuperProbe" and capture STDOUT. This will give you information about your video card.
  3. Unzip the video driver that supports your card. There are two versions S & X the S, or small, version does not have the entire X functionality - but most apps won't notice.
  4. Add the XSERVER definition to config.sys if not done before.
  5. Reboot.
  6. Run checkinstall.cmd - This does what it says on the tin. Do not try and run X until this runs clean.

X basics

X is the window, note the small w, system of all flavours of Unix. Booting a Unix system without X gives you a display very similar to booting a PC to DOS - a full screen command line.

Unlike OS/2, or Windows, there is an extra layer of software involved which makes a dramatic difference to the look and feel.

OS/2 has (and yes I know this is over simplified):

  • Application
  • PM
  • OS kernel

Whilst X has:

  • Application
  • Window manager
  • X
  • OS kernel

This means that the look and feel can be altered by running a different window manager and without rebooting - there are a lot of different window managers out there. Almost all of them end in 'wm'. By default Xfree86 uses twm - this is very basic and I would recommend you download 'icewm' and edit ?:\xfree86\lib\X11\xinit\xinitrc.cmd to use icewm instead of twm.

Xfree86 has a configuration file called ?:\xfree86\lib\X11\XF86Config which should be built on running the checkinstall. Mess with it only if you really know what you are doing.

Running Xfree86

Xfree86, unlike PMX, does not use PM to draw the screen - it takes over the video hardware. Therefore cut and paste is not easy, although there are some programs floating about that are supposed to allow it. To switch between your OS/2 desktop and X is easy, to get out of X hit 'alt esc', to get back use the window list and double click on the X session.

There are three ways, at least, of getting an X session running on your OS/2 desktop.

  1. Display a local X desktop and run local programs on it.
  2. Display a local X desktop and run remote programs on it.
  3. Display a remote X desktop etc.

Display a local X desktop and run local programs on it

If all you need is a local X desktop, to be able to run the GIMP for example, then just type "startx" at the command prompt, or create a program object. Then you can start your program from the command line session you will find on the X desktop.

Note that Xfree86 is designed to be started once and left running. If you stop it you may find one a two processes still running - the command window and the clock are the usual suspects. You can just kill them.

Display a local X desktop and run remote programs on it

If you have another X capable system, start X as above and then from on OS/2 command window, not the one on the X desktop, telnet to the other box and then start the required program. When you do this you need to tell X where to display the output. Most X programs will either obey the DISPLAY environmental variable or take a -display argument. The value in either case is <machine name><ip address>:0.0 - The :0.0 is X speak for display number - don't worry about it.

You may get a permission denied message about the display. In that case the quick and dirty fix is to go into an OS/2 command prompt and type xhost +. Note that this allows ANY machine in the world to display on your desktop. You may prefer to add a 'x0.hosts' file to ?:\xfree86\lib\X11 the format is one line per machine you want to allow to display on your desktop - viz

inet:paddington
inet:bear

NB Do not use the 'e' editor to create/edit this file, or any other X or TCP config file for that matter, e adds an EOF marker and most *nix parsing chokes on it.

Display a remote X desktop etc

Of course, if you have a *nix box, you may just want to be able to display that machines desktop on your OS/2 system. The advantage of this is that you can control both machines with one screen/mouse/keyboard without having any switches.

To achieve this create a program object.

  • The program to execute is *your* X video driver, ie ?:/XFREE86/BIN/XF86_SVGA.EXE
  • The parameters are -query <unix machine name> -once

If you use this method and want to display from a third *nix box then the name for -display is the second *nix box NOT the OS/2 box.

VNC - Virtual Network Computing from AT&T Laboratories Cambridge

There is a yet another way of displaying windows from one machine on another. If you don't care about running X applications on your OS/2 box, but just want to display from elsewhere, then VNC may be for you. VNC is free and gives a similar capability to PC Anywhere and similar. The major difference is that it is cross platform. At home, with one screen/keyboard/mouse I run my main OS/2 machine and a Sun Sparc running Solaris and an old PC running NT (yuk). The later two are just PM windows on the OS/2 desktop. Again, as with Xfree86, cut and paste is not really on.

To run VNC you need a server on the machine you want to display from and a viewer on the machine you want to see it on. The good news is that there is a VNC viewer for just about any platform in the known universe. The bad news is that not all platforms have a server - guess one <grin>. (There have been attempts to port the server to OS/2 - most have given up. It is alledged that the windows server will run under Odin - but I cannot vouch for that.) The really, really sexy thing about VNC is that you can kill the viewer and start another, even on another box, to the same server and your remote session is still running. Actually you don't even need to kill it - it will switch to the new viewer. This is great if you do remote support - it no longer matters if the connection goes down - just reconnect, restart the viewer and there is all your work waiting for you. Its secure *and* its faster than low band width X over a phone line.