GNU bug report logs - #3992
23.1.50; [Cocoa Emacs] emacsclient can't find server via ssh

Previous Next

Package: emacs;

Reported by: bread <breaddawson <at> gmail.com>

Date: Fri, 31 Jul 2009 08:10:05 UTC

Severity: normal

Merged with 4001, 7135

Found in version 24.0.50

Fixed in version 23.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Steven Ihde <sihde <at> hamachi.us>
To: 3992 <at> debbugs.gnu.org
Subject: bug#3992: emacsclient and ssh on MacOS X
Date: Mon, 12 Jul 2010 13:38:21 -0700
I experienced this problem too.  I found that in my case the problem  
was caused by the setting of $TMPDIR on OS X.

When logging in at the desktop, $TMPDIR is set by launchd to some  
directory under /var/folders.  This doesn't happen when logging in via  
ssh.  Thus, emacsclient on an ssh session is unable to find a server  
started under a desktop session, because they communicate through a  
unix socket located under $TMPDIR.

To fix this, add something like the following to your .profile  
or .bashrc so it is executed when logging in via ssh:

if [ -z "$TMPDIR" ]; then
  export TMPDIR=`getconf DARWIN_USER_TEMP_DIR`
fi

This will set TMPDIR to the same per-user directory as when logging in  
on the desktop.

This fixed the problem for me.






This bug report was last modified 14 years and 294 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.