Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1181  / 2 Years ago, sat, may 7, 2022, 1:36:45

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?


More From » unity

 Answers
4

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:



export TMPDIR="$HOME/tmp"


If that doesn't work, modify the launcher (it's in /usr/share/applications) so that its Exec line says:



Exec=sh -c 'TMPDIR="$HOME/tmp" emacs'

[#43243] Saturday, May 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oileweaty

Total Points: 337
Total Questions: 108
Total Answers: 105

Location: Western Sahara
Member since Mon, May 3, 2021
3 Years ago
oileweaty questions
Thu, Jul 1, 21, 01:57, 3 Years ago
Wed, Nov 24, 21, 11:48, 2 Years ago
Sat, May 14, 22, 00:50, 2 Years ago
;