KDE 5.3.94, I am trying to figure out what launches ssh-agent or dbus-agent on login?

I had initially crafted a script that would spawn a ssh-agent on login and ask for my passphrase till I noticed they are two ssh-agent processes running. One spawned by the script that I wrote and another spawned by dbus-launch. See below:

/usr/bin/dbus-launch  --sh-syntax --exit-with-session  /usr/bin/ssh-agent /usr/bin/gpg-agent  --sh --daemon --keep-display  --write-env-file  /home/lhorace/.gnupg/agent.info-linux-0egw:0  /etc/X11/xinit/xinitrc

So for, running find and grep, “find / -mount -type f -exec grep -Iq ‘dbus-launch’ {} ; -and -print”. Only spewed out the following files:


/usr/bin/startkde has a reference on line 296, see below:

# Make sure that D-Bus is running
# D-Bus autolaunch is broken
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
    eval `dbus-launch --sh-syntax --exit-with-session`

But that doesn’t seem right is it ? Is dbus-launch on first init, polls some directory ?
Does perhaps anyone else know another location?


The agents are run by /etc/X11/xdm/sys.xsession (at least on OpenSuSE 13.2).

And BTW grep has “-r” these days, no need for a very convoluted find command :wink:

Interesting :slight_smile: That’s good to know. Thank you for sharing.