1

Our cluster runs Linux, and I can successfully ssh login to it using my windows 10 PC. However, when I'm trying to use X11 forwarding I always get the error:

qt.qpa.screen: QXcbConnection: Could not connect to display localhost:0.0
Could not connect to any X display

I've tried everything: using Xterminal, PuTTY, Ubuntu (from the windows 10 store), MobaXterm - and nothing works. I've tried the export display command, and when I'm logging in I'm using -X (also tried -Y). I read online but couldn't find anything to work. Also, my colleague has a personal Macbook with the same user properties, and she managed to do X11 using XQuartz.

Any ideas what can I try?

3
  • Did you try: export DISPLAY=<name of your Windows host pc>:0.0 ?
    – Udo
    Sep 11, 2019 at 4:19
  • Do you somehwere (e.g. in the shell login script) set DISPLAY? Because with ssh, it should be localhost:10 or above, and not localhost:0.0.
    – dirkt
    Mar 7, 2022 at 6:31
  • MobaXterm and Xming should give you some info about running displays. MobaXterm has a button for "X server" and I think Xming will tell you the display if you hover over the tray icon. What X server(s) do you have running?
    – rexypoo
    Nov 5, 2022 at 19:19

2 Answers 2

0

When you connect to the Linux cluster with X11 forwarding, you allow X clients running on the cluster to contact your X server on your Windows 10 PC.

To make this work, you need to run an X server in the first place - and as Windows isn't Linux, no X server runs by default.

XQuartz is an X server for MacOS. Options for an X server for Windows are e.g. VcXsrv and Xming (not sure if it'll work on Windows 10) and the Cygwin X server. Possibly there are more.

And given the development of the Windows Subsystem for Linux (WSL), maybe there'll even be a native Microsoft X server at sometime in the future.

1
  • 1
    Yes I know that - I'm running Xerver on my windows machine (MobaXterm runs X server too). Xming is running in the background too but still, it doesn't work. Jun 3, 2019 at 17:09
0

When using SSH X11 forwarding, the display number should be 10.0 or above normally.

If the error message really says localhost:0.0 it suggests there could be some environment setting on the cluster that is overriding the DISPLAY variable. Don't do that: the sshd on the remote end will set the DISPLAY variable to the correct value automatically as part of your session initialization when X11 forwarding has been requested and accepted. You cannot know the right value in advance, as it will vary based on how many other X11-forwarding SSH connections to the cluster have already been established when you make your connection.

Note: Setting export DISPLAY=<name of your Windows host pc>:0.0 at the cluster would cause any applications to attempt an insecure, unencrypted X11 connection directly from the application to the X11 server on your Windows host. This is not recommended and might (or rather should!) be blocked by firewalls/NAT at either end.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .