Cygwin X Faq
Cygwin X Faq
Questions
2023-02-18 18:22
1
Cygwin/X Frequently Asked Questions
• :0.0 or unix:0.0
This names a local X server and the communication uses the UNIX domain sockets.
• hostname:0.0
This names a remote X server and the communication uses the TCP/IP network.
2
Cygwin/X Frequently Asked Questions
2. Installation
1. Try removing the stale lock file using rm -f /tmp/.Xn-lock where n is the display number. If
this fails due to insufficent permissions, you must either get the owner or a user with
Adminstrator rights to remove the stale lock file.
2. Try starting the server with the -nolock option. (See Q: 4.2.)
Technical details: The X server attempts to create a lock file in /tmp by creating the file under a
temporary name, then renaming it to the proper name (by hard linking it under the correct name,
then unlinking it from the temporary name). If this rename fails it attempts to read the existing lock
file to determine the pid of an already running server. The FAT filesystem does not support
hardlinks so this operation cannot succeed. On NFTS filesystems, the failure case appears to be
that lock file was created successfully, but the rename failed due to a stale lock file created by a
user with Adminstrator rights.
3
Cygwin/X Frequently Asked Questions
2.4. Nothing appears to happen when I try to start the X server using the "XWin Server" start
menu shortcut.
A1:
This answer should be obsolete.
Task manager shows the startxwin.exe process starting, spawning XWin.exe and xterm.exe, but
no windows are shown. Running startxwin.exe from a bash shell works correctly. This is caused
by having tty in the CYGWIN environment variable set through the Windows control panel.
Removing tty resolves this issue.
If you really need CYGWIN=tty for working with cmd.exe windows, you’ll have to arrange to set
that by some other means before invoking cygwin.bat.
A2:
Try running startxwin from a bash shell in the mintty terminal emulator, it should output some
error message which should indicate why it’s not able to start.
Note: For technical reasons, the output of XWin doesn’t appear in cmd.exe windows unless
the CYGWIN environment variable set through the Windows control panel contains tty , so to
ensure the output can be seen, use mintty.
3. Upgrade
3.2. I upgraded my X server and now I can’t type anything into any X application
This question should be obsolete.
Launch the X server via the shortcut under "Cygwin-X" on the start menu.
Technical details: The startxwin.bat script used to set several enviroment variables used by the X
server to specify the location of files it needs to access. Specifically this batch file would set
XKEYSYMDB to /usr/X11R6/lib/X11/XKeysymDB. This file was moved to
/usr/share/X11/XKeysymDB. The keyboard won’t work if XKEYSYMDB points to a non-existent
file.
If you are (perhaps unintentionally) using a copy of the old startxwin.bat (perhaps under another
name) to start the X server, remove the environment variables XAPPLRESDIR, XCMSDB, XNLSPATH
and XKEYSYMDB from it, or (preferrably) use the updated startxwin.
If echo $XKEYSYMDB outputs something, you have something else setting XKEYSYMDB in your
environment. Find it and remove it.
4
Cygwin/X Frequently Asked Questions
These variables were always being set to the defaults, so they can simply be removed. See Q: 8.8.
for the reason why you might need to set them.
5
Cygwin/X Frequently Asked Questions
3.8. ssh -X now says "Warning: untrusted X11 forwarding setup failed: xauth key data not
generated"
See Q: 6.1. and following. See point 3 in this mail
(http://cygwin.com/ml/cygwin-xfree/2008-11/msg00154.html). Use ssh -Y.
Technical details: ssh tried to run xauth generate to create a untrusted cookie for the session,
which failed because the server isn’t compiled with the XCSECURITY extension built-in. Since
OpenSSH 7.2p1, ssh does not fallback to trusted forwarding, so no X11 forwarding is setup.
$ nedit
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 70 (X_PolyFillRectangle)
Serial number of failed request: some number
Current serial number in output stream: some other number
nedit needs rebuilding with a patch to work around an issue lesstif has with current X servers.
Until this happemns, you can work around the issue by adding XLIB_SKIP_ARGB_VISUALS to
your enviroment, e.g.
$ export XLIB_SKIP_ARGB_VISUALS=1
$ nedit
3.10. I start my X server with startx or xinit and now all my X windows are contained within one
large root Windows window? How do I get it back to each X window in it’s own Windows
window?
This is a deliberate change from Cygwin/X X11 R6.9 behaviour.
1. Start the X server using the "XWin Server" shortcut under "Cygwin-X" on the Start menu, or
using startxwin.
Note: If you wish to customize the X clients started when the X server starts, you can do so
using a ~/.startxwinrc script.
2. Alternatively, add the server option -multiwindow to your xinit or startx invocation, i.e.
xinit -- -multiwindow or startx -- -multiwindow
3. Alternatively, put XWin -multiwindow into ~/.xserverrc or
/etc/X11/xinit/xserverrc
6
Cygwin/X Frequently Asked Questions
A2:
For remote clients, rather than connecting over TCP/IP by explicitly setting DISPLAY and allowing
access using xhost or by disabling access control, use ssh tunnelling with ssh -Y instead. (See the
User’s Guide section on X forwarding using ssh
(http://x.cygwin.com/docs/ug/using-remote-apps.html#using-remote-apps-ssh) for more details).
A3:
Use the -listen tcp option to restore the previous behaviour, allowing the X server to open a
TCP/IP socket as well e.g. startxwin -- -listen tcp. See Q: 4.2..
4. Configuration
7
Cygwin/X Frequently Asked Questions
4.2. What are the command line options for X? How do I add command line options for X?
The Cygwin/X User’s Guide (http://x.cygwin.com/docs/ug/cygwin-x-ug.html) and man XWin
(http://x.cygwin.com/docs/man1/XWin.1.html) document the command line options for X.
To supply a command line option to X:
• If you use the start menu shortcut to start the X server, you will need to amend it’s target to add
an option, e.g. C:\cygwin\bin\run.exe --quote /usr/bin/bash.exe -l -c "/usr/bin/startxwin --
-nolock"
Note: Note that this start menu shortcut is created by the xinit package, and your changes
will be overwritten when the xinit package is updated.
• If you use startxwin, xinit or startx to start the server, run it as e.g. startxwin -- -nolock, xinit
-- -nolock or startx -- -nolock
• If you use startxwin.bat or startxwin.sh to start the server, add e.g. -nolock to the
XWin line in that script.
4.3. Why does X ignore the display depth that I pass on the command line?
When running in windowed mode or GDI-based fullscreen mode, X 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. X 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.
4.4. I have a two button mouse, can I emulate a three button mouse?
Yes. Pass the -emulate3buttons timeout_in_milliseconds parameter to X, 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.
Focus FocusFollowsMouse
8
Cygwin/X Frequently Asked Questions
If you are using the -multiwindow mode you can not set this behaviour in the window manager
but you can use the TweakUI tool to enable this feature for all windows, not limited to Cygwin/X
windows.
4.6. The option -nounixkill has no effect. How can i prevent the server shutdown an
Ctrl-Alt-BackSpace?
This question should be obsolete as the TerminateServer keybinding is no longer present by
default.
The TerminateServer keybinding can be enabled with
4.7. I have a multihead system. Do I need special options to make it work? I have a multihead
system. Why are my X-application windows white?
You should start X with the -multiplemonitors option.
Note that this option is enabled by default in -multiwindow mode.
5. Internationalization
9
Cygwin/X Frequently Asked Questions
• The XKB layout code for this layout if you know it. Please experiment with setxkbmap or
-xkblayout (as described in Q: 5.1.1.) to find an XKB layout code which works for you,
otherwise the maintainers will have to guess it.
• A description how the layout looks like. This makes it easy to identify the matching XKB
layout code. Many layouts are available from the Microsoft Global Dev
(http://www.microsoft.com/globaldev/reference/keyboards.mspx) website (It seems that
website only works with some browsers). Just add a link to your layout.
Or, you can use xkeycaps to automatically generate a modmap for one of over 208 different
layouts. See the xkeycaps home page (http://www.jwz.org/xkeycaps/) to download and for
more information.
5.1.4. How do I get my non-U.S. keyboard modmap to be installed when using xdmcp?
See Q: 5.1.1.
5.1.5. Logging into AIX via XDMCP causes the keyboard to function as if AltGr is
permanently pressed.
[paraphrased from the Xming FAQ
(http://www.straightrunning.com/XmingNotes/trouble.php)] AIX login scripts contain a call
to xmodmap (for IBM keyboards) which causes the keyboard to be incorrectly configured for
XWin. Commenting out those calls should allow you to use XWin with AIX.
The XKB extension is now always enabled in the X.Org xserver, so the previous answer to
this question of disabling the XKB extension with the -kb parameter is no longer applicable.
10
Cygwin/X Frequently Asked Questions
(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 mailing list.
5.1.7. I have Windows XP with Powertoys installed and AltGr does not work. What can I do?
This question should be obsolete.
5.1.8. AltGr does not work properly when connecting to various older commercial unices
(e.g. HP-UX, AIX) or to old XFree86.
xkeyboard-config XKB keyboard layouts generally have AltGr mapped as
ISO_Level3_Shift to access additional characters on non-english keyboards. For reasons
unknown to us, this is incompatible with some older X11 releases. We don’t have access to
such a machine, so we are unable to track this down and find a reason.
It has been reported that sometimes it helps to run
11
Cygwin/X Frequently Asked Questions
$ wget http://www.cl.cam.ac.uk/~mgk25/ucs/examples/quickbrown.txt
[...]
$ cat quickbrown.txt
$ wget http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt
[...]
$ cat UTF-8-demo.txt
If you want to be able type unicode characters into this xterm, you’ll need to configure your
bash shell not to escape 8-bit characters, see Q: 5.2.1.
$ wget http://www.cl.cam.ac.uk/~mgk25/ucs/examples/quickbrown.txt
[...]
$ cat quickbrown.txt
For reasons I don’t currently understand, the default fixed font is only capable of supplying
accented roman, hiragana and katakana characters, so if you wish to work with e.g. greek,
cyrillic, hebrew, thai, etc. you’ll need to start your xterm specifying a suitable font e.g. xterm
+lc -u8 -fn -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
To confirm this is working properly, you may try the following
$ wget http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt
[...]
$ cat UTF-8-demo.txt
For other programs run from your xterm to output properly (e.g. less, which is why cat is
used in the examples above), you may also need to set the LANG environment variable to
LL_CC .UTF-8, where LL_CC is your language and country code.
If you want to be able type unicode characters into this xterm, you’ll need to configure your
bash shell not to escape 8-bit characters, see Q: 5.2.1.
See also the main Cygwin FAQ question on unicode support in Cygwin
(http://cygwin.com/faq/faq.html#faq.using.unicode)
6. Remote connections
12
Cygwin/X Frequently Asked Questions
A2:
Before establishing the ssh connection the xserver must be started and the environment variable
DISPLAY must be set.
$ DISPLAY=:0.0
$ export DISPLAY
$ ssh -Y remotehost
or
A3:
Make sure you’re not starting ssh with the option -X . Since OpenSSH 7.2p1, ssh does not fallback
to trusted forwarding, option -Y , so no X11 forwarding is setup. Use ssh -Y.
Make sure you’re not starting ssh with the option -x (lowercase). This disables X11 forwarding.
A4:
Check that X11Forwarding is not disabled in the ssh 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
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
13
Cygwin/X Frequently Asked Questions
The OpenSSH server must be restarted or SIGHUP’ed to re-read the configuration file after it is
changed. Otherwise, ask your administrator to change this for you.
A6:
[Frederick W. Wheeler] If the remote machine is a Windows machine using Cygwin OpenSSH
server, make sure the Cygwin xauth package is installed on the remote machine. The OpenSSH
server needs to be able to run xauth to do X11 Forwarding.
6.2. Why do remote programs crash with an X Error of failed request: BadAtom? Why do remote
programs exit when you try to copy and paste?
This question should be obsolete since the SECURITY extension is now disabled
OpenSSH 3.8 enables untrusted X11Forwarding by default when connecting to an ssh server that
supports it.
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, X applications fail with an error similar to that below, or if xdpyinfo returns
only a fraction of the supported extensions that it does if run locally.
6.3. I’m confused about the difference between trusted and untrusted X11 forwarding. What does
"Warning: untrusted X11 forwarding setup failed: xauth key data not generated" mean? Why is the
SECURITY extension disabled?
The warning means that ssh is going to use trusted X11 forwarding because untrusted X11
forwarding depends on the SECURITY extension, which isn’t built into the X server and has been
disabled by default upstream.
Trusted X11 forwarding means that you trust the server that you wish to ssh into. The X server will
allow remote clients to do whatever a local client would be able to do to your X session, for
example, monitor your keypresses and take a screenshot. Such programs could be run by a
malicious or compromised root user on the ssh server, or under your account if it was
compromised on the ssh server.
14
Cygwin/X Frequently Asked Questions
Starting with OpenSSH 3.8, untrusted forwarding is the default when X forwarding is requested
using the -X command line option and you need to use the option -Y or specify
“ForwardX11Trusted yes” in the client configuration for trusted forwarding by default.
Since OpenSSH 7.2p1, untrusted forwarding (ssh -X ) does not fallback to ssh -Y trusted
forwarding.
So why is this disabled? Untrusted X11 forwarding was meant to be a way to allow logins to
unknown or insecure systems. It generates a cookie with xauth and uses the security extension to
limit what the remote client is allowed to do. But this is widely considered to be not useful,
because the security extension uses an arbitrary and limited access control policy, which results in
a lot of applications not working correctly (e.g. not being able to cut and paste) and what is really a
false sense of security. See this mail for more on the subject
(http://cygwin.com/ml/cygwin-xfree/2008-11/msg00154.html).
(Words adapted from an email by Yaakov Selkowitz)
6.4. What does "Warning: no xauth data; using fake authentication data for X11 forwarding"
mean?
Unless you started the X server with the -auth option (typically by using startx) this warning is
expected and can safely be ignored.
6.5. Why can’t new remote X clients connect to the X server after 20 minutes?
Starting with OpenSSH 5.6, ssh enforces the ForwardX11Timeout (which defaults to 1200
seconds) when an untrusted connections is requested, even if an untrusted connection could not be
made (e.g. you used ssh -X which asks for an untrusted connection, and got the "untrusted X11
forwarding setup failed" warning). This means that no new connections to the X server can be
made 20 minutes after the ssh connection is established.
Use ssh -Y. See also Q: 6.2..
6.7. X sessions forwarded by PuTTY can’t connect. Non-cygwin local X clients can’t connect.
The X server now uses -nolisten tcp by default, which increases the security of the X server
by not opening a TCP/IP socket, only a local (UNIX domain) socket. Non-cygwin applications
cannot connect to that socket.
15
Cygwin/X Frequently Asked Questions
Use the -listen tcp option to allow the X server to open a TCP/IP socket as well, e.g.
startxwin -- -listen tcp. See Q: 4.2..
7. XDMCP connections
7.2. Why does Cygwin/X report AUDIT: client 1 rejected from IP remotehost?
The problem is most likely a wrong DNS (Network name resolution). Make sure your windows
host has a hostname which is valid from linux too and an IP address which linux can resolve to that
hostname.
If you add a line
192.168.26.1 myhost
to /etc/hosts on the XDMCP server with the IP address and the hostname of your windows host the
name resolution should work.
[Xdmcp]
Enable=false
to:
[Xdmcp]
Enable=true
DisplayManager.requestPort: 0
to:
!DisplayManager.requestPort: 0
16
Cygwin/X Frequently Asked Questions
[daemon]
KillInitClients=false
17
Cygwin/X Frequently Asked Questions
[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:
X -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
(http://x.cygwin.com/docs/man1/Xserver.1.html). For additional information about fonts, see
Fonts in X11R6.7 (http://www.x.org/archive/X11R7.5/doc/fonts/fonts.html).
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.
8. Troubleshooting
18
Cygwin/X Frequently Asked Questions
8.1. Cygwin/X failed with "Fatal Error". What does this mean?
The Fatal Error is a general error message. More specific information what caused this is available
in /var/log/xwin/XWin.0.log. Please check the common error messages in
the Section called Error and Warning Messages. If your error is not mentioned proceed with
Q: 8.4.
8.2. 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 /var/log/xwin/XWin.0.log. You will find solutions
to the most common error messages in the Section called Error and Warning Messages.
8.4. I have a specific error message that is not addressed in the Error and Warning Messages
section.
Search the Cygwin/X mailing list archives (https://cygwin.com/ml/cygwin/) to see if the error
message has already been reported and/or addressed. Report the error message to the
cygwin@cygwin.com 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 /var/log/xwin/XWin.0.log in your mail. This may help us identify the cause
of your problem quicker.
8.5. 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 (https://cygwin.com/ml/cygwin/) 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.
Rules = "xorg" Model = "pc101" Layout = "us" Variant = "(null)" Options = "(null)"
Disabling Zone Alarm will not solve this problem. You can only uninstall Zone Alarm 5 and
switch to an earlier version (4.5 is known to work) or use a different personal firewall.
Another reason is /tmp mounted in textmode. This does only happen with the -multiwindow and
-clipboard switches because of the extra threads within Cygwin/X.
You can remount /tmp to binmode with these commands:
19
Cygwin/X Frequently Asked Questions
Some online virus scanners like Symantec Antivirus do slowdown Cygwin/X a lot. They scan
every file access and network traffic which causes serious processing overhead beyond that from
the X11 protocol and the unix emulation layer.
So far there is no known solution but to disable the virus scanner completely.
[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 (http://www.answersthatwork.com/) has information on
ATI2evxx.exe on their Task List Programs - A
(http://www.answersthatwork.com/Tasklist_pages/tasklist_a.htm) 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.
8.8. 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
8.9. Cygwin/X is extremely slow, especially when using XDMCP to connect to remote machines.
see Q: 8.7..
20
Cygwin/X Frequently Asked Questions
8.10. Simulated mouse wheel scrolling doesn’t work with a TrackPoint mouse (found on IBM
laptops) or Synaptics Touchpads
[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 that can be found in
the tp4table.dat and/or tp4scrol.dat files, which are usually located in
%SYSTEM_ROOT%\System32\, %PROGRAMFILES%\Synaptics\SynTP\ or
%PROGRAMFILES%\Lenovo\Trackpoint\.
Add the following to the “Pass 0 rules”section and then restart your computer to ensure the driver
reloads it’s settings.
; X Windows
*,*,XWin.exe,*,*,*,WheelStd,0,9
to startxwin.bat
8.13. How can I adjust the linewidth in bash after resizing XTerm?
We think this question is probably obsolete
Try starting resize.
21
Cygwin/X Frequently Asked Questions
X -query foo
X :1 -query bar
X :2 -query blubb
9.4. Fatal server error: could not open default font ’fixed’
This question should be obsolete as the default font is now built into the server.
This error occurs for one of three reasons:
1. You do not have a font package which provides the default font (’fixed’) installed. This is
rarely the problem; but in the event that it is the problem, just rerun Cygwin’ setup program,
select the font-misc-misc package and install it.
2. The mount point for /usr/share/fonts/ was either invalid (does not point to a valid folder
on your system) or is a text-mode mount. You can confirm that this is the problem by running
mount from a Cygwin shell and checking the disk path returned for the
/usr/share/fonts/ mount point.
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/share/fonts/ will be used again when you perform
the reinstallation. You SHOULD follow the instructions below to fix the problem.
22
Cygwin/X Frequently Asked Questions
d. For each of the font packages, if they are marked Keep, then select Reinstall, otherwise
leave them as they are:
e. Allow Cygwin’s setup program 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.
3. You chose "DOS/text" as the "Default Text File type" during Cygwin setup, ignoring the
advice that the Default Text File Type should be left on Unix/binary unless you have a very
good reason to switch it to DOS/text.
Open a Cygwin shell and run.
umount /usr/share/fonts/
mount -f -s -b "C:/cygwin/usr/share/fonts" "/usr/share/fonts"
Reinstall your fonts
9.5. Could not init font path element /usr/share/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.
If you are getting these message and the X Server is also failing to start, then see Q: 9.4. for
information on how to fix your fonts.
• It is believed that this may have the same underlying causes as Q: 9.16.
• 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
23
Cygwin/X Frequently Asked Questions
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.
• See also this main Cygwin FAQ question
(http://cygwin.com/faq.html#faq.setup.setup-fails-on-ts) for an issue which may cause this
problem with older binaries on Terminal Server.
9.10. XIO: fatal IO error 104 (Connection reset by peer) on X server "127.0.0.1:0.0"
See Q: 9.9.
• Aventail Connect
• Zonealarm PC Firewall from Zonelab
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.
See the main Cygwin FAQ question (http://cygwin.com/faq.html#faq.using.bloda) for an
up-to-date list of software which has been known to interfere with the correct operation of Cygwin.
24
Cygwin/X Frequently Asked Questions
9.16. "fatal error - unable to remap (some dll) to same address as parent: (some hex number) !=
(some other hex number)" or "(some dll): Loaded to different address: parent(some hex number) !=
child(some other hex number)"
This is commonly caused by one of three things:
• You have run Cygwin’s setup program to do an update while some cygwin processes were
running, and then clicked on the continue option in the "In-use files detected" dialog, and then
tried to carry on using Cygwin without rebooting as advised by setup. Reboot.
• This is one of the symptoms of an application interfering with Cygwin’s fork() emulation. See
the main Cygwin FAQ question (http://cygwin.com/faq.html#faq.using.bloda) for a list of
software which has been known to interfere with the correct operation of Cygwin.
• This also caused by DLLs with conflicting base addresses preventing Cygwin’s fork() emulation
from functioning correctly. See the main Cygwin FAQ question
(http://cygwin.com/faq.html#faq.using.fixing-fork-failures) for advice.
25
Cygwin/X Frequently Asked Questions
9.17. fork: child -1 - died waiting for longjmp before initialization, retry (some number), exit code
(some hex number), errno (some other number)
This is believed to have the same underlying causes as Q: 9.16.
10.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.
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"
26
Cygwin/X Frequently Asked Questions
These are incompatible, even the headers (as the native OpenGL API has the stdcall calling
convention on x86), so you must exercise care if you have both sets of devel packages installed. An
application must be built using only one of these.
11. Contributing
11.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.
11.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 (http://gcc.gnu.org) for more information on gcc.
27
Cygwin/X Frequently Asked Questions
12.5. Who 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 who holds the copyright on a
particular X Window System source file, as each author is free to assign the copyright to someone
28
Cygwin/X Frequently Asked Questions
else, to some group, or to keep the copyright themselves. You must inspect the source code file in
question to determine who holds the copyright for that file.
Bibliography
Books
[ScheiflerGettys92] Robert W. Scheifler, James Gettys, Jim Flowers, and David Rosenthal, 1992,
1-55558-088-2, Butterworth-Heinemann, X Window System: The Complete Reference to Xlib, X
Protocol, ICCCM, and XLFD.
[Richter99] Jeffrey Richter, 1999, 1-57231-996-8, Microsoft Press, Programming Applications for
Microsoft Windows: Mastering the critical building blocks of 32-bit and 64-bit Windows-based
applications.
[Petzold99] Charles Petzold, 1999, 1-57231-995-X, Microsoft Press, Programming Windows: The
definitive guide to the Win32 API.
[McKay99] Everett N. McKay, 1999, 0-7356-0586-6, Microsoft Press, Developing User Interfaces for
Microsoft Windows: Practical and effective methods for improving the user experience.
[JonesOhlund99] Anthony Jones and Jim Ohlund, 1999, 0-7356-0560-2, Microsoft Press, Network
Programming for Microsoft Windows: Clear, practical guide to Microsoft’s networking APIs.
[Yuan01] Feng Yuan, 2001, 0-13-086985-6, Prentice Hall PTR, Windows Graphics Programming: Win32
GDI and DirectDraw.
29
Cygwin/X Frequently Asked Questions
[CohenWoodring98] Aaron Cohen and Mike Woodring, 1998, 1-56592-296-4, O’Reilly & Associates,
Inc., Win32 Multithreaded Programming: Building Thread-Safe Applications.
[CameronRosenblattRaymond96] Debra Cameron, Bill Rosenblatt, and Eric Raymond, 1996, 1991,
1-56592-152-6, O’Reilly & Associates, Inc., Learning GNU Emacs: UNIX Text Processing.
[Lewine91] Edited by Dale Dougherty, Donald A. Lewine, 1991, 0-937175-73-0, O’Reilly & Associates,
Inc., POSIX Programmer’s Guide: Writing Portable UNIX Programs.
[KernighanRitchie88] Brian W. Kernighan and Dennis M. Ritchie, 1988, 1978, 0-13-110370-9, Prentice
Hall PTR, The C Programming Language: ANSI C.
Glossary
F
firewall
Firewall software attempts to protect an internal network from intrusions originating from an
external network.
V
Virtual Private Network
Virtual Private Networks are encrypted tunnels through which private data can be safely transmitted
over a private network (e.g. the Internet).
X
X Display Manager
An X Display Manager presents a graphical login screen to X users. Often an XDM will allow the
user to select a desktop environment or window manager to be for their login session. Some X
Display Managers are xdm, gdm (Gnome Display Manager), and kdm (KDE Display Manager).
30
Cygwin/X Frequently Asked Questions
XDMCP allows XDM to process logins for users remote to the machine that XDM is running on;
login sessions will be run on the machine running XDM. For example, at a university you may use
XDMCP to login to an X session running on an engineering department computer from your dorm
room.
See Also: X Display Manager.
X11 Forwarding
Some SSH programs like OpenSSH provide a feature where in addition to the normal text channel
opened between the local and the remote host another encrypted channel is opened for the
communication between the X11 client and the X11 server. The SSH server will act as proxy-server
for the X11 clients and will forward all communication to the X11 server.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other functional and useful document
“free” in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with
or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for
the author and publisher a way to get credit for their work, while not being considered responsible for
modifications made by others.
This License is a kind of “copyleft”, which means that derivative works of the document must
themselves be free in the same sense. It complements the GNU General Public License, which is a
copyleft license designed for free software.
We have designed this License in order to use it for manuals for free software, because free software
needs free documentation: a free program should come with manuals providing the same freedoms that
the software does. But this License is not limited to software manuals; it can be used for any textual
work, regardless of subject matter or whether it is published as a printed book. We recommend this
License principally for works whose purpose is instruction or reference.
31
Cygwin/X Frequently Asked Questions
licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a
way requiring permission under copyright law.
A “Modified Version” of the Document means any work containing the Document or a portion of it,
either copied verbatim, or with modifications and/or translated into another language.
A “Secondary Section” is a named appendix or a front-matter section of the Document that deals
exclusively with the relationship of the publishers or authors of the Document to the Document’s overall
subject (or to related matters) and contains nothing that could fall directly within that overall subject.
(Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical connection with the subject or with related
matters, or of legal, commercial, philosophical, ethical or political position regarding them.
The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of
Invariant Sections, in the notice that says that the Document is released under this License. If a section
does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The
Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections
then there are none.
The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover
Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose
specification is available to the general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or
(for drawings) some widely available drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an
otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or
discourage subsequent modification by readers is not Transparent. An image format is not Transparent if
used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”.
Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input
format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming
simple HTML, PostScript or PDF designed for human modification. Examples of transparent image
formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and
edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools
are not generally available, and the machine-generated HTML, PostScript or PDF produced by some
word processors for output purposes only.
The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed
to hold, legibly, the material this License requires to appear in the title page. For works in formats which
do not have any title page as such, “Title Page” means the text near the most prominent appearance of the
work’s title, preceding the beginning of the body of the text.
The “publisher” means any person or entity that distributes copies of the Document to the public.
A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ
or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ
stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”,
“Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the
Document means that it remains a section “Entitled XYZ” according to this definition.
32
Cygwin/X Frequently Asked Questions
The Document may include Warranty Disclaimers next to the notice which states that this License
applies to the Document. These Warranty Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other implication that these Warranty
Disclaimers may have is void and has no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either commercially or noncommercially,
provided that this License, the copyright notices, and the license notice saying this License applies to the
Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this
License. You may not use technical measures to obstruct or control the reading or further copying of the
copies you make or distribute. However, you may accept compensation in exchange for copies. If you
distribute a large enough number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have printed covers) of the Document,
numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front
cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as
the publisher of these copies. The front cover must present the full title with all words of the title equally
prominent and visible. You may add other material on the covers in addition. Copying with changes
limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can
be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed
(as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than 100, you must either
include a machine-readable Transparent copy along with each Opaque copy, or state in or with each
Opaque copy a computer-network location from which the general network-using public has access to
download using public-standard network protocols a complete Transparent copy of the Document, free
of added material. If you use the latter option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible
at the stated location until at least one year after the last time you distribute an Opaque copy (directly or
through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of the Document well before redistributing
any large number of copies, to give them a chance to provide you with an updated version of the
Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and
3 above, provided that you release the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution and modification of the Modified
Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:
33
Cygwin/X Frequently Asked Questions
A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from
those of previous versions (which should, if there were any, be listed in the History section of the
Document). You may use the same title as a previous version if the original publisher of that version
gives permission.
B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the
modifications in the Modified Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five), unless they release you from this
requirement.
C. State on the Title page the name of the publisher of the Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license notice giving the public permission to use
the Modified Version under the terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in
the Document’s license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the
title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is
no section Entitled “History” in the Document, create one stating the title, year, authors, and
publisher of the Document as given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for public access to a Transparent copy
of the Document, and likewise the network locations given in the Document for previous versions it
was based on. These may be placed in the “History” section. You may omit a network location for a
work that was published at least four years before the Document itself, or if the original publisher of
the version it refers to gives permission.
K. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section,
and preserve in the section all the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section
numbers or the equivalent are not considered part of the section titles.
M. Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified
Version.
N. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any
Invariant Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or appendices that qualify as Secondary
Sections and contain no material copied from the Document, you may at your option designate some or
all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the
Modified Version’s license notice. These titles must be distinct from any other section titles.
34
Cygwin/X Frequently Asked Questions
You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your
Modified Version by various parties — for example, statements of peer review or that the text has been
approved by an organization as the authoritative definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a
Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any
one entity. If the Document already includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of, you may not add another; but you
may replace the old one, on explicit permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License give permission to use their
names for publicity for or to assert or imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under this License, under the terms
defined in section 4 above for modified versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of
your combined work in its license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple identical Invariant Sections
may be replaced with a single copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by adding at the end of it, in parentheses,
the name of the original author or publisher of that section if known, or else a unique number. Make the
same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined
work.
In the combination, you must combine any sections Entitled “History” in the various original documents,
forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”,
and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements”.
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents released under this License,
and replace the individual copies of this License in the various documents with a single copy that is
included in the collection, provided that you follow the rules of this License for verbatim copying of each
of the documents in all other respects.
You may extract a single document from such a collection, and distribute it individually under this
License, provided you insert a copy of this License into the extracted document, and follow this License
in all other respects regarding verbatim copying of that document.
35
Cygwin/X Frequently Asked Questions
If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the
Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the
Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole
aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may distribute translations of the Document
under the terms of section 4. Replacing Invariant Sections with translations requires special permission
from their copyright holders, but you may include translations of some or all Invariant Sections in
addition to the original versions of these Invariant Sections. You may include a translation of this
License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you
also include the original English version of this License and the original versions of those notices and
disclaimers. In case of a disagreement between the translation and the original version of this License or
a notice or disclaimer, the original version will prevail.
If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the
requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document except as expressly provided under
this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will
automatically terminate your rights under this License.
However, if you cease all violation of this License, then your license from a particular copyright holder is
reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your
license, and (b) permanently, if the copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright
holder notifies you of the violation by some reasonable means, this is the first time you have received
notice of violation of this License (for any work) from that copyright holder, and you cure the violation
prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received
copies or rights from you under this License. If your rights have been terminated and not permanently
reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it.
36
Cygwin/X Frequently Asked Questions
Foundation. If the Document specifies that a proxy can decide which future versions of this License can
be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose
that version for the Document.
11. RELICENSING
“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that
publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A
public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration”
(or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site.
“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative
Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco,
California, as well as future copyleft versions of that license published by that same organization.
“Incorporate” means to publish or republish a Document, in whole or in part, as part of another
Document.
An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first
published under this License somewhere other than this MMC, and subsequently incorporated in whole
or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior
to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the
same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.
Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.3 or any later version
published by the Free Software Foundation; with no Invariant Sections, no
Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in
the section entitled “GNU Free Documentation License”.
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with. . . Texts.”
line with this:
with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts
being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those
two alternatives to suit the situation.
If your document contains nontrivial examples of program code, we recommend releasing these
examples in parallel under your choice of free software license, such as the GNU General Public
License, to permit their use in free software.
37