On Thu, 28 Jul 2022 10:08:22 -0500 David Wright <deb...@lionunicorn.co.uk> wrote:
> On Thu 28 Jul 2022 at 10:35:07 (-0400), Greg Wooledge wrote: > I did much the same … > > > My .xsession file contains only this line concerning ssh-agent: > > > > hash ssh-agent 2>/dev/null && eval "$(ssh-agent -s)" I don't appear to have a .xsession file at all: (Right after a "sudo updatedb") $ locate .xsession /home/chris/.xsession-errors /home/chris/.xsession-errors.old /home/chris/.xsession-startup-dump > > Looking for related stuff: > > … > > /etc/X11/Xsession.options:use-ssh-agent > > > > So, I suppose Debian is starting this ssh-agent via its Xsession > > even though I have my own .xsession file which is starting my own > > instance of ssh-agent. > > > > I guess you've already disabled that one...? $ grep ssh-agent /etc/X11/Xsession.options no-use-ssh-agent > > Anyway, your login is completely different from mine (you're using > > lightdm, while I'm using a console login and startx), so you'll > > have to pursue your own investigation from here. > > > > Given the order of the processes shown in your session-8, it looks > > like it might be an XFCE thing. Maybe start there? I can't help > > you with that, though. Fair enough. Thanks for your insight up to this point! > I assume that some process above ssh-agent has died, unintentionally > or otherwise. > > > > Any ideas where I might look next? Anyone know if it's possible > > > to ask systemd what process "externally created" a process in a > > > .scope? > > I'm not sure what you mean by this, unless it's the (wrong) idea that > systemd "injected" the ssh-agent into your scope, evidenced by its > parent being PID 1. My scope is clearly generated merely by logging > in. Everything in it is mine, all mine … … > All the parent/child relationships are as you would expect, except > that each xterm was started by a deceased instance of xtoolwait > (for correct placement) and so are all adoptees of PID 1. Hm. Okay, so now that those xterms are adoptees of PID 1, is there some way you could discover that the now-deceased parents from which PID 1 adopted them were instances of xtoolwait, if you didn't already know that? I'm thinking that if I could get the name of the now-dead process that started the unwanted ssh-agent process and then died and left ssh-agent to be adopted by PID 1, that would likely be a helpful clue. But I'm teetering on the very edge of my comprehension of the system here, and I have no idea whether that piece of information still exists once said parent process has died, or how to retrieve it if so. > I'd like to see the contents of $STARTUP before it's exec'd by > /etc/X11/Xsession.d/99x11-common_start, because that's what > actually does the business. Right before the exec statement in that file, I've added the line: echo "$STARTUP" >> ~/.xsession-startup-dump After logging out and back in, that .xsession-startup-dump file contains one line: x-session-manager /usr/bin/x-session-manager is a link (via /etc/alternatives) to /usr/bin/startxfce4 Cheers! -Chris