#1028370 Connection to server failed

Package:
clusterssh
Source:
clusterssh
Submitter:
Stéphane Glondu
Date:
2025-11-22 06:55:01 UTC
Severity:
normal
Tags:
#1028370#5
Date:
2023-01-10 06:56:01 UTC
From:
To:
Dear Maintainer,

Today, cssh does not work:

$ cssh a b c d
Connection to server failed -- (version 11.0)
Authorization required, but no authorization protocol specified
 at /usr/share/perl5/App/ClusterSSH/Window/Tk.pm line 57.

I'm pretty sure it was working 3 weeks ago or so. However, with 4.16-3
I still get the issue.


Cheers,

#1028370#10
Date:
2023-01-10 07:10:08 UTC
From:
To:
Le 10/01/2023 à 07:56, Stéphane Glondu a écrit :
With GNOME on Xorg, cssh works. I also tried, xterm itself works with
Wayland session.


Cheers,

#1028370#19
Date:
2023-02-12 22:29:46 UTC
From:
To:
Hi Stéphane,

Thank you for reporting this issue.  I'm believe this is going to be
reassigned to libx11-protocol-perl (or another dependency), since the
examples in that package now break with the exact same message - for
example:

$ perl /usr/share/doc/libx11-protocol-perl/examples/render-test.pl
Connection to server failed -- (version 11.0)
Authorization required, but no authorization protocol specified
 at /usr/share/doc/libx11-protocol-perl/examples/render-test.pl line 8.

It's interesting that I don't see updates to Wayland, GNOME, or xauth
around this time that explain the change.

As a work-around, until we track down what has changed and how to fix
it, this gets cssh and the examples in libx11-protocol-perl working
again on my system, which is also GNOME on Wayland:

$ xhost +SI:localuser:$(whoami)

Thanks,
tony

#1028370#24
Date:
2023-02-12 22:56:19 UTC
From:
To:
FWIW, this still works for me … But I'm using awesome and X11, not
GNOME / Wayland.


Line 8 of /usr/share/doc/libx11-protocol-perl/examples/render-test.pl
is just

my $X = new X11::Protocol;

X11::Protocol's constructor can do something about authorization; cf.
also X11::Auth. -- But then, I have no idea how this all interacts
with Wayland.


Cheers,
gregor

#1028370#29
Date:
2025-11-22 06:42:10 UTC
From:
To:
I hit this (again) today and had a few minutes to dig a little. I'm no X
expert, just sharing here (since I could not find an existing
libx11-protocol-perl bug) what I learned hoping to move this forward...

I came up with this super hacky change to the example that makes it work:
--- /usr/share/doc/libx11-protocol-perl/examples/render-test.pl 2004-03-23 05:19:25.000000000 +0100 +++ render-test.pl 2025-11-22 07:27:26.657364957 +0100 @@ -1,11 +1,13 @@ #!/usr/bin/perl +use X11::Auth; use X11::Protocol; use strict; use IO::Select;
--- /usr/share/doc/libx11-protocol-perl/examples/render-test.pl 2004-03-23 05:19:25.000000000 +0100 +++ render-test2.pl 2025-11-22 07:37:42.426902814 +0100 @@ -1,11 +1,15 @@ #!/usr/bin/perl +use Net::Domain qw(hostname); +use X11::Auth; use X11::Protocol; use strict; use IO::Select;
#1028370#34
Date:
2025-11-22 06:53:02 UTC
From:
To:
Ah, it seems that the root cause is that with wayland, while $DISPLAY is
":1" in the environment, the display number in the .Xauthority file entries
is empty! That's why the $auth->get_by_host call in
/usr/share/perl5/X11/Protocol.pm:2310 (which passes "1" from the
environment in this case) does not find nor return anything and we get the
"Authorization required, but no authorization protocol specified" error.

Marcin