The XFree86/OS2 FAQ

Version 1.2 - 9 Jan 2000

by Holger Veit, Sebastien Marineau

This FAQ represents the knowledge of several hundred mails received since the release of XFree86/OS2 3.1.2D to 3.3.6. Before you ask another question, search here; there is a good chance that your question has been answered already in this list.

General Information

What is X11, X11R6.3, XFree86, XFree86/OS2?

X11, more precisely called "The X Window System" is a complete window system that usually runs as the de-facto standard in Unix environments. X11R6.3 is the name of the current release (precisely, the most recent one is X11R6.4, but this is not part of the 3.X server line. XFree86 is a port of the X Window System to x86-based systems. XFree86/OS2 is a particular port of XFree86 for OS/2 based systems.

Books about X11 exist in any well-sorted CS bookshop.

Some URLs:

http://www.x11.org/ (this has a rather large bibliography)
http://www.xfree86.org/
http://set.gmd.de/~veit/os2/xf86os2.html (XFree86/OS2)


Newsgroups:

comp.windows.x.* (X11 specific things)
comp.os.os2.programmer.* (OS/2 specific things)


Mailing list (for XFree86/OS2): see Q 1.7

How complete is XFree86/OS2?

Almost complete. Missing is xdm (because there is no secure architecture in OS/2 yet - in work), x11perf/xieperf (because I was to lazy yet to rewrite the various shell scripts). Other things should be present; but this does not mean that they work correctly... For other restrictions, read section 6 of this FAQ and the LATEST.OS2 file.

What are the differences to commercial implementations?

Personally, I am aware of IBM's PMX and Hummingbird's Exceed product. There may be some more in the meantime. The two products above differ from XFree86/OS2 mainly in two points:

• you have to pay for them
• they are based on the PM desktop

The latter means that they admittedly fit better into the complete system, but also that they rely on the implementation of the PM video subsystem and its performance (which is lousy for certain hardware).

Also some facilities might not be present, such as background images, PEX, XIE, DGA, or other X extensions.

Why? All of them! Seriously: README and README.OS2 are the most important for the first time. Also read files that refer to your video hardware (such as README.S3, for instance).

Is there a specific news group?

There is no newsgroup specifically for XFree86/OS2, if there is sufficient traffic, we could think about creating one. So far I am usually available in the newsgroups comp.os.os2.programmer.misc and comp.os.os2.programmer.porting. After the release, I will also scan comp.os.os2.setup.misc for XFree86/OS2 specific questions (including installation problems).

Please avoid cross-posting to other groups, this won't speed up answers, and usually annoys people who pay for their news and have broken software which does not recognize crossposts.

Many people who have been using the last version(s) of XFree86/OS2 will also listen in the mentioned newsgroups, and will be helpful.

Please choose a meaningful subject, preferably containing the word "XFree86" or "XFreeOS2" in the line.

YOU MUST HELP ME, I HAVE PROBLEMS!

#exclude <politeness.h>


I MUST die some day, as everyone will. But this is the only thing I really must. The whole project is totally on a voluntary basis, everyone may contribute, but no one is forced to use the software, and particularly YOU cannot force any warranty or usability of the software, or make me do this or that. Just to make this clear!

#include <politeness.h>


Where do I get the source code for XFree86/OS2?

The source code for XFree86 is available from the common XFree86 FTP servers. Also look at the XFree86/OS2 home page for other locations. For alpha and beta versions, the source code is not released.

Help, I retrieved the latest version via FTP, and it says it is expired!

3.1.2[D-G] and 3.2A (anything with a letter in the version code) are beta versions which are built with an expiry date. This behaviour is standard with beta versions and is intentional. XFree86/OS2-3.3.6 does not expire.

How do I ensure that I have the latest code?

The official bugs page http://set.gmd.de/~veit/os2/xf86bugs.html lists dates and sizes of the files we consider the most recent ones. Also this page may point to fixes and updates that you might have to install. Please report any abuse on FTP and Web servers which claim to have a more recent version (and don't refer to the pages at set.gmd.de) - this might be a faked or bogus version.

I have found a bug. How do I report it?

Ensure you really have found a bug, not a feature. Be sure you have read and understood all accompanying READMEs including this FAQ. Consult the official bugs page and verify that this bug hasn't been found yet. If you appear to have found really a bug, send a detailed bug report to Holger.Veit@gmd.de. Read Q 1.13 on information I need to know.

What do you need for a bug report?

a valid email contact. In the past, some contact through the WWW pages failed because of wrong configured WWW readers. Some homebrew PPP link which is up approx 1 hour per week is likely not a valid email address.

The relevant hardware configuration (CPU, RAM, video card, monitor, OS, fixpacks)
The error.log file
The xf86log.os2 file
The popuplog.os2 file
The XF86Config file
If suspected, the CONFIG.SYS file
A description of the effect and how it can be reproduced
Information whether this also occurs on other systems with same or different hardware, or Linux, etc.

I found that killing the X server or the window manager won't work well to end X11. How can I shutdown X11?

Yes, we know it is a problem, mainly related to signal handling that is not fully compatible to Unix signalling as well as some differences in session semantics. XFree86 is not really intended to be started up and shutdown all the time (this is BTW bad manner of users who were accustomed to have only one program open under Windows, because a second one would fail running out of resources). If you don't need XFree86 for a moment, just leave it running in the background - eventually it will be completely swapped out in the swapfile, and you won't need to bother about it eating up resources).

Part of the problem is that clients started in xinitrc.cmd remain under PM control (i.e. its parent is PM, not xinit, as intended), so when X goes down, it doesn't destroy these clients with it.

Currently the following methods appear to work: pop up the window list (CTRL-ESC) and close the xinitrc.cmd process. If this does not help, close the other remaining X processes in the same way. Alternatively to the close function of the window list, a process kill program (killem, killit, pmkill, etc) or Watchcat should also work.

Sometimes some X11 process is still around after shutting down. Bug or Feature?

More feature (of OS/2) than bug. See Q 2.46. We'll try to improve this. For now remove the process with a method described in Q 2.46.

How can I uninstall XFree86/OS2?

You really dare to ask? Ok, if you want to do this: there is nothing special with uninstalling, because there are no INI file entries to be removed.

Exclude the driver XF86SUP.SYS from CONFIG.SYS, and if you like, also the environment variables that were set during installation. Attention: some of them are necessary for proper TCP/IP networking.

Remove the complete tree \XFree86.

How can I uninstall specific packages of XFree86/OS2?

You don't like it, do you? Currently there is no way to specifically remove packages, but this is planned for the future. For now, simply list the ZIP archive where the files were coming from and manually remove these files.

The server does not find my IAK localhost network?

Be sure that the line to be entered in \tcpip\etc\hosts ends with a newline.

I have added a new font directory, but now the X server complains with the message "Font path component expected". This directory does exist!

You must put the path name behind the FontPath keyword in double quotes (").

What does the error message "_X11TransOs2OpenClient: Open server pipe \PIPE\X\xf86.0 failed" mean?

This is for the local named pipe communication the same problem as Q 2.31 is for the network connection. It basically means: the server crashed for some reason, and now a client, e.g. xterm cannot connect to the server. The real reason is probably hidden somewhere else in the XF86Config file, or some other setup problem (e.g. network configuration).

X doesn't work for me, is it because I have EMXOPT= -rc in my settings?

This is at least one problem you have: The EMXOPT option -r<driveletter> does not work with XFree86/OS2. Use the TVFS.IFS (Toronto Virtual File System, available via FTP) to workaround the drive letter problem.

I have EMXOPT=-t in my config.sys, and XFree86/OS2 does not work.

The -t option is incompatible with XFree86/OS2. Since XFree86/OS2 needs a HPFS file system anyway, consider installing the stuff you need this option for on a HPFS disk as well. Or decide what you want: old FAT-stuff or XFree86.

My system works well when I use it with "ifconfig lo..." (HOSTNAME=localhost), but fails when I launch a SLIP/PPP link to my provider.

Don't use "localhost" or "ifconfig lo" when you are considering a modem or Ethernet connection. A server started at the address "localhost" (127.0.0.1) is not visible from the outside.

My provider gives me a dynamic IP address which changes each time I connect with my modem. If I start XFree86 before, it doesn't work, if I start it afterwards, it will fail when the link gets down. Help!

There is not much that can be done here. A dynamic IP address is, well, "dynamic", and exists only as long as the link exists.

The ugly thing with any dynamic IP address is obvious with any software which wants to connect *to* your host. Normally, it is *you* who initiates a connection, e.g. with your WWW browser, and this is no problem. The problem is that remote hosts must be able to find your host (resp. your X server). There is no solution, except to assign the DISPLAY variable as dynamic as the IP address. Needs some tweaking of the startxx.cmd script.

Try to get a static IP address if possible (if necessary, by begging, bribing, or threatening :-)).

Removed

Some old apps no longer work in XFree86-3.3.6.

Yes, unfortunately. This is mainly because of the SECURITY extension which was introduced by X11R6.3. Read X11R6.3.RELNOTES (in XF32doc.zip), section 3.5 ff.

With my VLB-based S3 card (S3805, #9, etc.) the server does not start up.

Look into the xf86log.os2 file. If it ends with something like "xf86MapVidMem failed", the server does not find the video memory, which is typical with VLB cards. Try adding option "nolinear" or "nomemaccess" to the "Device" section of the XF86Config file, or locate the video memory address (some DOS utility from the diagnostic/driver disk coming with the video card might show it) and enter its hex address as "MemBase 0x12345678" to the "Device" section.

I have a Mach64 PC2TV, and it does not work correctly.

The TV on this card is incompatible with the current X servers. Use the DOS utility from the driver disk to switch it off, and don't connect a TV video signal to the its input. Then the server should accept it.

Yes.

Does it also use SDD's acceleration features?

No. They are independent. Typically, XFree86/OS2 already by itself controls the card in a way that it is running at highest speed, even if SDD only provides generic GENGRADD speed. It is also not necessary to buy the special SDD accelerated product, once SDD becomes part of IBMs fixpacks (sorry, Kendall :-) ).

I only get a rather BIG output screen and a big X cursor!

When XFree86 does not detect your video card correctly, or has unacceptable monitor parameters for the requested resolutions (e.g. you have an 31kHz monitor and want 2048x2048 resolution on it - these VGA monitors usually accept 640x480 only), or the card does not have enough RAM for the resolution, the server will fail or fall back to the 320x200x256 mode you observe. Check ALL available docs and the FAQ and server output for details on this. You have done something wrong (and be it to have a generally unsupported card installed).

The cursor is garbled, when I switch back from XFree86!

This is typically an effect resulting from a bad PM video driver that does not correctly save/restore the hardware cursor. Manually add the line Option "sw_cursor" to the section "Device" of your XF86Config file.

I want to have an accelerated server (like Mach64), not that ugly "SVGA" cripple!

With a few exceptions (Rendition Verite, if I remember correctly, all newer cards supported by the SVGA server are accelerated! The new XFree86 server architecture XAA no longer requires a stand-alone server for such cards. The Mach*, S3, and S3V servers will sooner or later die out.

Compatibility, Features, Tips and Tricks

Can I ...?

... run PM and WPS programs?

YES, but not on the X11 desktop yet.

... run DOS programs?

YES, in another full-screen or PM windows session.

... run Windows programs?

YES, in a full-screen DOS session or seamless under PM. Someone volunteering to port Wine?

... run Win95 programs?

You are kidding. Go back playing with your LEGO toys.

... run DOOM or QUAKE?

Doom is available. Quake not.

... exchange data between PM and X11?

There is some experimental clipboard tool on the ported software page. See Q 1.15.

Yes but the commercial X server implementations appear to be able to allow all the above things?

The commercial X implementations are based on the PM desktop, and can therefore use certain facilities available there. The price you pay for this is not just financial, but mainly speed. And no, the commercial X server implementations do not allow all these things; read their docs, not their ad flyers.

Are the XFree86/OS2 DLLs compatible to the IBM PMX or Exceed ones?

No, but there may exist name clashes. Read Q 3.6 of using XFree86 with other servers.

Will you make them compatible to IBM PMX or Exceed (...so that I won't have to buy their development kits...)?

No. It is not possible. PMX is outdated X11R5, and Exceed is just X11R6, but not X11R6.1. Furthermore, both vendors on one hand and I on the other hand have modified the X11 libraries in certain ways, so even with the same naming conventions and numbering of API functions we cannot reach plug-in compatibility.

Can PMX and other X clients connect to the XFree86/OS2 server?

Yes, this works without problems. Note that if a XFree86 client connects to a PMX server, be aware that PMX is X11R5, and XFree86 is X11R6, so certain things won't work which require R6 features or XFree86 extensions. As an example, xvidtune won't work with PMX or Exceed, because it uses a specific XFree86 extension of the X server.

Can you use PMX and XFree86 simultaneously?

Yes, just make sure you avoid name clashes. PMX installs files in \TCPIP\DLL and \TCPIP\BIN which cause name clashes and obscure crashes of XFree86 X clients, so to run XFree86 with an installed PMX, you must have \XFree86\bin before \TCPIP\BIN in your PATH, and \XFree86\lib before \TCPIP\DLL. Read about BEGINLIBPATH in your OS/2 command reference manual.

You should run the PMX server on display :0 and the XFree86 one on display :1 (attention: the startx.cmd has this coded to :0 by default).

How can I display remote clients on XFree86/OS2, e.g. from a Linux system?

You must have a network connection to Linux, this is obvious. OS/2 must run the X server, the remote system may, buy doesn't need to run a server. You must give the remote system permission to display windows on the OS/2 server, by executing

xhost +remotesystemname


on the OS/2 system (enter this in a OS/2 CMD window, add this to the startx.cmd file, or add it to the X0.hosts file). You must tell the remote clients to use the OS/2 X server as a display by starting them with the standard -display option, e.g.

xterm -display os2systemname:0.0


(you can also set the global environment variable DISPLAY=os2systemname:0.0 on the remote host).

How can I display OS/2 X clients on a remote system?

See Q 3.7.1, just vice versa.

How can I enable authorization for host foo.edu without using xhost?

Create the file X0.hosts in \XFree86\lib\X11. To enable connections from a certain host, add in a line containing inet:hostname to the file. For example, your file may look like this:

inet:foo.edu
inet:friendly.host.edu
..


Note that the X0 refers to the zero in the display name os2systemname:0, i.e. in the case of Q 3.6 this would become a X1.hosts then.

How can I connect to a remote XDMCP host?

This is needed in some university and corporate environments. You can start the X server with the option -query xdmcphostname for this.

Where is XDM? There is only a man page for it.

Yes, it is not yet ported; certain infrastructure is still missing.

Can I use another shell like 'bash' in place of CMD.EXE in an xterm?

Most shells are subtly incompatible with the PTY mechanism used in xterm. A symptom may be that they won't work either if you redirect console I/O to a COM terminal which should be possible. bash is such an incompatible shell. See also Q 3.12 and Q 3.13.

Meanwhile, there are special ports of tcsh and ksh which work in an xterm.

I use 4OS/2 (or some other shell) as my shell. Will it work in xterms?

4OS2 has a number of misfeatures, politely spoken, in an xterm. We attempt to fix this in the future. For now, don't use it in an an xterm. If 4OS2 or another shell is in your OS2_SHELL or SHELL variable, please add an environment variable named X11SHELL to point to a valid CMD.EXE path, e.g.

SET X11SHELL=D:\OS2\CMD.EXE


in your CONFIG.SYS. This will override the OS2_SHELL or SHELL setting which is used otherwise.

Why does \OS2\MORE.COM give a SYS0447 in an xterm?

This is a program which silently assumes it has access to the keyboard and the screen: it uses functions from KBDCALLS, MOUCALLS, or VIOCALLS. There are more programs of this kind, for instance: most *.COM in \os2, ATTRIB.EXE, BACKUP.EXE, CACHE.EXE, EAUTIL.EXE, FIND.EXE, HELPMSG.EXE, LINK.EXE, LINK386.EXE, PATCH.EXE, PSTAT.EXE, REPLACE.EXE, RESTORE.EXE, SETBOOT.EXE, SORT.EXE, SPOOL.EXE SYSLEVEL.EXE, TEDIT.EXE, TRACE.EXE, UNPACK.EXE, XCOPY.EXE, XDFCOPY.EXE, but also unfortunately TELNET and FTP, and some others; in fact, almost any 16 bit application is a possible candidate. Note that CMD.EXE is an exception of the rule: it is largely still 16 bit, but is clean for XFree86/OS2 use.

You can use the EWS utility EXEMAP.EXE to check if these DLLs are linked in.

Note: the existence of these DLLs does not mean that the program does not work at all, actually EMX.DLL could call KBD API functions but usually does not in the X11 environment. However, certain unexpected effects may occur in an xterm. I'll try to find a workaround for this in the future, but don't count on this.

FTP seems to work in an xterm, but it does not hide the password?

This is a side effect of what was described in Q 3.13. So actually FTP does NOT work.

Is there a replacement for telnet which works?

Get gnunet10.zip from one of the OS/2 FTP servers. This contains a telnet and a ftp which works in an xterm.

You may try out x3270, available from the ported software WWW page (Q 1.15).

Will there be a PM-based Xserver, like PMX, in XFree86 in the future?

There is xpmfb.exe, available still from some FTP servers (xpmfb.zip), but this port has been abandoned.

See Q 2.39.

How can I run other apps initially?

You can configure the file X11ROOT:\XFree86\lib\x11\xinit\xinitrc.cmd. This is an editable REXX script. Usually you will only modify the section "start some nice programs". You should use start/min to run the command and put all arguments in or "", because REXX may come to the wrong conclusion to interpret certain commands. The last command before the exit must be started without the start/min. If you kill this program, X11 will shutdown. Usually, this is configured as twm. So if you select exit on the root menu of twm, it will shutdown XFree86/OS2. Please read Q 2.46 about some gotcha.

Does XFree86/OS2 support LBX (low bandwidth X)?

No. You might try out DXPC as an alternative, though.

Can it be run over modem lines anyway?

Yes, besides the speed problem this is possible provided you have a correctly configured SLIP or PPP connection using TCP/IP. Pseudo-SLIP, such as term, or kermit does not work (just before someone asks). But even with 28,8K it is no fun without packet compression (see also Q 2.15).

You might check DXPC from the ported software page, ported by Ron van Iwaarden. This is a public packet compression server/client which should give some relief.

Can I use the XF86Config file from Linux or *BSD?

Yes, if it is a 3.1.2[D-G] XF86Config file, and if you change the mouse protocol entry to OSMOUSE and remove the mouse device line. Note the config file is named XF86Config in OS/2, not XF86Config.

I heard about special features in an xterm...

Yes, there are line editor functions built into the XF86SUP.SYS driver which you will mainly encounter in the xterm. The following functions are available currently:

CRSR<-, CTRL-B: back one char
CRSR->, CTRL-F: forward one char
CTRL-H, DEL<-: Delete char to the left
CTRL-U: clear entire line buffer
CTRL-A: cursor to beginning of line
CTRL-E: cursor to end of line
CTRL-K: kill to end of line
CTRL-V: Quote next char, i.e. next keystroke is added to the buffer without interpretation
DELETE (keypad): Delete char on cursor position
INSERT: Toggle insert mode
CRSR ^, CRSR v: retrieve last command (history feature)


But these features of A 3.22 do not work for me?

You have an old version of XF86SUP.SYS installed. You need version 1.432 or later. A usable version is always in the file *BASE.ZIP in the XFree86 distribution, even if a XF86S*.ZIP containing the driver source is not available. The XF86SUP.SYS version 1.420 from 3.1.2D does not have all features.

The "history feature" described in Q 3.23 has some rough edges.

Right, there are still a few bugs in XF86SUP.SYS. Will be fixed sometime in the future. It should not crash, at least.

My software needs three buttons, but I have only a 2 button mouse.

Enable the lines Emulate3Buttons and Emulate3Timeout 50 in your XF86Config file. The third button is then activated by pressing both buttons simultaneously.

Can I swap the mouse buttons for a "lefthanded mouse"?

Yes, use the command

xmodmap -e "pointer = 3 2 1"


on a command line or in the xinitrc file or make an Xmodmap file for that purpose.

My national keyboard does not work, it has the US mapping, e.g. 'y' and 'z' swapped on German keyboards.

You can use XKB to select a German keyboard layout. Select this in xf86config. You can also use a .Xmodmap file. There are sample files in /XFree86/lib/X11/xmodmap/Xmodmap.* for various countries. If you write a new one which is not yet in the distribution, please send it to me (Holger Veit) for inclusion into the next release.

Yes.

Can I use the one that I use at work for the SGI, HP, Sun, AIX machine?

Likely not, this is the problem with Xmodmap files: they depend on the X server's idea how to assign keyboard (scan) codes to keys.

removed

How do I configure xman?

Xman uses the following conventions:

It searches for man pages in the directories specified in the MANPATH environment variable. This is a semicolon (;) separated list of directories of the structure

drive:/dir/.../man1
/man2
/man3
...


What you have to specify actually is the directory path except the last level, such as in SET MANPATH=d:/XFree86/man;Q:/EMX/man;F:/other/mans/man Not all chapters man1-mann need to be existent. If you have installed XF32man.zip, you can see the structure under \XFree86\man. Preformatted pages are compressed with gzip (.gz extension). Such preformatted pages are produced from unformatted pages with

tbl file.man | eqn | groff -man | gzip >file.gz


Unformatted pages are not compressed and have the extension corresponding to the chapter number of the man directory, e.g. in \XFree86\man\man1 this would be 1, like grep.1. If you have unformatted man pages, you must have the groff utilities installed (groff, eqn, tbl). If you use only preformatted manpages, you need cat and gzip. Both utilities are available from hobbes.nmsu.edu.

Can I use something like "rsh" to launch remote X apps?

Yes, the rsh.exe from Warp 4 works fine (\tcpip\bin). I haven't tested other version, but given the compatibility you can also give rsh in TCP/IP and Warp Connect a chance. Run in an xterm

start/min/n rsh remotehostname progname -display localhostname:0


e.g.

start/min/n rsh office-unix xterm -display homepc:0


to get an xterm from your workstation at work to your home PC. Note the thing with ~/.rhosts at your workstation applies! RTF-Unix-M!

I get the error message "Cannot convert string "dt-application..." to type FontStruct. Help!

You want to display clients from a Motif/CDE server. You must copy the special CDE fonts (including fonts.dir and fonts.alias) to your XFree86/OS2 system, preferably into a directory below /XFree86/lib/X11/fonts, and add this directory to the FontPath in the XF86Config file.

What does "Cannot convert string "*xyzzy*-*-*-*...." to type FontStruct" mean?

It means your application needs a font which is not installed, and has not accepted a suitable replacement. Locate this font at the remote host, and install it in a XFree86/OS2 directory. Get the corresponding description from the fonts.dir file which is in the same directory as that font, and put it into a fonts.dir file at the PC (better: copy all fonts there, including the fonts.dir and fonts.aliases, into a local directory). Add the directory to the FontPath in the XF86Config file.

I want to display a client from a Sun OpenWindows system, but it does not work.

There are two reasons why this can typically fail.

Your application uses special OpenWindows fonts. OW can use Type3 fonts and special bitmap fonts, which are unsupported by XFree86 servers. The only workaround is to set up or have your Sun sysop set up a font server (xfs) and add it to the FontPath in your XF86Config file.

The second reason is described in Q 3.39.

Can I connect to a Motif/CDE system?

Yes, this is possible, and generally works like connecting to an XDMCP host. See Q 3.34 how to install the necessary fonts for this.

A remote application gives me the error "GLX server extension missing". How can I run this application?

This application is likely running on a remote SGI (Silicon Graphics) machine. If you have the source code, try to compile it and link it with the "Mesa" library (see ported software page).

If you don't have any source code, it won't work. The application complains that the XFree86 server does not support the OpenGL 3D extension.

A remote application gives the error "DPS server extension missing". How can I run the application?

This application is likely running on a remote Sun with OpenWindows. DPS means "Display Postscript" which does not exist in the XFree86 server. This application cannot run.

Will there be native GLX (OpenGL) support in XFree86 in the future?

Maybe. There is a free implementation of the GLX protocol; it just needs a number of people to implement the 3D intrinsic on top of them. "Mr. Mesa" has AFAIK promised his help, but don't rely on OpenGL within the next time.

Will there be native DPS (Display Postscript) support in XFree86 in the future?

I don't know. So far there is no freely available Display Postscript extension available. Don't even think that ghostscript might be suitable as a DPS module for the server; others more clever than you have already considered that and dropped the idea.

What is the Xprt server good for?

Frankly, I don't know. It is supposed to be an X server which will render a static image to a printer device, and there are a few of them supported (LJ4, PS, Sun SparcPrinter), but X11R6.3 does not contain any sample program to try it out. Rumor is that Motif/CDE has an application which uses it :-(

Why aren't the fonts compressed with gzip, but with the compress program which is not so good?

Until 3.2A, this was a copyright issue, beginning with the beta version 3.2A, the servers understand gzip'd fonts.

How do I set the server to run on another display, as required in FAQ on PMX (Q 3.6)?

Pass the argument ":1" to xinit, such as in

xinit -- :1


If you use startx.cmd to run the server, replace the :0 with :1 there. If you start the X server directly, e.g. for xdm, pass the argument :1 to it as well. Note that most remote xdm servers listen on :0, though.

Is it possible to run multiple X servers?

This is not supported on XFree86/OS2.

Is it possible to run the X server with multiple video cards?

In theory, the VGA16 server allows a single color VGA and a monochrome hercules card, but only in standard non-SVGA resolutions.

In practice, this support is broken since version 3.2, and never tested in XFree86/OS2. A future release will offer this and other combinations again.

How to get color mode in xterm?

You need to start the xterm with -cm. This will enable the color ESC sequences. To get color resources used, you also have to add

#ifdef COLOR
*customization: -color
#endif


to the %HOME%/.Xdefaults file and run xrdb with the option -DCOLOR.

I want to have XFree86 run seamlessly, and integrated on the PM desktop! Write it for us!

See Q 1.8 on the things I must do. Besides, what you ask for involves not just adding some new driver support (a driver for PM), but rewriting the lower levels of X itself. This might require, according to estimations, up to 50% of the X Server (compared to maybe 1-2% for the OS/2 support). If you want to do this, feel free to work on it.

Is there something comparable to seamless operation?

Not really. There is the XPMFB server which runs under DIVE in a PM window, but this is no real integration. To get PM integration, buy Hummingbird's eXceed or IBM's PMX, provided you still find a dealer. XPMFB.ZIP is available from hobbes.nmsu.edu.

Programming and Porting of Software

I have some cool X fonts from other X11 systems. How do I convert them to the ".pcz" format?

The ".pcz" is exactly the same as the ".pcf.Z" format known from Unix. Just rename your files, copy them to the font directories and run the mkfontdir utility.

Where is the contrib kit? Should I port it?

Parts of it are on the ported software page (see Q 1.15).

I have found a cool X utility which I want to port. How should I proceed?

Normally, with X utilities, you get an Imakefile. Simply proceed as if you were under Unix. Run xmkmf -a to compile. Read the programming section on special issues.

Is there a utility for...?

If you don't find it in the the distribution, or on the ported software page (Q 1.15)

Ask whether someone is already porting it, e.g. in the newsgroup comp.os.os2.programmer.porting; if not, then do it yourself. Applications don't appear magically, unless someone really ports them. So why not YOU?

See Q 4.4.

Will you port XFree86 to Windows, NT, Win95?

NEVER!

Is there a better window manager than twm?

There are a number of them, e.g. ctwm, fvwm, fvwm95, afterstep, available through the ported software web page (see Q 1.15).

Why is FVWM (Q 4.7.1) not the default window manager? It has many advantages, for instance "...."

It is available on the ported page (Q 1.15), so if you want it, get it. The distribution reflects what is in the core part of X11R6 which offers twm by default. There is more stuff that would be worth becoming part of the standard, such as xv, but ...well, it isn't...

Do you plan to port Motif?

Sigh. The problem with Motif is that it is owned by a consortium that collects money from licensing Motif. I have a copy of the Motif source code and compiling it is not too difficult. Try it out yourself if you have also access to it.

The problem then is that I cannot give out the code or put it on an FTP server, not even diffs. I don't have the time nor resources to open a business that sells licenses of the libraries to anyone interested and collect the royalties to the Motif Open Software Consortium. Initially, I thought I would simply make binaries, encrypt them and put them on a FTP server. People or institutions that give me a proof of a valid Motif license would then get the decryption key. I was told, however, that this scheme would be juridically suspicious.

So, this may be a point where companies, for instance, who are already involved in the Motif business could jump in, and offer the missing link. I have neither interest nor time to manage this.

There is also the LessTif project to build a free Motif clone. Look at the ported software page (Q 1.15).

XFree86/OS2 is free, but copyrighted software. Is commercial software based on this allowed or welcome?

XFree86/OS2 requires the use of the GNU gcc compiler. There may be certain restrictions and side effects involved concerning the GPL and the use of certain libraries. I won't discuss this here, but I would have no concerns regarding this.

If you aren't concerned either: Yes, commercial applications are allowed and welcome. THIS IS YOUR CHANCE!

Will there be a version for the PowerPC?

Yes.

Does XFree86/OS2 work under WSeB (Aurora)?

The XF86SUP.SYS driver (like multiple other legacy drivers) has a severe problem which results in a crash, when the operating system is shut down. It cannot be recommended to use WSeB together with XFree86/OS2 until this is fixed.

Are there static versions of the X libraries?

Yes, they are separeately available in the package XSLIB.ZIP. The libraries have been renamed to *_s.a to distinguish from the DLL forwarder libraries.

No. gcc is free software, and most stuff written for it is also freely available. Recompile any singlethreaded libs you want to link to a X application.

I want to have support for a commercial compiler, because I do not want to use gcc.

You want a version for a commercial compiler? No problem: write one.

Will the DLLs link with Watcom, Borland, C Set, VAC++, Metaware?

In theory, yes; the calling convention of the API functions is _System. However, there may be a large number of EMXisms in them which may prevent running. You need the EMX runtime DLLs anyway.

Why must I use GNU make? I am accustomed to XYZmake which has very nice features.

Well, Imakefiles also have nice features, particularly that they expand to Makefiles that may have several thousand lines. I have tested numerous make programs: all but GNU make failed this benchmark somehow. You are accustomed to XYZmake; let's say, imake is accustomed to GNU make.

Are there special porting considerations?

Some things occur again and again:

• Use the Imakefile and do not try to handcraft or patch a Makefile. Things will go wrong!
• Read about the macros ProgramTargetName() and LibraryTargetName() and use them in the Imakefile, rather than hacking .exe and .lib names. The above will work, hacking won't.
• Compile and link everything with the -Zmtd option, the libraries are multithreaded by intention.
• Use #ifdef OS2Architecture in an Imakefile to specify an OS/2 dependent part.
• In source or header files, exclusively use #ifdef __EMX__ for OS/2 EMX specific parts. Don't use other symbols, such as "OS2", "__OS2__", "i386", "__GNUC__", or "__32BIT__". Use only #ifdef, #else, #endif, not #elif, as some other compilers don't support this.
• If you think there is a bug in the provided X11 include files, you are doing something wrong.
• Many Imakefiles silently assume they are running under Unix, and therefore have program and library names hardcoded in. Use the LibraryTargetName and ProgramTargetName macros to wrap libs and programs, such as in
EXTRA_LIBRARIES = ../Xpmlib/LibraryTargetName(Xpm)
PROGRAMS = ProgramTargetName(xterm) ProgramTargetName(resize)

• Unix does not have drive letters, so a file (resources, fonts, config, etc.) path starts with '/' normally. XFree86 is located in a tree below %X11ROOT%\XFree86\... To prepend the X11ROOT part to a file path, a special function named __XOS2RedirRoot exists which you are supposed to use in these cases rather than an insane own solution. The prototype of this function is: const char* __XOS2RedirRoot(const char* pathname);
• Don't reinvent the wheel concerning environment variables. Use the ones that are described in the installation file README.OS2, rather than invent yet another variable name for USERs, HOME directories, TMP directories, etc.
• Although the rule was broken multiple times already in XFree86/OS2, try to make your filenames comply with the 8.3 file name convention, so that users may relocate them to elsewhere.
• The libraries are multithreaded EMX libs for certain reasons. This causes a few side effects, particularly if fork() is involved. I got fork running in several situations, but it is no fun. Try to rewrite this code where possible (well-meant advice).
• Many software from Unix assumes that lines have '\n' as a line delimiter. The X applications are linked with \emx\lib\binmode.o. Don't change this, some code relies on this. Rather rewrite the code to accept \r\n as a line delimiter.
• You may use all Dos* API functions, as long as they don't conflict with EMX somehow (e.g. _beginthread vs. DosCreateThread). Stay away from Kbd*, Mou*, Vio* calls - none of those will do what you expect, but you can severely influence the operation of the X11 system.
• If you must do port I/O, use the functions from xf86sup.sys for this; this driver is there anyway, so why not take advantage of it? Common precautions for directly accessing hardware apply.
• Code that relies on Unix security, job control, tty/pty handling, needs major rewriting. In most cases, it is easier to make a separate file for OS/2 rather than clutter the original one with #ifdef clauses.
• X11 executables must be linked as WINDOWCOMPAT and EXETYPE OS2 (the only exceptions are the X servers and xinit).
• XFree86/OS2 by default does not have sh, so rewrite Unix shell scripts to REXX cmd files. Don't rely on others to install sh or other tools just for you.

If you want to contribute other software, please follow these guidelines for making your distribution zip file:

• Use OS/2 zip for packing, even if some foobar packer gives you 1 % better compression. Don't use tar and gzip.
• If you use an Imakefile (which is common practice with X apps), set the X11ROOT variable to another letter than the one where you have your X11 tree. This makes it easier for you to combine all necessary files into a distribution.
• Use exactly the same tree structure as XFree86/OS2 is using Don't reinvent wheels and install to /usr/local/bin or similar, or rely on users to edit CONFIG.SYS to change the PATH or LIBPATH.
• The last section means that the directories in your archive should be rooted to /XFree86.
• Put sources in a separate archive, not in the binary release, and root this archive at /XFree86/src/PACKAGENAME, e.g. /XFree86/src/xfoo-0.42.
• The reason for all that is that I want to engage Software Installer in the future to improve the installation procedure. This should integrate all contribution packages as well. I'll reject non-conforming contributions without warning.

'make' does not work.

Make is a REXX cmd script which is installed in \XFree86\bin. This script sets certain important variables and then calls the x11make.exe program (which is gnumake 3.71) which is known to work. You have some other make.cmd or make.exe somewhere in the path. If you do not remove or rename this, you won't be able to compile X11 code successfully.

When I start an application I have compiled myself, the speaker beeps.

Use an Imakefile. You have not passed the correct options to gcc. The most simple Imakefile to compile a client with just one source file foo.c looks like this:

======snip========================
SimpleProgramTarget(foo)
======snip========================


which will produce about 600 lines of Makefile.

How do I make a XFree86 compliant DLL?

Since the XFree86 source code is now available, you will find plenty of examples how I did this there.

Note that you still need some secondary literature on special features of Imakefile rules. A recommended book on Imakefiles is available from O'Reilly&Assoc publ (Using imake). Ask in your bookstore.

How do you make the packages of ported software?

I use rcs (available from hobbes.nmsu.edu) to make copies of each file before I modify it the first time. Later I use the modified files to produce context diff files using rcsdiff. When I managed to get some code working, I run make install, and make install.man which will usually install all necessary files in the right place. When I think the code is working correctly, I do the following: I change the X11ROOT variable in a CMD window to something else, e.g. from X11ROOT=d: (which it is on my system by default) to X11ROOT=c:, and run make install install.man again. This will build the tree of files again on C: where I can easily pack it with the zip utility after adding README files and diff files manually.

The new Imake config files now contain also "Motif" and "CDE" rule and template files. Does this mean that this stuff will be available soon for free?

No, it doesn't. These files were added in X11R6.3 to better integrate Motif and CDE into the system, but this does not make this software public domain (or whatever you want to call that).

I have ported a program, but it apparently needs the DISPLAY hardcoded into XOpenDisplay, otherwise it does not work. There is apparently a bug in X11.DLL left.

No, this isn't a bug. You must compile your code with "-Zmtd -D__ST_MT_ERRNO__" options, otherwise the getenv() in X11.DLL will fail, and you get infact this effect. Use an Imakefile, which will take care for this.

I have an usupported video card, plenty of time, enough programming skills. Can I become an XFree86 developer?

Your help is greatly appreciated. See Q 2.4.

I have found a wonderful extension for the X server which will give it the super feature XYZZY. And it is freely available under the GNU copyright!

STOP! XFree86 does not just develop for Linux freeware users, but also has serious commercial customers, and important contacts to hardware vendors. XFree86 will NEVER EVER accept code under the GNU copyright in the own code base. There is much more behind XFree86 than you expect which won't allow such kidding with GNU style copyrighting. Don't attempt to discuss or argue about this with anyone from XFree86 in the hope to persuade us. There won't be any chance; accept it as it is, or p**s off! Which is also the answer everyone will get when attempting to do so (and likely also in this tone).

For own software to run under XFree86, this won't apply, of course.

The MIT copyright under which XFree86 is distributed is less restrictive anyway.

Reported working hardware

In former versions of this FAQ, there was a list of working hardware. Meanwhile, the world has spun several times, and the hardware which was up-to-date that time, is now outdated. XF86Config offers a list of more than 500 video card brands and models that are supported. Please refer to the official XFree86 documentation on what is really supported. The general rule is: if it is supported by Linux or FreeBSD, it will also work with XFree86/OS2.

Bugs

Is there information about bugs and will there be "fixpacks"?

Yes, the most recent information about bugs will be available via http://set.gmd.de/~veit/os2/xf86bugs.html (sometimes updated every hour or day). The HTML files linked in this WWW tree are available through FTP as well: set.gmd.de /pub/misc/XFree86OS2/html/* Fixes that become available are at /pub/misc/XFree86OS2/fixes/*.

Some program does not read its resources, fonts, help files, or other files correctly.

(3.1.2D) This is a bug and is related to the effect that the X11 came from Unix with a single root-based file system, in contrast to OS/2 which uses drive letters. There are numerous locations where such file paths exist, and each location needs prepending a drive letter (see Q 4.16). Try the following: run the X server from the same drive your XFree86 tree is on; if the problem disappears, you have found yet another location we forgot to change. Send us a detailed bug report.

Another source of problems are files which contain CR-LF as a line delimiter. We have to fix this the hard way unfortunately; for well-defined reasons programs are linked with \emx\lib\binmode.o. You might try to convert offending files to the Unix convention with the program \XFree86\lib\X11\etc\fixcrlf.exe. fixcrlf filename This will convert the file in place. Never apply this program to executables, fontfiles or other binaries. We need a bug report for the program anyway.

Some Imakefiles won't work.

Not all Imake rules have been converted, only those which are really in use for rebuilding the X11R6 code. This should cover the majority of common X applications. If you find a rule which fails (indicator is that there is no replacement in os2.rules or os2Lib.rules) report it as a bug. It remains your problem (you should contact and flame the author for dirty hacks), if some Imakefile contains Unixisms, such as sh command sequences.

XDM is missing.

It needs some prerequisites for porting.

Some code from the ported software page is buggy.

Maybe. Bugs are in the responsibility of the person who ported it. Send a bug report this person.