Cygwin/X Frequently Asked Questions

Harold L Hunt, II

Alexander Gottwald


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. What does :0.0 mean?
1.7. Why port the X Window System to Microsoft Windows?
1.8. Is there a Cygwin/X newsgroup?
1.9. 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?
3.7. I have a multihead system. Do I need special options to make it work?
3.8. I have a firewall. Is there anything I have to take care of?
4. Internationalization
4.1. Keyboard support
4.1.1. How do I use a non-U.S. keyboard layout?
4.1.2. I there a way to add a layout to the list of autodetected?
4.1.3. Where can I find an xmodmap for my non-U.S. keyboard layout?
4.1.4. How do I get my non-U.S. keyboard modmap to be installed when using xdmcp?
4.1.5. Logging into AIX via XDMCP causes the keyboard to function as if AltGr is permanently pressed.
4.1.6. Loading XKB keymaps fails
4.1.7. I have Windows XP with Powertoys installed and AltGr does not work. What can I do?
4.1.8. 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
5.2. Why do remote programs crash with X Error of failed request: BadAtom?
6. XDMCP connections
6.1. XDMCP fatal error: Session declined No valid address
6.2. Why does Cygwin/X report AUDIT: client 1 rejected from IP remotehost?
6.3. I get no login screen when using -query
6.4. XDMCP does not work with Mandrake 8.1
6.5. Why does GDM not work with -clipboard
6.6. I get no login screen for Solaris
6.7. XDMCP freezes with remote Solaris machine!
6.8. Login to CDE on Solaris via XDMCP hangs Cygwin/X.
6.9. Where can I find more information about XDMCP.
7. Troubleshooting
7.1. Cygwin/X failed with "Fatal Error". What does this mean?
7.2. Is there a log file that I can look at for diagnostic information and error messages?
7.3. I have a specific error message, what does it mean?
7.4. I have a specific error message that is not addressed in the Error and Warning Messages section.
7.5. My bug report the Cygwin/X mailing list was ignored. What do I do now?
7.6. Why does Cygwin/X freeze right after startup?
7.7. Cygwin/X has very poor performance. What's the reason?
7.8. I have Microsoft Services for Unix installed and can't type anything. Help me!!!
7.9. Cygwin/X is extremely slow, especially when using XDMCP to connect to remote machines.
7.10. IBM ThinkPad's with a TrackPoint mouse doesn't allow simulated mouse wheel scrolling.
7.11. Why is the root window not shown in normal mode?
7.12. Why is the cross the default cursor in multiwindow mode?
7.13. How can I adjust the linewidth in bash after resizing XTerm?
7.14. Why do some menus not work if Num-Lock is on?
8. Error and Warning Messages
8.1. _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
8.2. error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
8.3. Duplicate invocation on display number: 0. Exiting.
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. cygX11-6.dll not found after installation or upgrade
8.8. Exception: STATUS_ACCESS_VIOLATION
8.9. Xlib: connection to "local_host_name_or_ip_address:0.0" refused by server Xlib: Maximum number of clients reached
8.10. XIO: fatal IO error 104 (Connection reset by peer) on X server "127.0.0.1:0.0"
8.11. Cannot Open Display: 127.0.0.1:0.0
8.12. Out of environment space
8.13. 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. Who holds the copyright on the Cygwin/X source code?
11.5. Who holds the copyright on the X Window System source code?
11.6. Who 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

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.

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 related inquires that are not handled by another more-specific list.

3. Configuration

4. Internationalization

4.1. Keyboard support

4.2. Display problems

(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?)

5. Remote connections

A1:

OpenSSH 3.8 enables untrusted X11 forwarding by default when connecting to an ssh server that supports untrusted X11Forwarding. Most ssh servers for GNU/Linux are versions of OpenSSH that do support untrusted X11Forwarding, so using OpenSSH 3.8 from Cygwin will result in a connection that uses untrusted X11Forwarding 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 untrusted X11Forwarding by passing -Y to ssh in place of -X. The -Y does the same thing as -X, but it enables trusted X11Forwarding 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 -Y remotehost
or

$ DISPLAY=localhost:0.0 ssh -Y remotehost
The parameter -Y enables trusted X11Forwarding. This is available since OpenSSH 3.8. If you have an older version of ssh you will have to use -X.

A3:

Make sure you're not starting ssh with the parameter -x (lowercase). This disables X11Forwarding.

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

The commandline switch -Y does the same.

A5:

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

The configfile is by default /etc/ssh/sshd_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.

Starting with OpenSSH 3.8 you will need to set "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

The commandline switch -Y does the same. See also Q: 5.1.

6. XDMCP connections

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.

Disabled XDMCP on servers

[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
or for xdm style configuration:

DisplayManager.requestPort:     0
to:

!DisplayManager.requestPort:     0

XDMCP and firewalls

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.

[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.

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.

See also Q: 6.6. and Q: 6.7.

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

7. Troubleshooting

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. Please include /tmp/XWin.log in your mail. This may help us identify the cause of your problem quicker.

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.

8. Error and Warning Messages

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.

    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:

    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.

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

9. Porting Software

10. Contributing

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.

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.

11. Licenses, Patents, Trademarks, and Copyrights

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.

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."

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.