[Bug 1789] On linux use abstract socket for X11 connections if possible

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Dec 26 14:06:30 AEDT 2024


https://bugzilla.mindrot.org/show_bug.cgi?id=1789

Matt Whitlock <mindrot at mattwhitlock.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mindrot at mattwhitlock.name

--- Comment #12 from Matt Whitlock <mindrot at mattwhitlock.name> ---
This is no longer optional when using XWayland on kwin_wayland, which
creates no socket file at /tmp/.X11-unix/X* but rather creates its
listen socket *only* in the abstract namespace.

On such a configuration, attempting to start an X11 client on the
remote host causes the SSH client to emit an error message like,
"connect /tmp/.X11-unix/X1: No such file or directory," and the X11
client reports a failure to connect to the X11 server at
"localhost:10.0" (or whatever TCP socket address OpenSSH has chosen on
the remote host).

The failure can be worked around by using socat to listen on a stream
socket at the old file-system path, bridging connections to it by
connecting them to the appropriate abstract socket name:

(on the host running the SSH client and XWayland server:)
$ socat UNIX-LISTEN:/tmp/.X11-unix/X1,fork
ABSTRACT-CONNECT:/tmp/.X11-unix/X1

With socat running, then the OpenSSH client is able to connect to the
X11 server and tunnel X11 client connections to it successfully. It
would be nicer if OpenSSH would first attempt to connect to the X11
socket at the abstract socket name before falling back to the
file-system path name.

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list