From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#24049: GuixSD - problem with X11 forwarding Date: Mon, 01 Aug 2016 12:17:35 +0200 Message-ID: <8737mou728.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUAJN-0004IY-SQ for bug-guix@gnu.org; Mon, 01 Aug 2016 06:19:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUAJK-0005CL-K3 for bug-guix@gnu.org; Mon, 01 Aug 2016 06:19:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUAJK-0005CH-Gt for bug-guix@gnu.org; Mon, 01 Aug 2016 06:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bUAJK-00076b-CO for bug-guix@gnu.org; Mon, 01 Aug 2016 06:19:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: (myglc2@gmail.com's message of "Thu, 21 Jul 2016 12:49:07 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: myglc2 Cc: bug-lsh@gnu.org, 24049@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi myglc2, myglc2 skribis: > On the client, ssh produces ... > > 'X11 forwarding request failed on channel 0' > > On the headless server (g1) in /var/log/messages ... > > Jul 21 12:24:51 localhost lshd[381]: lshd: Failed to cd to `/tmp/.X11-uni= x' (errno =3D 2): No such file or directory=20 > Jul 21 12:24:51 localhost lshd[381]: lshd: Updating utmp for login failed= (errno =3D 2): No such file or directory=20 > > With this workaround ... > > sudo mkdir /tmp/.X11-unix > sudo chmod 777 /tmp/.X11-unix > > ... if I log out and back in X11 forwarding "works" I believe this is a bug in lshd fixed by something along the lines of the attached patch. Niels, what do you think? (Strangely I can=E2=80=99t find equivalent code in OpenSSH.) Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- /tmp/lsh-2.1/src/server_x11.c 2016-08-01 11:58:54.714647794 +0200 +++ /tmp/lsh-2.1/src/server_x11.c.new 2016-08-01 11:58:46.606563478 +0200 @@ -151,7 +151,7 @@ DEFINE_COMMAND(open_forwarded_x11) #define X11_MIN_DISPLAY 10 #define X11_MAX_DISPLAY 1000 -/* FIXME: Create the /tmp/.X11-unix directory, if needed. Figure out +/* FIXME: Figure out * if and how we should use /tmp/.X17-lock. Consider using display * "unix:17" instead of just ":17". */ @@ -253,6 +253,7 @@ open_x11_socket(struct ssh_channel *chan old_umask = umask(0077); + mkdir(X11_SOCKET_DIR, S_IRWXU | S_IRWXG | S_IRWXO | S_ISVTX); old_cd = lsh_pushd(X11_SOCKET_DIR, &dir, 0, 0); if (old_cd < 0) { --=-=-=--