help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accessing emacsclient environment variables.


From: Abutalib Aghayev
Subject: Accessing emacsclient environment variables.
Date: Sun, 06 Jul 2014 14:39:36 -0400

Hi all,

On machine "foo", I start emacs as a server using "emacs --daemon" and
on machine "bar" I do remote editing by running "ssh -A foo emacsclient
-c".  The -A switch is to enable SSH Agent Forwarding.

Now, when I run shell in emacsclient (M-x shell), the shell does not
have SSH_AUTH_SOCKET properly set, which is normal, since emacs server
was started locally and M-x shell uses server's environment to launch a
shell.

However, emacsclient has the correct SSH_AUTH_SOCKET value in its
environment -- I can verify that by running "cat
/proc/pid-of-emacs-client/environ".

Is there a way of accessing emacsclient's environment variable or at
least its process id, so that I could set SSH_AUTH_SOCKET before
launching shell?  Better yet, is there a simpler way to solve this
problem?

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]