GNU bug report logs -
#20999
24.4; Inconsistent UID vs USER resolution between emacsclient and emacs daemon
Previous Next
Reported by: Mike Alexander <mikealexander1860 <at> gmail.com>
Date: Tue, 7 Jul 2015 05:00:03 UTC
Severity: normal
Tags: moreinfo, wontfix
Found in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 20999 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
emacs --version gives 24.4.2, while emacsclient --version gives 24.4.
Furthermore, both are the version installed automatically with the make
install target after building from source (using the config script).
I guess I don't _know_ it's using my username instead of UID, but I get a
connection refused from the command "emacsclient -c -s $EMACS_DAEMON_NAME"
after starting and confirming the daemon is running via the command "emacs
--daemon=$EMACS_DAEMON_NAME". To be safe, I replaced the environment
variable with the direct text and saw the exact same issue. A " sudo
netstat -xaupen | grep emac" shows the correct socket (using the UID) for
the server, but the client still refuses the connection. I saw a hit on a
blog talking about a similar problem and needing to specify the fullly
pathed socket name to the client so I tried that and found it worked. Maybe
it's not really a username versus UID issue, but the construction method
between the two is clearly different somehow.
Incidentally I'm working on a corporate server that integrates with a
company wide user base, so I do have a huge UID. In my case the username is
mtalexander and the UID is 1073796907.
-Mike
On Tue, Jul 7, 2015, 08:48 Glenn Morris <rgm <at> gnu.org> wrote:
> Mike Alexander wrote:
>
> > Starting the emacs daemon with "emacs --daemon=$EMACS_DAEMON_NAME", where
> > the $EMACS_DAEMON_NAME matches the standard letter, number, underscore
> > requrements, ends up using
> > my UID in the socket creation since my username is longer than 8
> > characters ("/tmp/emacs$(id -u)/$EMACS_DAEMON_NAME").
>
> I've never seen this use anything BUT the UID, no matter how long your
> username is. That's what it has always used for me, with a two character
> username, and emacsclient works fine.
>
> Nevertheless, I tried with a username with more than 8 chars, and that
> too worked fine.
>
> > However, running "emacsclient -c -s $EMACS_DAEMON_NAME" fails with a
> > refused connection because it attempts to connect using my username
> > instead of the UID and fails to find the socket
> > ("/tmp/emacs$USER/$EMACS_DAEMON_NAME").
>
> How did you conclude that it was trying to use your username?
>
> I don't suppose you have a huge UID?
>
> Are you sure your version of emacsclient matches your version of emacs?
>
[Message part 2 (text/html, inline)]
This bug report was last modified 8 years and 245 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.