0

I am running XServer by VcXsrv on Windows. Here is my VcXsrv configuration, and I believe it should be listening on :0.0, which is port :6000.

<?xml version="1.0" encoding="UTF-8"?>
<XLaunch WindowMode="MultiWindow" ClientMode="NoClient" LocalClient="False" Display="-1" LocalProgram="xcalc" RemoteProgram="xterm" RemotePassword="" PrivateKey="" RemoteHost="" RemoteUser="" XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ClipboardPrimary="True"
ExtraParams="" Wgl= "True DisableAC= "True"" XDMCPTerminate= "False"/>

My Linux server has xauth installed and SSH's x11 forwarding enabled. Here is a part of the sshd_config configuration on my Linux server:

AddressFamily inet
AllowAgentForwarding yes
AllowTcpForwarding yes
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

If I understand correctly, when I run ssh -X [email protected] in Windows Powershell, I should see:

  • ssh listening on server's 127.0.0.1:6010
  • server's DISPLAY environment variable is set to localhost:10.0
  • Running gedit on server should trigger opening a window in VcXsrv on Windows

However, none of these are happening as expected. In the output of ssh -vvvv, I see this log:

debug1: X11 forwarding requested but DISPLAY not set

Initially, I thought that the Linux Server did not have DISPLAY set up properly, but no matter how I modify it, it keeps prompting 'DISPLAY not set'. So, I tried configuring the environment variable in Windows Powershell:

$env:DISPLAY = "localhost:0"

Interestingly, now it no longer prompts 'DISPLAY not set', but still cannot open X11 forwarding.

debug1: No xauth program.
Warning: untrusted X11 forwarding setup failed:xauth key data not generated 

Question

1.What am I missing? Do I need to install xauth on Windows as well? If so, how can it be installed?

2.What is the purpose of setting DISPLAY in Windows Powershell? Is it used to specify which XServer to forward X traffic to?

Version

  • Windows: Window 10 Enterprise 20H2 19042.1237
  • LinuxServer: Debian GNU/Linux 11 (bullseye) 5.10.0-28-amd64
3
  • 1
    What version of Windows? What version of the WSL kernel do you have installed? Do you have WSLg enabled?
    – Ramhound
    Commented May 24 at 13:27
  • @Ramhound Windows version has been updated, but I am not using WSL and WSLg. I use Powershell to run the default installed ssh.
    – Sangria
    Commented May 27 at 6:01
  • Both server and client need xauth if you want untrusted (“secure”) X11 forwarding.
    – Daniel B
    Commented May 27 at 7:41

0

You must log in to answer this question.

Browse other questions tagged .