unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: myglc2 <myglc2@gmail.com>
Cc: bug-lsh@gnu.org, 24049@debbugs.gnu.org
Subject: bug#24049: GuixSD - problem with X11 forwarding
Date: Mon, 01 Aug 2016 12:17:35 +0200
Message-ID: <8737mou728.fsf@gnu.org> (raw)
In-Reply-To: <cu7a8hbkkcc.fsf@gmail.com> (myglc2@gmail.com's message of "Thu, 21 Jul 2016 12:49:07 -0400")

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

Hi myglc2,

myglc2 <myglc2@gmail.com> 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-unix' (errno = 2): No such file or directory 
> Jul 21 12:24:51 localhost lshd[381]: lshd: Updating utmp for login failed (errno = 2): No such file or directory 
>
> 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’t find equivalent code in OpenSSH.)

Thanks,
Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 699 bytes --]

--- /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)
     {


  reply	other threads:[~2016-08-01 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 16:49 myglc2
2016-08-01 10:17 ` Ludovic Courtès [this message]
2020-10-06  4:04   ` bug#22930: " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737mou728.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=24049@debbugs.gnu.org \
    --cc=bug-lsh@gnu.org \
    --cc=myglc2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unofficial mirror of bug-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-bugs/0 guix-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-bugs guix-bugs/ https://yhetil.org/guix-bugs \
		bug-guix@gnu.org
	public-inbox-index guix-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.bugs
	nntp://news.gmane.io/gmane.comp.gnu.guix.bugs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git