Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 841203 - gnome-base/gdm: gdm starts ssh-agent by default
Summary: gnome-base/gdm: gdm starts ssh-agent by default
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-26 23:00 UTC by Randall
Modified: 2022-05-31 01:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
journalctl -b | grep ssh (file_841203.txt,1.05 KB, text/plain)
2022-04-26 23:01 UTC, Randall
Details
/etc/gdm/Xsession (fixed) (file_841203.txt,6.18 KB, text/plain)
2022-04-26 23:05 UTC, Randall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randall 2022-04-26 23:00:37 UTC
On my main computer, I use a Yubikey to store my GPG key; which, in turn, I also use as an SSH key. FMU this is pretty standard use for Yubikeys, however it does depend on the gpg-agent acting as the ssh-agent.

To my surprise, upon moving over to GNOME, this wasn't working because the gpg-agent could not seem get control of the ssh-agent. It would seem that by the time systemd would start the gpg-agent at the User level, the ssh-agent was already started.

After some digging (and help from genr8eofl_) we found that the culpit was GDM. (see `journalctl -b | grep ssh`) We further found that upon commenting out lines 211-216 of `/etc/gdm/Xsession` it solves the problem, and let gpg-agent now able to function correclty.

That said, I didn't find much of this documented any where. Much less, any option to disable this behavior. I did discover that this is acutally intended by upstream, however, without any way to configure this option, I can see this being a problem for others with a similar use case. 

Therefore I would propose that prephaps it would be a good idea to make add a USE flag to GDM (such as `ssh` or `ssh-agent` or `remove-ssh`) to disable this behavior. I don't mind doing the PR, if determined this would be a good idea.

At the very least, this issue can serve as something of a reference.

Reproducible: Always
Comment 1 Randall 2022-04-26 23:01:17 UTC
Created attachment 774954 [details]
journalctl -b | grep ssh
Comment 2 Randall 2022-04-26 23:05:22 UTC
Created attachment 774957 [details]
/etc/gdm/Xsession (fixed)
Comment 3 Randall 2022-05-31 01:15:18 UTC
I found a way to disable using environment variables. 

I've documented how to disable it properly here: https://wiki.gentoo.org/wiki/GNOME/GDM#Stop_GDM_from_loading_SSH_Agent