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

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

Emacs daemon as a systemd service can't use ssh-agent


From: Julien Cubizolles
Subject: Emacs daemon as a systemd service can't use ssh-agent
Date: Sun, 30 Oct 2016 00:45:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

I'm starting Emacs as a daemon with a systemd user service, as per
http://www.wikemacs.org/wiki/Emacs_server. It's mostly working fine but
it doesn't seem to be able to use the ssh-agent running in the graphical
session (I'm running gnome-shell): I get asked for my password every
time as use a tramp connection. For some reason, gpg-agent doesn't have
this problem: the first time I access an encrypted file, I get a dialog
box asking for the passphrase but I don't have to enter it the
subsequent times.

One workaround I found it to use keychain to manage both gpg-agent and
ssh-agent once the session is started and then use
the keychain-environment.el to import the relevant environment
variables. Emacs can then use ssh-agent.

I'm however looking for a way to have my display manager (gdm) ask for
the ssh and gpg passphrases at login and somehow make Emacs aware of
them. How would you do it ?

Julien.






reply via email to

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