! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-session does not stop gpg-agent
Status:
RESOLVED: DUPLICATE
Product:
Xfce4-session
Component:
General

Comments

Description Eric Toombs 2015-03-11 19:03:54 CET
xfce4-session will start gpg-agent, but it will not stop it at logout. On the next login of the same user, xfce4-session will check to see if gpg-agent is already running (which it will be) and not start another instance. The problem is that if the user is using gpg-agent's SSH agent support, SSH_AUTH_SOCK will not get incorporated into the environment on the second login. This is because xfce4-session doesn't start gpg-agent on the second login, so it doesn't have this information.

To solve this, xfce4-session must stop gpg-agent on logout if xfce4-session starts gpg-agent on login.

This is all with either enable-ssh-support in .gnupg/gpg-agent.conf, or with xfconf settings xfce4-session:/startup/ssh-agent/enabled = True and xfce4-session:/startup/ssh-agent/type = gpg-agent set.
Comment 1 Mikhail Efremov 2015-03-24 17:49:19 CET
I can't reproduce this with xfce4-session-4.12.1.
PID of gpg-agent is stored at session start and gpg-agent is stopped at logout.
Are you sure that gpg-agent is started by xfce4-session? If not, then xfce4-session will not stop it at logout, of course.
Comment 2 Eric Toombs 2015-03-25 00:14:57 CET
There was a minor release since then, so maybe it was fixed? I am pretty sure it was xfce4 that started it, since when I change the ssh agent to openssh ssh-agent, gpg-agent is not started. I'll try it again...
Comment 3 Eric Toombs 2015-11-16 08:22:00 CET
The problem is worse than I thought. xfce4-session loses track of a whole array of processes:

eric       414  0.5  0.0  36920  3832 ?        Ss   02:07   0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
eric       418  0.2  0.1  54660  5048 ?        S    02:07   0:00 /usr/lib/xfce4/xfconf/xfconfd
eric       421  0.0  0.0  17628   252 ?        Ss   02:07   0:00 /usr/bin/gpg-agent --sh --daemon --write-env-file /home/eric/.cache/gpg-agent-info
root       443  0.3  0.2 233876  9024 ?        Ssl  02:07   0:00 /usr/lib/upower/upowerd
eric       454  0.0  0.2 275128  8128 ?        Ssl  02:07   0:00 /usr/lib/gvfs/gvfsd
eric       466  0.0  0.1 406476  5548 ?        Sl   02:07   0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
eric       471  0.2  0.3 347732 12888 ?        SNl  02:07   0:00 /usr/lib/tumbler-1/tumblerd
eric       472  0.0  0.1 335316  6576 ?        Sl   02:07   0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
eric       489  0.0  0.0  36676  3488 ?        S    02:07   0:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
eric       494  0.0  0.1 216056  5168 ?        Sl   02:07   0:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
eric       501  0.1  0.2 309120  8436 ?        Ssl  02:07   0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
root       504  0.7  0.1 365064  7200 ?        Ssl  02:07   0:00 /usr/lib/udisks2/udisksd --no-debug
eric       521  0.0  0.1 351264  6396 ?        Sl   02:07   0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.13 /org/gtk/gvfs/exec_spaw/0
eric       526  0.0  0.1 191728  5528 ?        Ssl  02:07   0:00 /usr/lib/gvfs/gvfsd-metadata

To get this, I did a ps aux, logged into XFCE, logged out, then did another ps aux. All of the above processes weren't shut down.
Comment 4 Eric Toombs 2015-11-16 08:23:32 CET
BTW that happens with startx and slim. xfce4 is started from .xinitrc with the following line:
exec ssh-agent startxfce4
Comment 5 Maciej S. Szmigiero 2019-10-09 00:23:30 CEST
The patch attached to bug 12044 should also fix dangling gpg-agent and ssh-agent processes.
Comment 6 Skunnyk editbugs 2020-04-28 23:17:38 CEST
I confirm, the gpg-agent thing is fixed by bug #12044
But the problem of other process not terminated on logout is still here (maybe restart user bus on logout like gnome)

*** This bug has been marked as a duplicate of bug 12044 ***

Bug #11686

Reported by:
Eric Toombs
Reported on: 2015-03-11
Last modified on: 2020-04-28

People

Assignee:
Xfce Bug Triage
CC List:
6 users

Version

Version:
4.12.0

Attachments

Additional information