Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11 connection rejected because of wrong authentication. #12248

Open
1 of 2 tasks
dibalavs opened this issue Nov 8, 2024 · 1 comment
Open
1 of 2 tasks

X11 connection rejected because of wrong authentication. #12248

dibalavs opened this issue Nov 8, 2024 · 1 comment

Comments

@dibalavs
Copy link

dibalavs commented Nov 8, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.4317]

WSL Version

WSL version: 2.3.24.0, WSLg version: 1.0.65

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Kernel version: 5.15.153.1-2

Distro Version

Ubuntu 22.04.5 LTS

Other Software

No response

Repro Steps

Hello,
I try to launch GUI application (qemu) from remote host.

  1. Locally (wsl2) I launch: ssh -X my_remote.host
  2. launch qemu with requred flags

Got error:

X11 connection rejected because of wrong authentication.
Could not initialize SDL(No available video device) - exiting

It looks like wsl2 does not set up XAUTHORITY environment variable and remote client is unable to authenticate gui session.

Simple application like xsnow, xeyes are working sucessfully.

on wsl2, xauth package is installed

Expected Behavior

qemu is launched with GUI session

Actual Behavior

qemu fails with error:

X11 connection rejected because of wrong authentication.
Could not initialize SDL(No available video device) - exiting

Diagnostic Logs

environment variables from local host with wsl2:

 export
declare -x DISPLAY=":0"
declare -x HOME="/home/vdybala"
declare -x HOSTTYPE="x86_64"
declare -x LANG="C.UTF-8"
declare -x LESSCLOSE="/usr/bin/lesspipe %s %s"
declare -x LESSOPEN="| /usr/bin/lesspipe %s"
declare -x LOGNAME="vdybala"
declare -x LS_COLORS="..."
declare -x MOTD_SHOWN="update-motd"
declare -x NAME="dybala-nb"
declare -x OLDPWD
declare -x PATH=...
declare -x PULSE_SERVER="unix:/mnt/wslg/PulseServer"
declare -x PWD="/home/vdybala"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x TERM="xterm-256color"
declare -x USER="vdybala"
declare -x WAYLAND_DISPLAY="wayland-0"
declare -x WSL2_GUI_APPS_ENABLED="1"
declare -x WSLENV="WT_SESSION::WT_PROFILE_ID"
declare -x WSL_DISTRO_NAME="Ubuntu-20.04"
declare -x WSL_INTEROP="/run/WSL/9_interop"
declare -x WT_PROFILE_ID="{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}"
declare -x WT_SESSION="8d433d03-005e-452a-952e-8ddec8bdf8ce"
declare -x XDG_DATA_DIRS="/usr/local/share:/usr/share:/var/lib/snapd/desktop"
declare -x XDG_RUNTIME_DIR="/mnt/wslg/runtime-dir"

logs from remote host (for example try to launch firefox)

dybala@dybala:~$ firefox
X11 connection rejected because of wrong authentication.
Error: cannot open display: localhost:11.0

export | grep DISPLAY
declare -x DISPLAY="localhost:11.0"


export | grep AUTH
dybala@dybala:~$
Copy link

github-actions bot commented Nov 8, 2024

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant