You are not logged in.

#1 2017-10-06 22:54:52

nicolo
Banned
Registered: 2013-08-10
Posts: 90

[solved] gnome keyring with dmw and gdm

i have gnome display manager at login, where i can choose between dwm and gnome desktop enviroment.
notice that dwm per se starts fine.
i don't know how to tell gdm to unlock my gnome keyring in case i choose the dwm option at login.
according to the wiki i just need to have libgnome-keyring installed and the keyring named login, which i have done.
the possible things to modify i can think of are either /usr/share/xsessions or /usr/share/gnome-session or my .xinitrc,
with something like

eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
dbus-launch --exit-with-session dwm &

but i don't know how to proceed.

Last edited by nicolo (2017-10-10 15:10:53)

Offline

#2 2017-10-06 23:03:40

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [solved] gnome keyring with dmw and gdm

If you're using GDM then your ~/.xinitrc is irrelevant, GDM doesn't use it.

There's an autostart patch for dwm, have you tried this?
https://dwm.suckless.org/patches/autostart


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-10-06 23:14:13

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved] gnome keyring with dmw and gdm

..and even if it did use it, it would never start GDM because there are two exec lines. The wiki makes that abundantly clear.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2017-10-07 03:27:34

nicolo
Banned
Registered: 2013-08-10
Posts: 90

Re: [solved] gnome keyring with dmw and gdm

thanks, i did not know about that patch, i will look into it.

(always very useful comments)

Offline

#5 2017-10-07 04:27:27

nicolo
Banned
Registered: 2013-08-10
Posts: 90

Re: [solved] gnome keyring with dmw and gdm

i find that the suggested patch indeed works, if i put the following in autostart.sh

/usr/bin/gnome-keyring-daemon --start
export SSH_AUTH_SOCK
export GPG_AGENT_INFO
export GNOME_KEYRING_CONTROL
export GNOME_KEYRING_PID

Offline

#6 2017-10-07 04:47:04

nicolo
Banned
Registered: 2013-08-10
Posts: 90

Re: [solved] gnome keyring with dmw and gdm

actually, it only works if i was previously logged into gnome desktop, but not upon reboot. i must still be missing something...

Offline

#7 2017-10-07 09:11:25

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [solved] gnome keyring with dmw and gdm

Why do you have...

nicolo wrote:
/usr/bin/gnome-keyring-daemon --start
...

instead of...

eval $(gnome-keyring-daemon --start)
...

?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#8 2017-10-07 16:07:20

nicolo
Banned
Registered: 2013-08-10
Posts: 90

Re: [solved] gnome keyring with dmw and gdm

no particular reason, i was trying various possibilities.
actually, i'm now confused: yesterday the combination i wrote in post #5 seemed to work, at least until i reboot, while today it does not, even if i just log out and in, neither does

eval $(/usr/bin/gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
export GPG_AGENT_INFO
export GNOME_KEYRING_CONTROL
export GNOME_KEYRING_PID

Last edited by nicolo (2017-10-07 16:07:52)

Offline

#9 2017-10-07 18:07:07

nicolo
Banned
Registered: 2013-08-10
Posts: 90

Re: [solved] gnome keyring with dmw and gdm

is it possible that i'm not configuring correctly /etc/pam.d/gdm-autologin file? at present it looks like

auth     requisite pam_nologin.so
auth     required  pam_env.so
auth     optional  pam_gdm.so
auth     optional  pam_gnome_keyring.so
auth     optional  pam_permit.so
account  include   system-local-login
password include   system-local-login
session  optional  pam_keyinit.so force revoke
session  include   system-local-login
session  optional  pam_gnome_keyring.so auto_start

Offline

#10 2017-10-09 01:54:12

nicolo
Banned
Registered: 2013-08-10
Posts: 90

Re: [solved] gnome keyring with dmw and gdm

i've also tried what's suggested in https://wiki.archlinux.org/index.php/GN … ing_daemon but it doesn't seem to work

Offline

#11 2017-10-09 02:27:13

nicolo
Banned
Registered: 2013-08-10
Posts: 90

Re: [solved] gnome keyring with dmw and gdm

now i'm even more puzzled: even without dwm autostart script (and without any other modification i mentioned previously, not even export), just typing in a terminal in dwm

chromium --password-store=gnome

gives access to my secrets. however for example the network manager does not see the networks that i made available to my user only. could it be that i'm missing something in the way dwm interacts with such programs and makes them use the keyring, rather than in initializing the keyring itself?

Offline

#12 2017-10-10 15:10:36

nicolo
Banned
Registered: 2013-08-10
Posts: 90

Re: [solved] gnome keyring with dmw and gdm

also in the network manager case, just starting nm-applet solves the issue, so it was more due to initializing single programs correctly than making the keyring available at login, which indeed happens out of the box. marking as solved

Offline

Board footer

Powered by FluxBB