In my .bashrc
, I define TMPDIR=${HOME}/tmp
so temporary files are under my encrypted $HOME
. emacs
, invoked from the launcher, doesn't see this definition, but emacsclient
, invoked from a shell does.
So far, I know that
emacs
(after (server-start)
) opens a socket in '/tmp', 'emacsclient' tries to communicate with 'emacs' over a socket in '${HOME}/tmp', and does very poorly. How can I presuade the launcher (via emacsclient.desktop?) to pass the right value for TMPDIR?
Try putting the variable definition in
.profile
instead of.bashrc
. The latter has a statement near the top that causes it to exit very early when executed by a non-interactive shell. Log out and back in to see whether it works.Also don't forget to add
export
like this:If that doesn't work, modify the launcher (it's in
/usr/share/applications
) so that its Exec line says:I guess I can't pass my
TMPDIR
in to theemacs
server-start
function, so I guess I'll have to makeemacsclient
use/tmp
to hold the socket.In my
.bashrc
:but that seems sub-optimal. Any suggestions?