<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Le 09/02/2025 à 22:08, Vladimir
      Dergachev a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:alpine.DEB.2.22.394.2502091607260.45848@iridium">
      <br>
      This reminds me of the difference between ssh -X and ssh -Y
      options, maybe a look at ssh code will give you ideas.
      <br>
      <br>
    </blockquote>
    <br>
    <div class="lRu31" dir="ltr"><span class="HwtZe" lang="en"><span
          class="jCAhz ChMk0b"><span class="ryNqvb">Indeed, ssh has
            several tricks to make the X11 forwarding<br>
            with some restrictions between -X and -Y  "... too many
            programs currently crash in this mode ... "  (</span></span></span><a class="moz-txt-link-freetext" href="https://manpages.debian.org/bullseye/openssh-client/ssh.1.en.html#X">https://manpages.debian.org/bullseye/openssh-client/ssh.1.en.html#X</a>)</div>
    <br>
    <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span
          class="ryNqvb">The code is unfortunately too complex for my
          skill level :-(</span></span></span><br>
<a class="moz-txt-link-freetext" href="https://github.com/openssh/openssh-portable/blob/85b3d68dd931416ede657f371f1d60cdc3a66f34/channels.c#L1300">https://github.com/openssh/openssh-portable/blob/85b3d68dd931416ede657f371f1d60cdc3a66f34/channels.c#L1300</a><br>
    <br>
    <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span
          class="ryNqvb">But I still wonder why in my tests X clients
          get stuck waiting for the server.<br>
          <br>
        </span></span></span>Best regards<br>
    Christophe<br>
    <br>
    <br>
    <blockquote type="cite"
      cite="mid:alpine.DEB.2.22.394.2502091607260.45848@iridium">On Fri,
      7 Feb 2025, Christophe Lohr wrote:
      <br>
      <br>
      <blockquote type="cite">Hello,
        <br>
          Please excuse the naivety of my question; I'm trying to
        understand how things work.
        <br>
        <br>
        I try to forward a tcp X11 connection to the server's unix
        socket:
        <br>
          $ socat  TCP-LISTEN:6001,fork UNIX-CONNECT:/tmp/.X11-unix/X0
        <br>
        <br>
        Then I can use it:
        <br>
          $ DISPLAY=localhost:1 xeyes
        <br>
        <br>
        It works well... but only for simple applications (xlogo xeyes
        xclock xmessage xnest...)
        <br>
        Surprisingly, this does not works for more complex applications
        (Xephyr wireshark ...)
        <br>
        These applications stop, seemingly waiting for an event that
        doesn't come.
        <br>
        Increasing socat's verbosity level doesn't help me to
        understand, nor does strace ltrace xtrace ...
        <br>
        <br>
        Well, this seems relating to the MIT-SHM extension.
        <br>
        My assumption: If the server thinks the client is local (due to
        the use of a unix socket), it activates the MIT-SHM extension
        without further preliminary checks (and tries to send ancillary
        data
        <br>
        (shm keys or file descriptor?) via the unix socket?). Right?
        <br>
        <br>
        As a workarround, I have to generate an "untrusted" xauth
        cookie.
        <br>
        Is there a better way?
        <br>
        <br>
        (Note: I'm a fan of network transparency!
        <br>
        A next time we'll talk about vsock;-) )
        <br>
        <br>
        Best regards
        <br>
        Christophe
        <br>
        <br>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>