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
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to