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 tolocalhost:10.0
- Running
gedit
on server should trigger opening a window inVcXsrv
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
xauth
if you want untrusted (“secure”) X11 forwarding.