7

I am currently running Crunchbang Linux with Openbox, and as soon as I log in I have an ssh-agent process running and I can't for the life of me figure why it is being autostarted.

Here is the ssh-agent process as well as its parent:

$ ps -ef | grep 2085
jonyamo   2085  1759  0 10:50 ?        00:00:00 /usr/bin/openbox --startup /usr/lib/openbox/openbox-autostart OPENBOX
jonyamo   2469  2085  0 10:50 ?        00:00:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager

It seems clear to me that it is being started via /usr/lib/openbox/openbox-autostart. So, investigating that file I found that there are three places it looks for processes to autostart: /etc/xdg/openbox/autostart, $HOME/.config/openbox/autostart, and /usr/lib/openbox/openbox-xdg-autostart.

  1. /etc/xdg/openbox/autostart is empty, so that's not it.

  2. $HOME/.config/openbox/autostart contains this potential culprit:

    eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,gpg) &

    However, I completely disabled that and ssh-agent still autostarts.

  3. /usr/lib/openbox/openbox-xdg-autostart is a script that starts xdg autostart .desktop files found in /etc/xdg/autostart/. But, apparently that is only starting the following processes:


   $ /usr/lib/openbox/openbox-xdg-autostart --list | grep "\[\*\]"
   [*] Print Queue Applet
   [*] PulseAudio Sound System
   [*] Network

Perhaps I am missing something completely obvious, but I would greatly appreciate anyone being able to help explain this mystery to me.

imz -- Ivan Zakharyaschev
  • 15,113
  • 15
  • 61
  • 123
J.C. Yamokoski
  • 2,083
  • 16
  • 17

2 Answers2

12

Edit /etc/X11/Xsession.options (on my machine, Ubuntu 12.04.2 LTS) and comment out use-ssh-agent

Michael Mrozek
  • 91,316
  • 38
  • 238
  • 232
edibleEnergy
  • 221
  • 2
  • 5
3

It's generally started by your X11 display manager. I don't know the popular alternatives to XDM these days, so I'll let someone else chime in.

2038b
  • 46
  • 1
  • 1
    I don't think it is the DM as I do not use one, I just login and `startx`. However, if I'm using fvwm (a stand-alone window manager like openbox), ssh-agent does not start automatically. If I'm using KDE, it does. So that points to the DE. OTOH, maybe both the DM and DE will do it (since jonyamo says it probably isn't openbox). – goldilocks Dec 14 '12 at 16:28
  • 2
    Not a very detailed answer, but it lead me to the right place. Crunchbang uses SLiM as a DM, which was upon login sourcing all files in `/etc/X11/Xsession.d` which contained a script that was starting `ssh-agent`. – J.C. Yamokoski Dec 14 '12 at 18:07