How to Cygwin Xwin -query an Ubuntu 11.10 Xserver?

5,045

Solution 1

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.

http://sourceforge.net/projects/vcxsrv/

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)

Solution 2

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.

Solution 3

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

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

where "kvant" is the remote host and 192.168.1.132 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:
5,045

Related videos on Youtube

Redsandro
Author by

Redsandro

Lazy Media Creator #SOreadytohelp

Updated on September 18, 2022

Comments

  • Redsandro
    Redsandro almost 2 years

    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

    [SeatDefaults]
    # ...
    xserver-allow-tcp=true
    
    [XDMCPServer]
    enabled=true
    

    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] 
    [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)?

    • Redsandro
      Redsandro over 12 years
      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. :)
  • Jeff Schaller
    Jeff Schaller almost 9 years
    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.
  • Anthony Geoghegan
    Anthony Geoghegan about 6 years
    Saying "thanks for this" makes this post look like not an answer (and liable to be deleted as such) - see How to Answer. Jeff helpfully edited it to make it look more like an answer by removing the extraneous text that would not be helpful to others with the same problem. Somehow, years later, this post has appeared in the Low Quality Posts review queue so I've now re-edited it (instead of voting to delete).