Subject: Re: bug#35300: 27.0.50; emacsclient on remote sessions no longer works

From: Óscar Fuentes <[email-masked]>
Date: Fri, 19 Apr 2019 16:30:39 +0200

Eli Zaretskii <[email-masked]> writes:

>> > Any other missing pieces of information you'd like to be added?
>> 
>> All the documentation I browsed for an hour before figuring out what the
>> problem was? :-)
>
> Thanks, but that's not specific enough for me to take any practical
> action.

As I said before, I don't have the knowledge to be helpful here, except
for what applies to my specific case, and even then it is the bare
minimum.

>> > Also, I don't think I understand clearly what exactly failed in your
>> > case.  Did you have XDG_RUNTIME_DIR defined or didn't you?  If you
>> > did, what exactly caused the failure to find the socket?
>> 
>> Some time ago I disabled PAM on my sshd_config, because it was not use
>> for me and it adds complexity to the log-in procedure. Everything worked
>> fine for years, emacsclient included, until just a few days ago that I
>> started using Emacs 27 for testing one of the new features.
>
> So you didn't have XDG_RUNTIME_DIR set?  In that case, I feel I
> understand the issue even less, because when XDG_RUNTIME_DIR is not
> defined, emacsclient is supposed to fall back to the old behavior...

IIUC, the Emacs server creates the local socket under the directory
pointed by XDG_RUNTIME_DIR. When emacsclient starts, if XDG_RUNTIME_DIR
is not set it simply does not know where to find the socket.

IIRC from the other bug report pointed by Glenn, it seems that there is
a fallback behavior, but it only works if the system is configured for
that.

> (If my questions bother you, feel free to tell, and I will stop.)

Not at all, I'm glad to help you as much as I can.