Cygwin/X Frequently Asked Questions

Harold L Hunt, II

Revision History
Revision 1.0.162003-04-03Revised by: harold@codeweavers.com
Update the ssh instructions. Remove old entries.
Revision 1.0.152003-03-09Revised by: huntharo@msu.edu
Add answer for font problems. Remove an old entry.
Revision 1.0.142004-03-08Revised by: alexander.gottwald@s1999.tu-chemnitz.de
Changed the OpenSSH config file location. Reported by tulitanssi <at> luukku <dot> com Marked Alt-Gr with XP Powertoys as solved. Added section about wrong AltGr key name.
Revision 1.0.132004-02-29Revised by: alexander.gottwald@s1999.tu-chemnitz.de
Replaced XF86Config with the new commandline options.
Revision 1.0.122004-02-28Revised by: alexander.gottwald@s1999.tu-chemnitz.de
Added ForwardX11Trusted to ssh section.
Revision 1.0.112004-01-04Revised by: alexander.gottwald@s1999.tu-chemnitz.de
Restructured keyboard and remote questions to own sections.
Revision 1.0.102003-12-29Revised by: huntharo@msu.edu
Remove more old entries.
Revision 1.0.92003-12-29Revised by: huntharo@msu.edu
Remove old entries about Xinstall.sh.
Revision 1.0.82003-12-22Revised by: huntharo@msu.edu
Updated XDMCP entries and kdmrc locations.
Revision 1.0.72003-12-18Revised by: alexander.gottwald@s1999.tu-chemnitz.de
Added troubleshooting info for Microsoft Services for Unix.
Revision 1.0.62003-12-06Revised by: alexander.gottwald@s1999.tu-chemnitz.de
Added troubleshooting info for Ctrl-Alt-BackSpace and AutoFocus.
Revision 1.0.52003-12-05Revised by: alexander.gottwald@s1999.tu-chemnitz.de
Added troubleshooting info for AltGr problem with Windows XP and Powertoys. Added troubleshooting for very poor performance.
Revision 1.0.42003-09-05Revised by: alexander.gottwald@s1999.tu-chemnitz.de
Updated the entries about non U.S. keyboard layouts. Added troubleshooting info for X11Forwarding and keyboard layouts.
Revision 1.0.32003-03-28Revised by: huntharo@msu.edu
Revised q&a entries for showing 8-bit chars in bash and for enabling XDMCP on remote machines.
Revision 1.0.22002-05-26Revised by: huntharo@msu.edu
Add a q&a for TrackPoint mouse wheel emulation.
Revision 1.0.12001-10-22Revised by: huntharo@msu.edu
Added a q&a's to the Usage section, contributed by Mika Laitio, regarding why Linux-Mandrake 8.1 doesn't display an XDMCP login screen.
Revision 1.0.02001-10-19Revised by: huntharo@msu.edu
Added a q&a to the Error and Warning Messages section for the cygncurses5.dll problem. Added three q&a's to the Porting Software section. Bumped the revision number to 1.0.0 to indicate that all planned content is now present.
Revision 0.0.32001-06-10Revised by: huntharo@msu.edu
Added a q&a to the Installation section regarding web browsers that automatically decompress bzip2 files. Updated the answer for the error message STATUS_INTEGER_DIVIDE_BY_ZERO to indicate that 8 bit color is now supported.
Revision 0.0.22001-06-03Revised by: huntharo@msu.edu
Revision 0.0.12001-05-23Revised by: huntharo@msu.edu
Revision 0.0.02001-05-22Revised by: huntharo@msu.edu

Table of Contents
Questions and Answers
Bibliography
Glossary
A. GNU Free Documentation License

Questions and Answers

1. General Information
1.1. What is Cygwin/X?
1.2. What is Cygwin?
1.3. What is the X Window System?
1.4. What is an X Server?
1.5. What is an X client?
1.6. Why port the X Window System to Microsoft Windows?
1.7. Is there a Cygwin/X newsgroup?
1.8. Is there a Cygwin/X mailing list?
2. Installation
2.1. What versions of Windows does Cygwin/X run on?
2.2. How is Cygwin/X installed?
3. Configuration
3.1. Is there an XF86Config file?
3.2. What are the command line arguments for XWin.exe?
3.3. Why does XWin.exe ignore the display depth that I pass on the command line?
3.4. I have a two button mouse, can I emulate a three button mouse?
3.5. Is there a Focus-Follows-Mouse feature (Auto-Focus)?
3.6. The option -nounixkill has no effect. How can i prevent the server shutdown an Ctrl-Alt-BackSpace?
4. Internationalization
4.1. Keyboard support
4.1.1. How do I use a non-U.S. keyboard layout?
4.1.2. Where can I find an xmodmap for my non-U.S. keyboard layout?
4.1.3. How do I get my non-U.S. keyboard modmap to be installed when using xdmcp?
4.1.4. Logging into AIX via XDMCP causes the keyboard to function as if AltGr is permanently pressed.
4.1.5. Loading XKB keymaps fails
4.1.6. I have Windows XP with Powertoys installed and AltGr does not work. What can I do?
4.1.7. AltGr does not work properly when connecting to other unices or to old XFree86.
4.2. Display problems
4.2.1. How do I get bash to display accents and/or umlauts?
4.2.2. How do I put bash into "8 bit" mode?
5. Remote connections
5.1. X11Forwarding does not work with OpenSSH under Cygwin
6. XDMCP connections
6.1. XDMCP fatal error: Session declined No valid address
6.2. I get no login screen when using -query
6.3. I get no login screen for Solaris
6.4. XDMCP freezes with remote Solaris machine!
6.5. Login to CDE on Solaris via XDMCP hangs Cygwin/X.
6.6. Where can I find more information about XDMCP.
7. Troubleshooting
7.1. Is there a log file that I can look at for diagnostic information and error messages?
7.2. I have a specific error message, what does it mean?
7.3. I have a specific error message that is not addressed in the Error and Warning Messages section.
7.4. My bug report the Cygwin/X mailing list was ignored. What do I do now?
7.5. Cygwin/X has very poor performance. What's the reason?
7.6. I have Microsoft Services for Unix installed and can't type anything. Help me!!!
7.7. Cygwin/X is extremely slow, especially when using XDMCP to connect to remote machines.
8. Error and Warning Messages
8.1. IBM ThinkPad's with a TrackPoint mouse doesn't allow simulated mouse wheel scrolling.
8.2. _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
8.3. error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
8.4. Fatal server error: could not open default font 'fixed'
8.5. Could not init font path element /usr/X11R6/lib/X11/fonts/*/, removing from list!
8.6. The procedure entry point _check_for_executable could not be located
8.7. Exception: STATUS_ACCESS_VIOLATION
8.8. Xlib: connection to "local_host_name_or_ip_address:0.0" refused by server Xlib: Maximum number of clients reached
8.9. XIO: fatal IO error 104 (Connection reset by peer) on X server "127.0.0.1:0.0"
8.10. Cannot Open Display: 127.0.0.1:0.0
8.11. Out of environment space
8.12. Too many parameters
9. Porting Software
9.1. Is there a list of software that has been ported to Cygwin/X?
9.2. How do I start porting software to Cygwin/X?
9.3. Are there common problems encountered when porting software to Cygwin/X?
10. Contributing
10.1. Are there step-by-step instructions for contributing to Cygwin/X?
10.2. Are there editors for Windows that understand and preserve UNIX end of line characters?
10.3. How should I generate patches for Cygwin/X?
10.4. Where do I submit patches for Cygwin/X?
10.5. Why doesn't the X Window System use GNU's autoconf?
10.6. What compiler does Cygwin/X use, and which compilers are supported?
10.7. Is cross-compiling from a non-Cygwin platform supported?
10.8. Where can I get help for installing DocBook on Cygwin?
11. Licenses, Patents, Trademarks, and Copyrights
11.1. What licenses apply to Cygwin/X source code?
11.2. What licenses apply to the X Window System source code?
11.3. What license applies to Cygwin source code?
11.4. Whom holds the copyright on the Cygwin/X source code?
11.5. Whom holds the copyright on the X Window System source code?
11.6. Whom holds the copyright on the Cygwin source code?
11.7. What license applies to Motif?
11.8. Isn't "XWin" trademarked by StarNet Communications?

1. General Information

1.1. What is Cygwin/X?

Cygwin/X is a port of the X Window System to Cygwin; Cygwin provides a UNIX-like API on the Win32 platform.

1.2. What is Cygwin?

Cygwin tools are, in the words of the Cygwin homepage, "ports of the popular GNU development tools and utilities for Windows 95, 98, and NT. They function by using the Cygwin library which provides a UNIX-like API on top of the Win32 API." Cygwin provides the compiler (gcc), libraries, headers, and other utilities which build and support the operation of Cygwin/X.

1.3. What is the X Window System?

[ScheiflerGettys92]

The X Window System, or X, is a network-transparent window system. With X, multiple applications can run simultaneously in windows, generating text and graphics in monochrome or color on a bitmap display. Network transparency means that application programs can run on machines scattered through the network.

1.4. What is an X Server?

An X Server is a program that provides display and user input services to other programs. In comparison, a file server provides other programs with access to file storage devices. File servers are typically located in a remote location and you use the services of a file server from the machine that you are located at. In contrast, an X Server is typically running on the machine that you are located at; display and user input services may be requested by programs running on your machine, as well as by programs running on remote machines.

1.5. What is an X client?

An X client is a program that utilizes the display and user input services provided by an X Server. X clients may run on the same or disparate machine as the X Server that is providing display and user input services.

1.6. Why port the X Window System to Microsoft Windows?

Porting X Window System to Microsoft Windows benefits many people and projects in many ways:

  • Prior to Cygwin/X only commercial, closed source X Servers were available for Microsoft Windows.

  • An X Server on Windows may be used to display the output of programs running on remote UNIX machines.

  • Cygwin/X, in conjunction with Cygwin, provides a complete compatibility layer for compiling and running UNIX applications on Microsoft Windows.

1.7. Is there a Cygwin/X newsgroup?

No, Cygwin/X does not have a newsgroup; however, we do have a mailing list. See Q: 1.8.

1.8. Is there a Cygwin/X mailing list?

Yes, Cygwin/X has a mailing list, namely, cygwin-xfree@cygwin.com. Visit the Cygwin Mailing Lists page to subscribe to cygwin-xfree@cygwin.com as well as to read and search an online archive of the mailing list traffic.

Tip: Post your X-related inquires to cygwin-xfree@cygwin.com only; do not post nor cross post your inquires to the cygwin@cygwin.com mailing list. Cygwin's mailing list is only for Cygwin API related inquires that are not handled by another more-specific list.

2. Installation

2.1. What versions of Windows does Cygwin/X run on?

Cygwin/X supports Windows 95, Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, and Windows Server 2003 as of 2003-12-29.

Cygwin/X requires Cygwin to compile and run. Cygwin is not, as of 2003-12-29, available on Microsoft Windows CE, therefore Cygwin/X is not currently available on Microsoft Windows CE.

2.2. How is Cygwin/X installed?

The Cygwin/X User's Guide thoroughly documents the installation process. Installation is performed through Cygwin's setup.exe program.

3. Configuration

3.1. Is there an XF86Config file?

The configfile support was only limited. Because of this and extra dependencies it was removed again. But most of the options which were configurable in the configfile are now available as commandline options. For more information on configuring other keyboard layout see Q: 4.1.1.

3.2. What are the command line arguments for XWin.exe?

The Cygwin/X User's Guide documents the command line arguments for XWin.exe.

3.3. Why does XWin.exe ignore the display depth that I pass on the command line?

When running in windowed mode or GDI-based fullscreen mode, XWin.exe must run the X Server at whatever display depth Windows is currently using; in these cases the display depth passed on the command line is ignored. XWin.exe only uses the display depth parameter when running in a DirectDraw-based fullscreen mode, as DirectDraw allows applications to change the display resolution and depth when running in fullscreen mode.

3.4. I have a two button mouse, can I emulate a three button mouse?

Yes. Pass the -emulate3buttons timeout_in_milliseconds parameter to XWin.exe, where timeout_in_milliseconds is the, optional, maximum number of milliseconds between a button release and opposite button press that will trigger an emulated third button press.

3.5. Is there a Focus-Follows-Mouse feature (Auto-Focus)?

This is a setting of the windowmanager used. The default windowmanager twm has no such feature. But with fvwm2 this can be achieved with the this configuration entry:
Focus FocusFollowsMouse
Other windowmanagers (eg. windowmaker) have similar features too.

3.6. The option -nounixkill has no effect. How can i prevent the server shutdown an Ctrl-Alt-BackSpace?

There is a keybinding to Ctrl-Alt-BackSpace which is named TerminateServer. Remove this binding and Ctrl-Alt-BackSpace will have no effect.
xmodmap -e "keycode 22 = BackSpace"

4. Internationalization

4.1. Keyboard support

4.1.1. How do I use a non-U.S. keyboard layout?

Some keyboard layouts are configured according to the Windows keyboard settings. For these layouts no special change is needed. For all other layouts there is the possibility to configure the layout via commandline options.

The mainoption for changing the layout is -xkblayout countrycode where countrycode is in most cases the 2 character code which also represents the country in internet adresses (e.g. Australia = au, Deutschland = de, France = fr, Japan = jp, United Kingdom = uk).

Other options for tweaking the XKB layout are -xkbmodel,-xkbvariant, -xkboptions and -xkbrules. These are the counterparts for the similar named options known from the XF86Config file.

If the loading fails, check Q: 4.1.5.

4.1.2. Where can I find an xmodmap for my non-U.S. keyboard layout?

You can try using an xmodmap file for your keyboard layout from a GNU/Linux distribution (e.g. RedHat).

Or, you can use xkeycaps to automatically generate a modmap for one of over 208 different layouts. See the xkeycaps home page to download and for more information.

4.1.3. How do I get my non-U.S. keyboard modmap to be installed when using xdmcp?

4.1.4. Logging into AIX via XDMCP causes the keyboard to function as if AltGr is permanently pressed.

[Pavel Rybnicek] The X Keyboard Extension doesn't work with AIX. The X Keyboard Extension is enabled by default, so you must disable it with the -kb parameter. An example command line follows.

XWin.exe -kb -query aix_hostname_or_ip_address

4.1.5. Loading XKB keymaps fails

First check if you are able to change the server to another layout via XKB. The german layout will be good for testing:

setxkbmap de -model pc105
This worked if pressing "Shift" and "8" produces "(" instead of "*". If it worked then you can skip the next paragraph.

There is currently a problem with the /tmp directory mounted in textmode. You can change the setting to binmode with:

mount -b "$(cygpath -m /tmp)" /tmp
If this fails with an errormessage stating unsufficient rights, try

mount -b -u "$(cygpath -m /tmp)" /tmp

Not all keyboard layouts are tested very well and some contain errors or do not work at all. To test if the compiling of your layout works start

xkbcomp -w 3 -xkm -m de /etc/X11/xkb/keymap/xfree86 localhost:0.0
(replace the "de" with your layout code). This may produce warnings, but must not produce errors. If there are errors then please report them to the mailinglist.

4.1.6. I have Windows XP with Powertoys installed and AltGr does not work. What can I do?

This problem is solved in recent Cygwin/X releases. Use cygwin setup to upgrade the XFree86-xserv package.

4.1.7. AltGr does not work properly when connecting to other unices or to old XFree86.

The older X11 releases on the various commercial unices define the AltGr key as ModeSwitch, MetaR, AltR or similar. Cygwin/X expects it to be ISO_Level3_Switch. For reasons unknown to us this is reset when loggin into the remote host. As far as we don't have access to such a machine we are unable to track this down and find a reason.

Sometimes it does help to run

DISPLAY=:0.0 setxkbmap languagecode
from a cygwin shell. For more information see Q: 4.1.1..

4.2. Display problems

4.2.1. How do I get bash to display accents and/or umlauts?

(Heinz Peter Hippenstiel) Add the following lines to .inputrc in your Cygwin home directory (e.g. /home/harold/):


set meta-flag on
set output-meta on # to show 8-bit characters
set convert-meta off # to show it as character, not the octal representation

# Mapping for German umlauts
"\M-a": "ä"
"\M-A": "Ä"
"\M-o": "ö"
"\M-O": "Ö"
"\M-u": "ü"
"\M-U": "Ü"
"\M-s": "ß"
# (TODO: Mapping for accents?)

4.2.2. How do I put bash into "8 bit" mode?

5. Remote connections

5.1. X11Forwarding does not work with OpenSSH under Cygwin

A1:

OpenSSH 3.8 enables trusted X11 forwarding by default when connecting to an ssh server that supports trusted X11 forwarding. Most ssh servers for GNU/Linux are versions of OpenSSH that do support trusted X11 forwarding, so using OpenSSH 3.8 from Cygwin will result in a connection that uses trusted X11 forwarding by default. You will quickly notice that this is the case if most of your X applications are now killed when you try to copy and paste or if xdpyinfo returns only a fraction of the supported extensions that it does if run locally.

It is easiest to just override trusted X11 forwarding by passing -Y to ssh in place of -X. The -Y does the same thing as -X, but it disables trusted X11 forwarding for the current connection.

A2:

Before establishing the ssh connection the xserver must be started and the environment variable DISPLAY must be set for ssh.

$ DISPLAY=localhost:0.0
$ export DISPLAY
$ ssh -X remotehost
or

$ DISPLAY=localhost:0.0 ssh -X remotehost

A3:

Make sure you're not starting ssh with the parameter -x. This disables X11Forwarding. The correct parameter is -X (uppercase).

A4:

Check that X11Forwarding is not disabled in the openssh client configuration.

The configfiles are by default ~/.ssh/config and /etc/ssh_config. The file in the home directory overrides settings in the global one.

The configfile is split into various sections starting with "Host wildcard". The section applies to all hosts where wildcard matches the hostname.

If this section contains an entry "ForwardX11 no" then X11Forwarding is disabled. To enable it change the entry to:


ForwardX11 yes

Starting with OpenSSH 3.8 you will need the switch "ForwardX11Trusted yes" in the client configuration to allow remote clients full access to the xserver. Without it some clients will fail with a similar error:

 X Error of failed request: BadAtom (invalid Atom parameter)
  Major opcode of failed request: 18 (X_ChangeProperty)
  Atom id in failed request: 0x114
  Serial number of failed request: 370
  Current serial number in output stream: 372

A5:

Check that X11Forwarding is not disabled in the ssh server configuration.

The configfile is by default /etc/ssh/ssh_config. If there is an entry "X11Forwarding no" then X11Forwarding is disabled.

If you have write access to the config file then change it to

X11Forwarding yes
Otherwise ask your you admin to change this for you.

6. XDMCP connections

6.1. XDMCP fatal error: Session declined No valid address

Cygwin/X is sometimes unable to determine which local network interface's address should be reported to the XDMCP server; in these cases you need to pass -from local_host_name_or_ip_address to XWin.exe to specify which interface address to report.

6.2. I get no login screen when using -query

[Mika Laitio] For security reasons, XDMCP is not enabled by default on most Linux/UNIX/*NIX/*BSD distributions (RedHat, Mandrake, SuSE, FreeBSD, NetBSD, etc.) by default. You have to manually enable remote logins to your X Display Manager (xdm, kdm, or gdm). The location of the proper config file is distribution/OS dependent, but a short list of known config file locations is given in Table 1. You must change the line:

[Xdmcp]
Enable=false
to:

[Xdmcp]
Enable=true

Table 1. Known XDM Configuration File Locations

Distribution/OSVersionDisplay ManagerLocation
Linux Mandrake8.1kdm/usr/share/config/kdm/kdmrc
Debian GNU/LinuxUnstablekdm/etc/kde3/kdm/kdmrc
Debian GNU/LinuxUnstablegdm/etc/X11/gdm/gdm.conf

XDMCP will not work correctly if you have a personal firewall installed or the built-in firewall of Windows is activated.

The XDMCP protocol will send and receive data on port 177/UDP. But the actual connections will be made to the local port 6000/TCP. It is safe to allow connections since the xserver has an own security layer. An overview of used ports is given in Table 2.

Table 2. Ports used with XDMCP connections

PortProtocolDirectionComment
177UDPIncoming/OutgoingActual XDMCP connection
6000+displayTCPIncomingConnection for X11 clients. display is usally 0 except you specify it on the commandline.

6.3. I get no login screen for Solaris

See also Q: 6.4. and Q: 6.5.

[David Dawson] For whatever reason, certain versions of Solaris need fonts that are not provided by Cygwin/X; the result is that you may see the Solaris background tile and the hourglass cursor, but the XDM login prompt will never appear. The simplest solution is to point Cygwin/X at the font server that is usually running on the Solaris machine. You'll need a command line similar to the following to start your XDMCP session and to connect to the Solaris font server:

XWin.exe -query solaris_hostname_or_ip_address -fp tcp/solaris_hostname_or_ip_address:7100

Note: The -fp parameter is a general X Server parameter, it is not specific to Cygwin/X; therefore, the -fp is documented in the X Server manual page. For additional information about fonts, see Fonts in X11R6.7.

The standard port number for a font server is 7100, however, you may need to ask your system administrator what the font server port number is if you cannot connect to a font server on port 7100. It is also possible that your Solaris machine is not running a font server, in which case you will need to consult your Solaris documentation for instructions on how to run a font server.

6.4. XDMCP freezes with remote Solaris machine!

See also Q: 6.3. and Q: 6.5.

Solaris appears to not support certain display bit depths, such as 24 bits per pixel. Change your Windows display bit depth to 8, 16, or 32 and try logging in again. File a complaint with Sun if this issue is important to you, or change your Solaris machines to use XFree86 instead of the Solaris X Window System.

6.5. Login to CDE on Solaris via XDMCP hangs Cygwin/X.

See also Q: 6.3. and Q: 6.4.

Install the recommended set of patches for your version of Solaris.

6.6. Where can I find more information about XDMCP.

See the Linux XDMCP HOWTO for more information about XDMCP.

7. Troubleshooting

7.1. Is there a log file that I can look at for diagnostic information and error messages?

Yes. The Cygwin/X log file is located at /tmp/XWin.log. You will find solutions to the most common error messages in the Section called Error and Warning Messages.

7.2. I have a specific error message, what does it mean?

See the Error and Warning Messages section for help with specific error messages. Return to this section if you do not find a specific answer for the error message that you have.

7.3. I have a specific error message that is not addressed in the Error and Warning Messages section.

Search the Cygwin/X mailing list archives to see if the error message has already been reported and/or addressed. Report the error message to the Cygwin/X mailing list, how the error message was caused, and the behavior of the X Server after the error message was generated (exit, freeze, etc.), only if the error message has not been reported, if the circumstances that produced the error message are significantly different from other reports, or if you have additional information regarding the error message to contribute.

7.4. My bug report the Cygwin/X mailing list was ignored. What do I do now?

Some bug reports are deliberately ignored by project members if the bug in question was recently dealt with; did you search the mailing list archives for a solution to your problem before submitting your bug report? Some bug reports are ignored if they do not contain sufficient information to understand the situation that produces the bug; did your bug report have enough information? Some bug reports are missed or forgotten, thus some valid bug reports do not receive a reply; simply resubmit such bug reports that have not received a response within 7 days of submission.

7.5. Cygwin/X has very poor performance. What's the reason?

Most likely you have installed some kind of personal firewall, VPN software or any other software that modifies the TCP/IP stack of Windows. Especially Webwasher and some other filtering software are known to slow down the network traffic.

[Dr. Edward Wornar] Certain programs that are installed by various drivers and software packages can consume an incredible amount of system resources and processing time. One known example of such a program is ATI2evxx.exe, a utility installed with some ATI Technologies graphics card drivers. Answers That Work has information on ATI2evxx.exe on their Task List Programs - A page. You may want to try disabling, one-by-one, ATI2evxx.exe and other such programs until you find the program that is causing the slowdown.

7.6. I have Microsoft Services for Unix installed and can't type anything. Help me!!!

Microsoft Services for Unix set some environment variables which points Cygwin/X to outdated or not existing files. These variables are
XAPPLRESDIR
XCMSDB
XKEYSYMDB
XNLSPATH
To have Cygwin/X work correctly you have to unset at least XKEYSYMDB.

Reported by Juan Medina, Pavel Rozenboim

7.7. Cygwin/X is extremely slow, especially when using XDMCP to connect to remote machines.

see Q: 7.5..

8. Error and Warning Messages

8.1. IBM ThinkPad's with a TrackPoint mouse doesn't allow simulated mouse wheel scrolling.

[Gerald S. Williams] The TrackPoint driver tries to send scroll up/down messages to the default scrollbar in a window. Cygwin/X does not use Windows scrollbars for X Client windows, so we must configure the TrackPoint driver to send standard WM_MOUSEWHEEL messages to the Cygwin/X window. This can be done by editing the TrackPoint configuration file that can be found either in %SYSTEM_ROOT%\System32\tp4table.dat or %SYSTEM_ROOT%\System32\tp4scrol.dat. Add the following to the "Pass 0 rules"section:

; X Windows
*,*,XWin.exe,*,*,Cygwin/X,WheelStd,0,9

8.2. _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

This warning message can be ignored; it does not cause any known problems.

8.3. error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy

This error is harmless.

8.4. Fatal server error: could not open default font 'fixed'

This error occurs for one of two reasons:

  1. You do not have the xorg-x11-fnts package installed. This is rarely the problem; but in the event that it is the problem, just rerun Cygwin's setup.exe, select the xorg-x11-fnts package and install it.

  2. The mount point for /usr/X11R6/lib/X11/fonts was invalid at the time that Cygwin's setup.exe installed the xorg-x11-fnts package. You can confirm that this is the problem by running mount from a Cygwin shell and checking the disk path returned for the /usr/X11R6/lib/X11/fonts mount point. You have this problem if the mount point is not pointing to a valid folder on your system, or if there are not about 400 files in the misc/ subdirectory of that folder on your system.

    Note: You cannot reliably fix this problem by deleting your Cygwin installation and reinstalling it. The mount points that Cygwin was using will be left in your system settings and the invalid mount point for /usr/X11R6/lib/X11/fonts will be used again when you perform the reinstallation. You SHOULD follow the instructions below to fix the problem.

    To fix the problem, perform the following steps:

    1. Open a Cygwin shell and run umount /usr/X11R6/lib/X11/fonts.

    2. Close the Cygwin shell.

    3. Run Cygwin's setup.exe.

    4. For each of the following packages, if they are marked Keep, then select Reinstall, otherwise leave them as they are:

      • xorg-x11-f100

      • xorg-x11-fcyr

      • xorg-x11-fenc

      • xorg-x11-fnts

      • xorg-x11-fscl

    5. Allow Cygwin's setup.exe to download and reinstall the fonts packages. The key to fixing this problem is that the files were previously untarred into an invalid location; removing the mount point for the fonts directory should result in the files being untarred to a valid location.

8.5. Could not init font path element /usr/X11R6/lib/X11/fonts/*/, removing from list!

These warnings are generally harmless since they indicate that default search paths for fonts do not actually contain fonts; this is only a problem if the misc path does not contain fonts and/or all of the paths do not contain fonts. For example, this message is generally useless if it only notifies you that /usr/X11R6/lib/X11/fonts/100dpi (optional 100 dpi fonts) is being removed.

If you are getting these message and the X Server is also failing to start, then see Q: 8.4. for information on how to fix your fonts.

8.6. The procedure entry point _check_for_executable could not be located

Programs that you are attempting to use were compiled against a newer version of Cygwin than is currently on your system. Run Cygwin's setup program to update your installation to the latest version.

8.7. Exception: STATUS_ACCESS_VIOLATION

cygwin1.dll uses a shared memory section amongst all loaded copies of cygwin1.dll; unfortunately, the layout and usage of the shared memory section changes between versions of cygwin1.dll. Loading two different versions of cygwin1.dll will cause the shared memory section to become corrupted, which almost always results in an Exception: STATUS_ACCESS_VIOLATION. You must search your filesystem(s) and remove all copies of cygwin1.dll except the copy in /bin. You must remove the different versions of cygwin1.dll even if they are not in your path, as programs that depend on cygwin1.dll attempt to load the file from the local directory before searching other paths; thus, it is rather easy, and common, for multiple versions of cygwin1.dll to become loaded at the same time if they exist on a particular system.

8.8. Xlib: connection to "local_host_name_or_ip_address:0.0" refused by server Xlib: Maximum number of clients reached

Cygwin/X queries getdtablesize () for the maximum number of client connections allowed; by default Cygwin returns 32 from getdtablesize (). Cygwin/X Server Test Series release Test44, released on 2001-08-15, changes the maximum number of clients from 32 to 1024 by passing the square of getdtablesize () to setdtablesize ().

8.9. XIO: fatal IO error 104 (Connection reset by peer) on X server "127.0.0.1:0.0"

See Q: 8.8.

8.10. Cannot Open Display: 127.0.0.1:0.0

Certain classes of software, such as that used for Virtual Private Networking and fire-walling may cause the IP address 127.0.0.1, or other local adapter addresses, to be redirected, to become inoperable in some way, or to be operated in a manner that violates the defined operation of IP address.

As a potential remedy, try removing all instances of such software; this may not always fix the problem though, as some software may leave artifacts even after uninstallation is completed. The only way to be sure that you have not found a Cygwin/X bug is to install Windows on a freshly formatted hard drive, followed by Cygwin and Cygwin/X, and finally add your other software one application at a time until Cygwin/X stops working.

Some products that have been reported to cause problems:

Note: These products may not cause problems in all configurations. However, the Cygwin/X project has neither the time, ability, nor resources to help you correctly configure your third-party software.

  • Aventail Connect

  • Zonealarm PC Firewall from Zonelab

8.11. Out of environment space

Increase your Windows environment space by following the instructions provided by Microsoft.

8.12. Too many parameters

9. Porting Software

9.1. Is there a list of software that has been ported to Cygwin/X?

Yes, see the Cygwin/X - Ported Software page.

9.2. How do I start porting software to Cygwin/X?

Cygwin/X provides a software interface that is very similar to the software interface provided by GNU/Linux and other UNIX systems. Most software packages will compile on Cygwin/X without any changes at all. To begin with, try to compile a given software package following that package's compilation instructions for GNU/Linux.

9.3. Are there common problems encountered when porting software to Cygwin/X?

One common problem encountered when porting software to Cygwin/X is due to Cygwin's inability to distinguish between files with the same name but different capitalization (e.g. XvMC.h and xvmc.h), which is due to a Windows' limitation.

Example 1. Include Problems

This example is based off an error that actually occurred in the source code tree in xc/programs/Xserver/Xext/xvmc.c. xvmc.c included XvMC.h, as shown below:


#include "XvMC.h"

The intention was to include the file xc/include/extensions/XvMC.h. Unfortunately, there was a file named xc/programs/Xserver/Xext/xvmc.h that ended up getting included instead of the desired file, because the precompiler searched the local directory, xc/programs/Xserver/Xext/, before searching the rest of the include path. Cygwin can't distinguish between XvMC.h and xvmc.h, so xvmc.h ended up being included in xvmc.c. The build process on Cygwin broke because the contents of XvMC.h were entirely different than the contents of xvmc.h.

The solution was to change the include to specifically reference the desired header:


#include "../../../include/extensions/XvMC.h"

10. Contributing

10.1. Are there step-by-step instructions for contributing to Cygwin/X?

Yes. The Cygwin/X Contributor's Guide has step-by-step instructions for obtaining the source, building the source, building debug versions of the source, and even cross-compiling under Linux.

10.2. Are there editors for Windows that understand and preserve UNIX end of line characters?

Yes. Emacs and XEmacs are available for Windows; they both understand and preserve UNIX end of line characters.

10.3. How should I generate patches for Cygwin/X?

Only submit patches that have UNIX end of line characters. See Q: 10.2. for information on editors for Windows that are aware of UNIX end of line characters.

Generally it is better for us if you generate your patches against the X.org CVS tree. For example, run cvs -z4 diff -U3 hw/xwin/ from xc/programs/Xserver/ to generate a diff file for all the modified files in hw/xwin/. CVS is smart enough to only generate diffs for files that are in the CVS repository; for example, CVS diff will not create diffs for Emacs temporary files.

In the case that you have modified a single file, create the diff with cvs -z4 diff -U3 file_name.

10.4. Where do I submit patches for Cygwin/X?

Submit patches for Cygwin/X to the cygwin-xfree@cygwin.com mailing list.

See Q: 10.3. for more information on generating patches.

10.5. Why doesn't the X Window System use GNU's autoconf?

The X Window System does not use autoconf because autoconf was not available when the X Window System was started in 1984.

10.6. What compiler does Cygwin/X use, and which compilers are supported?

Cygwin/X uses the gcc compiler from the Free Software Foundation. Cygwin/X source code is mostly ANSI C compliant, but we cannot guarantee that Cygwin/X will compile with any other compiler, nor can we afford the time to support compilers other than gcc.

See the GCC Home Page for more information on gcc.

10.7. Is cross-compiling from a non-Cygwin platform supported?

Cross-compiling from a non-Cygwin platform is described in the Cygwin/X Contributor's Guide

10.8. Where can I get help for installing DocBook on Cygwin?

11. Licenses, Patents, Trademarks, and Copyrights

11.1. What licenses apply to Cygwin/X source code?

Cygwin/X proper isn't covered by a single license, as Cygwin/X is made up of two parts that are covered by distinct licenses: Cygwin and the X Window System.

See Q: 11.2. and Q: 11.3. for more information regarding the licenses that apply to Cygwin/X.

11.2. What licenses apply to the X Window System source code?

X Window System source code is generally licensed under an X11 style license, which is certified by the Free Software Foundation as compatible with the GNU GPL.

11.3. What license applies to Cygwin source code?

Cygwin source code is licensed under a modified version of the GNU GPL. Cygwin's license modification specifically allows third-party software under an open source license to be linked with Cygwin without requiring that the source code for the third-party software be distributed under the terms of the GNU GPL. Cygwin's developers went to great trouble to obtain this modification and should be thanked for doing so, as without it the modification, Cygwin/X linking to Cygwin would be the subject of endless discussion.

11.4. Whom holds the copyright on the Cygwin/X source code?

Cygwin/X proper doesn't have a single copyright holder, as Cygwin/X is made up of two parts, namely Cygwin and the X Window System; each part follows a different scheme in regards to whom will hold the copyright on source code.

See Q: 11.5. and Q: 11.6. for more information regarding whom holds the copyright on Cygwin/X source code.

11.5. Whom holds the copyright on the X Window System source code?

Each source code file in the X Window System typically has its own license and copyright statement. Therefore, there is not a general rule for determining whom holds the copyright on a particular X Window System source file, as each author is free to assign the copyright to someone else, to some group, or to keep the copyright themselves. You must inspect the source code file in question to determine whom holds the copyright for that file.

11.6. Whom holds the copyright on the Cygwin source code?

RedHat owns the copyright on the Cygwin source code. RedHat requires that copyright be assigned to RedHat for non-trivial changes to Cygwin. You must fill out a copyright transfer form if you are going to contribute substantial changes to Cygwin.

11.7. What license applies to Motif?

Motif is a closed source product produced by The Open Group. However, The Open Group released Open Motif on 2000-05-15 under a public license, The Open Group Public License, that allows Open Motif to be distributed with and used on Open Source platforms. As of 2001-07-10, Cygwin/X does not qualify as a platform that Open Motif can be distributed with and used on. However, the Open Motif FAQ states, "[...] we hope to be able to make a distribution under a license complying with the Open Source guidelines sometime in the future. For now this is as close as to Open Source as we could get."

11.8. Isn't "XWin" trademarked by StarNet Communications?

No. A quick search at the United States Patent and Trademark Office for "XWin" turns up one dead record and one live record. The live record is for a logo belonging to a rock crusher manufacturer based out of Belgium. Neither trademark affects Cygwin/X, as the dead record is no longer enforceable, while the live record is in an unrelated and distinct industry; there cannot be confusion between rock crushers and computer programs.