On Mon, Feb 18, 2013 at 1:16 PM, Oleksii Shevchuk <alx...@gmail.com> wrote: > I use this (with pam_gnome_keyring): > > > cat gnome-keyring-env.service > [Unit] > Description=Setup gnome keyring environment > > [Service] > Type=oneshot > ExecStart=/bin/sh -c "for env in $(gnome-keyring-daemon -s); do systemctl > --user set-environment $env; done" > ExecStop=/bin/sh -c "for env in GNOME_KEYRING_CONTROL SSH_AUTH_SOCK > GPG_AGENT_INFO; do systemctl --no-block --user unset-environment $env; done" > RemainAfterExit=yes > > [Install] > WantedBy=env.target
an alternative for ssh-agent is to just run it statically as a service with one location: ssh-agent.service: ==== [Unit] Description=SSH key agent [Service] Type=forking Restart-on-failure ExecStart=/usr/bin/ssh-agent -a %t/ssh-agent [Install] WantedBy=default.target ==== you'll have to run systemd --user with the following environment set in the user-session@.service >>> Environment=SSH_AUTH_SOCK=%t/ssh-agent <<< that way, the agent should work at all times under a user session. Auke _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel