lxsession autostarts a ssh-agent process without exporting the environment variables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxsession (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Ubuntu Flavour: Lubuntu LTS 16.04
Package: lxsession
Version: 0.5.2-0ubuntu3
With default desktop.conf lxsession autostarts an instance of
ssh-agent, which is unusable.
Also, without looking at the source code the user does not know how to disable this behaviour.
Default entry in ~/.config/
keyring/
~/.cache/
Message: app.vala:76: Launching /usr/bin/ssh-agent
SSH_AUTH_
SSH_AGENT_PID=1417; export SSH_AGENT_PID;
echo Agent pid 1417;
The process is started and is active in the process table:
$ ps aux |grep ssh-agent
user 1417 0.0 0.0 11140 316 ? Ss 14:52 0:00 /usr/bin/ssh-agent -s
user 2002 0.0 0.0 15752 948 pts/0 S+ 15:02 0:00 grep ssh-agent
Note: The process remains active after logout/exiting of the xsession.
So after next login there are two ssh-agent instances present, and so on.
The SSH environment variables are not set, thus
ssh-agent is unusabe and just a lurking process without any use:
$ env|grep SSH
# No results
The usual way to have a ssh-agent active is to use the
default Xsession setting.
For the above trial I manually disabled the ssh-agent started by the Xsession:
/etc/X11/
# use-ssh-agent
With the default settings two ssh-agents active: The working one
started from Xsession and the unusable one from lxsession.
Workaround:
~/.config/
Replace setting
keyring/
with
keyring/
Removing the entry altogether does not work, because it is re-added on the next start of lxsession.
Suggested fix:
Remove hard-coded autostart of ssh-agent from lxsession.
Or get rid of the "keyring/command" feature completely
because starting of keyring services is done elsewhere (namely the Xsession startup scripts).
Status changed to 'Confirmed' because the bug affects multiple users.