tags:

views:

206

answers:

4

hello,

I have Installed GTK on a Linux machine. I am connecting To Linux Machine from a Telnet Session to compile the GTK programs From A Windows Machine. I am using Cygwin on Windows Machine. but i am not able to see GUI output of my GTK program on my Windows Machine.

When i run program from my terminal i get this error:

(helloworld:22576): Gtk-WARNING **: cannot open display:

I tried solutions from every answer posted, but no use now i am getting following error:

$ ./helloworld
Invalid MIT-MAGIC-COOKIE-1 key
(helloworld:22710): Gtk-WARNING **: cannot open display: 172.25.0.161:0

and i am getting following error on my Cygwin console:

client 6 rejected from IP 172.25.0.91 Auth name: MIT-MAGIC-COOKIE-1 ID: -1
+1  A: 

You must set the DISPLAY variable in your telnet session to the IP address or DNS name of your Windows machine and append ":0"

export DISPLAY=windows.your.domain:0

And you must start an X server on the Windows machine (comes with Cygwin but you must start it).

Aaron Digulla
A: 

You should install X-server on your windows machine and make sure you have DISPLAY set to yourmachine:0 or something like that. Or better yet use ssh instead of telnet (e.g. putty) and tunnel your X connection. You'll have to do a bit on your own research, though, because the complete answer would be a lengthy one.

Michael Krelin - hacker
+1  A: 

You need to run the X window system (install with Cygwin) on your Windows-box and enable remote connections (probably with xhost). Set the DISPLAY-variable on your Linux-box to the address of your Windows-box and :0, as such:

export DISPLAY=192.168.1.123:0


I can recommend using ssh rather than telnet, for security reasons. In this case you do not need to enable remote connections with xhost, and you do not need to set the DISPLAY-variable. You only need to enable X forwarding.

Magnus Hoff
A: 

Install an small X server on Windows XMing32, then run it, use putty as a console client, and check "X11 Forwarding" in Connection->SSH->X11.

Unfortunately, X11 Forwarding is not available through Telnet, you must run a SSH server on the target Linux and connect through SSH. (See if /etc/ssh/sshd_conf requires enabling X11 Forwarding too).

Vlagged
thanks i forgot to set X11 Forwarding flag to true.I worked!
PP