Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running Cygwin 1.7 on Win7 Pro x64, and I can query my Ubuntu 10.04 LTS server just fine.

XWin.exe -clipboard -once -rootless -nodecoration -notrayicon -query $IP_ADDRESS

I recently installed Ubuntu 11.10 with XFCE desktop on another machine, and I cannot connect to this one.

Of course, I enabled TCP and XDMCP in LightDM using /etc/lightdm/lightdm.conf

# ...


and I think the fact that I can connect using my Xubuntu 11.10 laptop proves that it works.

X -query $IP_ADDRESS :1

Xwin fails to connect, while logging something like:

[333305.324] XDMCP fatal error: Session failed Failed to connect to display :0
[333305.324] Server terminated with error (1). Closing log file.

Today I updated Cygwin.

CYGWIN_NT-6.1-WOW64 1.7.9(0.237/5/3) 2011-03-29 10:10

Still doesn't work. Does anyone have a clue as to what 'feature' the new and improved LightDM or Xserver has that I forgot to take into account?

Oh and did I mention the exact same Cygwin/Xwin connects to Ubuntu 10.04 just fine, using the same command line (different IP of course)?

share|improve this question
Gilles, you have edited out all references to Xubuntu. However, Xubuntu-desktop uses a whole different set of libraries and tools, not to forget that Unity (Ubuntu) is not made for remote desktopping to begin with. Both of which could be relevant in some way, imo. :) – Redsandro Jan 12 '12 at 16:08
up vote 4 down vote accepted

I don't know what the guys over at Cygwin/X are doing to make this fail. And I don't know why I cannot find any help or even mention of similar trouble anywhere in this galaxy that is within the reach of Google. I believe I am not the only one using the software, so the lack of help puzzles me.

But let me provide a solution to my own question; I discovered that VCXsrv.exe is some kind of Cygwin/X clone in a way.


VcXsrv Windows X-server based on the xorg git sources (like xming or cygwin's xwin), but compiled with Visual C++ 2010.

It works almost the same, except you need to add the -from [ip-address] command line option. No idea why. But it works:

vcxsrv.exe -clipboard -once -rootless -nodecoration -notrayicon -query [target hostname or ip] -from [current (local) ip]

Tested with both Xubuntu and xubuntu-desktop on Ubuntu. (XFCE)

share|improve this answer
The -from option is available even with cygwin's Xwin. I was recently trying to query to OpenBSD xdm with cygwin's Xwin, and noticed that in the remote side's /var/log/xdm.log, in time with the connection attempts, it was outputting Starting X server on which suggests Xwin was transmitting the wrong address as I am not using any 10.x subnet on the Windows box. Explicitly passing the ip with -from made it work. – rakslice Mar 22 '15 at 4:28

I was having the same problem. I just added -from your.ip.v4.addr to the config line of XWin.exe, and it's now working for me. Both my windows 7 and the linux host were doing IPv6. I think that Xwin/LightDM don't know how to handle the IPv4/IPv6 mix.

share|improve this answer

I had the same issue, and adding -from fixed it.

/usr/bin/XWin -query kvant -nodecoration -lesspointer -from

where "kvant" is the remote host and is the client running the Xserver.

However, after upgrading to Ubuntu 12.04 on the server, this is PITIFULLY slow. 9.x that I used to have was actually quite useful & snappy.

share|improve this answer

(please stop editing my message to remove my "thank you" part)

Thanks for this. The "from" option was my issue.

This is my windows .bat file content (could help someone):

@echo on

chdir C:\cygwin\bin
bash --login -i -c '/bin/XWin -query server_ip -from client_ip'
share|improve this answer
Hello, and welcome to Unix & Linux! I formatted your answer to make it easier to read, and taken away wording that is assumed for an answer. If you have an answer that is very similar to another's, simply upvote their answer and/or add a comment to theirs. – Jeff Schaller Aug 13 '15 at 15:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.