1

I am connecting from Windows with Putty and XLaunch to a Debian machine version 7.6, I have tried it on other machines and it worked, the problem is the Debian machine itself, not the configuration. I have already tried this:

DISPLAY=:0.0
xhost localhost

The last command tells me that it is unable to open a display.

NOTE: I'm on a Windows system attempting to use XLaunch to remote display an X application from the Debian system, to Windows.

slm
  • 369,824
aDoN
  • 756
  • 5
  • 11
  • 22
  • 1
    Open a shell on the Debian machine and issue the command echo $DISPLAY and report its output. – lord.garbage Oct 22 '14 at 12:04
  • This is the result :0.0DISPLAY=:0.0 – aDoN Oct 22 '14 at 12:05
  • 1
    First of all, where do you issue xhost localhost on the server or on you local machine. If the former try the latter. And if the latter: (Although you should not do this in terms of a long term soltion. And here only done for debugging purposes.) What happens, when you enter xhost + on your local machine thereby granting access to any user. – lord.garbage Oct 22 '14 at 12:11
  • The problem is the machine I connect remotetly – aDoN Oct 22 '14 at 12:13
  • 1
    What if you try set DISPLAY=put-in-you-ip-here and then export DISPLAY on the remote machine? That helped me with Putty. – lord.garbage Oct 22 '14 at 12:17
  • 3
    Do you want to display X11 applications on the Windows machine, or on the remote Debian machine? If you want to display things on Windows, do not set DISPLAY: if it isn't set, then forwarding is not in place and setting DISPLAY cannot help; the problem is probably in the PuTTY configuration. – Gilles 'SO- stop being evil' Oct 22 '14 at 16:45

1 Answers1

1

Here is my configuration :

Xlauch

  • in first screen, there is a field called Display number, do not use 0, try 1756 (for instance), next
  • next (Start no client)
  • check 'no access control', next
  • done

Putty

  • in Connection -> SSH -> X11 :
    • enable X11 forwarding
    • X Display Location : put localhost:1756.0
  • connect, do not set DISPLAY in any .bashrc et all.

when connected launch any X client.

Archemar
  • 31,554
  • Do you know what does the ".0" in localhost:1756.0" mean? – alpha_989 Nov 07 '17 at 15:43
  • Also how does the "no access control" help in setting up a reliable and repeatable connection with Xming? – alpha_989 Nov 07 '17 at 15:45
  • I always use 0, I guess .1, .2 are in case you have multiple screen. I use "no access control" because I was unable to set a proper access control. – Archemar Nov 07 '17 at 15:46
  • Thanks for the explanation.. when you mean multiple screens do you mean multiple screens on the server to which you are trying to login? – alpha_989 Nov 07 '17 at 17:22
  • For me, it turns out that using localhost:1757.0 (in putty) and 1756 (as Display Number in Xlaunch) works the same as using 0.0 (in putty) and 0 (as Display Number in Xlaunch). In either case when I login to the remote server "echo $DISPLAY" reads "localhost:10.0". – alpha_989 Nov 07 '17 at 17:24
  • When I have multiple windows open, the DISPLAY value increments by 1, so $DISPLAY increases from "localhost:10" to "localhost:11", similar to the answer here: https://unix.stackexchange.com/questions/10121/open-a-window-on-a-remote-x-display-why-cannot-open-display – alpha_989 Nov 07 '17 at 17:25