emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22930: closed (X11 forwarding fails without /tmp/.X11-unix directory


From: GNU bug Tracking System
Subject: bug#22930: closed (X11 forwarding fails without /tmp/.X11-unix directory)
Date: Tue, 06 Oct 2020 04:05:02 +0000

Your message dated Tue, 06 Oct 2020 00:04:26 -0400
with message-id <87h7r8huet.fsf@gmail.com>
and subject line Re: bug#24049: GuixSD - problem with X11 forwarding
has caused the debbugs.gnu.org bug report #22930,
regarding X11 forwarding fails without /tmp/.X11-unix directory
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
22930: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22930
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: X11 forwarding fails without /tmp/.X11-unix directory Date: Sun, 06 Mar 2016 20:10:33 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Example: using guix commit 59a4dd5 with openssh xauth & emacs in the
user profile (c02glc.scm) and a minimal system profile (c02system.scm),
after a reboot we see ...

nemo:~ $ ssh g1
glc@g1's password:
X11 forwarding request failed on channel 0

... and in /var/log/messages ...

Mar  6 19:23:35 localhost lshd[372]: lshd: Failed to cd to `/tmp/.X11-unix' 
(errno = 2): No such file or directory 
Mar  6 19:23:35 localhost lshd[372]: lshd: Updating utmp for login failed 
(errno = 2): No such file or directory 

If we do ...

mkdir /tmp/.X11-unix

... logout and login, forwarding works, emacs runs in X, and
/var/log/messages is clean. If we reboot, X11 forwarding again fails.

Attachment: c02glc.scm
Description: Binary data

Attachment: c02system.scm
Description: Binary data


--- End Message ---
--- Begin Message --- Subject: Re: bug#24049: GuixSD - problem with X11 forwarding Date: Tue, 06 Oct 2020 00:04:26 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Hello,

ludo@gnu.org (Ludovic Courtès) writes:

[...]

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

I tried the above fix and ran a VM with the attached config (the custom
kernel stuff was to try something else at the same time).  It fixes the
error about the directory, but it would still fail at X11 forwarding
(there was an error message: "Can't find any xauth information for X11
display").

I ended up figuring out it needed libxau to work; combined with your
patch, this fixes X11 forwarding.

Fixed in commit 0ec195ff02.

For the record, I've done the tests in a VM using the attached system
config.  The custom kernel stuff is unrelated.

Thanks,

Closing,

Maxim

Attachment: config-custom-kernel.scm
Description: Text document


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]