You are not logged in.

#1 2022-06-11 23:34:41

Nimlot
Member
Registered: 2013-02-12
Posts: 19

gnome-keyring-daemon discover_other_daemon

After updating gnome-keyring-daemon to version 42.1, whenever I open a terminal I see:

discover_other_daemon: 1

Based on the Arch wiki, I have this in ~/.profile:

if [ -n "$DESKTOP_SESSION" ];then
    eval $(gnome-keyring-daemon --start)
    export SSH_AUTH_SOCK
fi

I found this forum post and this Reddit thread. I can see that gnome-keyring-daemon is also running as a service:

● gnome-keyring-daemon.service - GNOME Keyring daemon
     Loaded: loaded (/usr/lib/systemd/user/gnome-keyring-daemon.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-06-11 15:24:15 PDT; 1h 2min ago
TriggeredBy: ● gnome-keyring-daemon.socket
   Main PID: 48687 (gnome-keyring-d)
      Tasks: 4 (limit: 14228)
     Memory: 5.4M
        CPU: 95ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/gnome-keyring-daemon.service
             └─48687 /usr/bin/gnome-keyring-daemon --foreground --components=pkcs11,secrets --control-directory=/run/user/1000/keyring

Jun 11 15:40:06 zen gnome-keyring-daemon[48687]: The Secret Service was already initialized
Jun 11 15:40:06 zen gnome-keyring-d[48687]: The Secret Service was already initialized
Jun 11 15:40:06 zen gnome-keyring-daemon[48687]: The PKCS#11 component was already initialized
Jun 11 15:40:06 zen gnome-keyring-d[48687]: The PKCS#11 component was already initialized
Jun 11 15:40:12 zen gnome-keyring-daemon[48687]: The SSH agent was already initialized
Jun 11 15:40:12 zen gnome-keyring-daemon[48687]: The Secret Service was already initialized
Jun 11 15:40:12 zen gnome-keyring-d[48687]: The SSH agent was already initialized
Jun 11 15:40:12 zen gnome-keyring-daemon[48687]: The PKCS#11 component was already initialized
Jun 11 15:40:12 zen gnome-keyring-d[48687]: The Secret Service was already initialized
Jun 11 15:40:12 zen gnome-keyring-d[48687]: The PKCS#11 component was already initialized

However, if I remove the lines from ~/.profile, then shell tools (e.g., ssh) no longer use gnome-keyring for credentials.

Does anyone have any suggestions for a fix?

Last edited by Nimlot (2022-06-12 00:02:49)

Offline

#2 2022-06-12 05:43:15

dogknowsnx
Member
Registered: 2021-04-12
Posts: 335

Re: gnome-keyring-daemon discover_other_daemon

I'd suggest disabling the (new) service and keep starting the daemon from your ~/.profile...
EDIT: If you want to use systemd instead, keep exporting SSH_AUTH_SOCK and removing only the 'eval' line should work.

Last edited by dogknowsnx (2022-06-12 06:59:32)


Wayland.

"We are eternal, all this pain is an illusion" - Maynard James Keenan

Offline

#3 2022-06-13 12:42:07

robson75
Member
From: Poland
Registered: 2020-06-28
Posts: 112

Re: gnome-keyring-daemon discover_other_daemon

Don't add anything to the ~ / .profile file, just remove

systemctl --global disable gnome-keyring-daemon.socket

and then add it

systemctl --user enable gnome-keyring-daemon.service

Arch Linux Xfce+compiz - 64Bit Linux User #621110

Offline

#4 2022-06-13 14:57:46

Pavle
Member
Registered: 2022-06-04
Posts: 17

Re: gnome-keyring-daemon discover_other_daemon

Instead of disabling the service, why not configure it properly? That's what I attempted to do, anyway. I was able to create a unit file override for gnome-keyring-daemon.service that looks like this:

[Service]
ExecStart=
ExecStart=/usr/bin/gnome-keyring-daemon --foreground --components="pkcs11,secrets,ssh" --control-directory=%t/keyring

(so it simply includes ssh in the list of components, which is not present in the original unit file).


However, this is not enough, because you must also export the SSH_AUTH_SOCK environment variable. My solution was to add this to .bashrc:

export SSH_AUTH_SOCK=/run/user/$(id -u)/keyring/ssh

However, this all seems a bit too involved. I'm wondering if there's a better method. Is there another way to export this environment variable - perhaps from the unit file? There is also the socket unit (gnome-keyring-daemon.socket), which sounds like the perfect candidate to deal with exporting this variable. This goes beyond my expertise, though...

Last edited by Pavle (2022-06-13 14:59:55)

Offline

#5 2022-06-14 06:37:07

binarious
Member
Registered: 2022-06-14
Posts: 1

Re: gnome-keyring-daemon discover_other_daemon

dogknowsnx wrote:

I'd suggest disabling the (new) service and keep starting the daemon from your ~/.profile...
EDIT: If you want to use systemd instead, keep exporting SSH_AUTH_SOCK and removing only the 'eval' line should work.

This doesn't work for me. ssh asks for credentials which it doesn't when using eval.

Last edited by binarious (2022-06-14 06:38:50)

Offline

#6 2022-06-14 08:15:42

dogknowsnx
Member
Registered: 2021-04-12
Posts: 335

Re: gnome-keyring-daemon discover_other_daemon

binarious wrote:
dogknowsnx wrote:

I'd suggest disabling the (new) service and keep starting the daemon from your ~/.profile...
EDIT: If you want to use systemd instead, keep exporting SSH_AUTH_SOCK and removing only the 'eval' line should work.

This doesn't work for me. ssh asks for credentials which it doesn't when using eval.

What do you mean by "this" (there's more than one method)? My post was referring to the issue stated in the OP, where @Nimlot just quoted the wiki entry - EDIT: I doubt that he/she was using the entry verbatim (without adding the ssh component) (actually, if not specified, all components are initialized)...
Don't expect spoonfeeding (at least from me), do your own research - also see @Pavle s post...

EDIT#2: You could file a bug report stating that the 'ExecStart' array used in the systemd user service breaks ssh (in non-Gnome environments?)...

Last edited by dogknowsnx (2022-06-14 09:01:02)


Wayland.

"We are eternal, all this pain is an illusion" - Maynard James Keenan

Offline

#7 2022-06-27 10:54:50

RoundRobin
Member
Registered: 2022-06-27
Posts: 1

Re: gnome-keyring-daemon discover_other_daemon

sudo pacman -S gnome-keyring
systemctl edit gnome-keyring-daemon --user # clear ExecStart and add ssh to components

#[Service]
#ExecStart=
#ExecStart=/usr/bin/gnome-keyring-daemon --foreground --components="pkcs11,secrets,ssh" --control-directory=%t/keyring

systemctl --user enable gnome-keyring-daemon
systemctl --user start gnome-keyring-daemon

# as root
cat <<'EOF' > /etc/profile.d/keyring.sh
pgrep -u $(whoami) gnome-keyring-d && eval `gnome-keyring-daemon --start` && export SSH_AUTH_SOCK
EOF

Will work with shells as well as softwares like VSCode that might need access to ssh agent.

It's not perfect but I did not find a better solution so far ?

Last edited by RoundRobin (2022-06-27 10:58:01)

Offline

#8 2022-08-03 10:59:16

risr
Member
Registered: 2022-08-03
Posts: 1

Re: gnome-keyring-daemon discover_other_daemon

Nimlot wrote:

Based on the Arch wiki, I have this in ~/.profile:

if [ -n "$DESKTOP_SESSION" ];then
    eval $(gnome-keyring-daemon --start)
    export SSH_AUTH_SOCK
fi

I am using Zsh and the syntax seems to differ. Whereas the following code in Bash will test for empty string:

if -n string

In Zsh this will test for the opposite (not empty).

Change the test for Zsh to:

if -z string

Offline

Board footer

Powered by FluxBB