lxsession autostarts a ssh-agent process without exporting the environment variables

Bug #1733102 reported by sd2k9
10
This bug affects 2 people
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/lxsession/Lubuntu/desktop.conf:
keyring/command=ssh-agent

~/.cache/lxsession/Lubuntu/run.log:
Message: app.vala:76: Launching /usr/bin/ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-A10sicv2SxII/agent.1405; export SSH_AUTH_SOCK;
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/Xsession.options
# 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/lxsession/Lubuntu/desktop.conf
Replace setting
keyring/command=ssh-agent
with
keyring/command=echo Dummy command to disable automatic start of ssh-agent

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).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lxsession (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.