Solved run gnome-keyring-deamon with dbus

how to run gnome-keyring-deamon using dbus while logging into the system using slim.

I would like to log into the system using slim so that it automatically unlocks gnome-kering-deamon.
I do not want to log in to the system, and every time after logging,
when I run a program using the key database to unlock it with password.
Is it possible using dbus ??
 
With Gnome it should be automatically loaded already. Are you using some other DE or WM?

SLiM should start a proper ConsoleKit/DBus session already. How is your ~/.xinitrc setup?
 
It's been a while but doesn't XFCE have an option to start various applications when you login?
 
SirDice, every environment can running programs on startup ... I can run gnome-keyring-deamon on startup in xfce4/mate..

My point is to automatically unlock the gnome-keyring-deamon when starting. For example Linux uses PAM mechanism.
Unlocks gnome-keyring with a login and password when logging into the system. I read somewhere that, this can also be done using the dbus mechanism. But I can't do it to work
 
My point is to automatically unlock the gnome-keyring-deamon when starting. For example Linux uses PAM mechanism.
Unlocks gnome-keyring with a login and password when logging into the system. I read somewhere that, this can also be done using the dbus mechanism. But I can't do it to work
I'm guessing this actually talks to systemd in order to get the authentication info. Do you happen to know the exact commands that are used on Linux?
 
In Linux ( Debian), I use PAM to start to authentication in gnome-keyring-deamon (on KDE)
by this way:
I have tried to configure PAM on FreeBSD with XDM , but there isn't some PAM modules in FreeBSD
so I would like run gnome-keyring-deamon authentication with DBUS mechanism.
 
so I would like run gnome-keyring-deamon authentication with DBUS mechanism.
Like I said, you would be talking to systemd in that case.

Note that security/gnome-keyring does come with a PAM module, it's /usr/local/lib/pam_gnome_keyring.so though. So you will need to use the full path in your PAM config. I don't know if this actually works, I don't use Gnome (or anything related to it).
 
If you log into system with slim, it processes xinitrc, right ? You can start keyring there.
Code:
# Gnome keyring
eval $(/usr/local/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
 
I think, I've got it - you want to use password protected keyring ?
Make /usr/local/etc/pam.d/slim look like
Code:
auth        include        system
auth           optional    pam_gnome_keyring.so
account        include        system
session        include        system
session        optional        pam_gnome_keyring.so auto_start
password    include        system

On the first unlock request, additional checkbox will appear. Something like 'unlock keyring automatically'. After you enter keyring password if it equals account password, keyring will be unlocked automatically on next login.

You need to build slim with PAM option, obviously.
 
abishai thanks .
Its working now

I have installed packages:
root@freebsd /home/yampress # pkg info |grep gnome-keyring
gnome-keyring-3.28.2_2 Program that keeps passwords and other secrets
gnome-keyring-sharp-1.0.2_5 Fully managed implementation of gnome-keyring

and I have edit two configuration files
~/.xinitrc
/usr/local/etc/pam.d/slim
 
I have DE Enligntement and DM LightDM, but i can't setting gnome-keyring for ssh keys.

1)For run gnome-keyring only need enabled three system service via default launch application on E
2)For init evironment variable (SSH_AUTH_SOCK) needed use ~/.xprofile. LightDM is ingnore ~/.xsession and ~/.xinitrc

My problem:

1) Can't unlock default keyring. I update /usr/local/etc/pam.d/lightdm and /usr/local/etc/pam.d/lightdm-greeter. But nothing works.
2) Can't use enlightement_askpass by default if trigger gnome-keyring. I set envar SSH_ASKPASS and SSH_ASKPASS_REQUIRE. If i run ssh-add then open GUI of E, but if i run `ssh -T git@github.com` opened GUI Seahorse.
3) Can't save password for ssh key. I can save password manually in keyring via Seahorse or secret-tool, but no effect. Every time system request password from key. I found some information - need use tool expected and write script, but not tested - it's very hard now settings.

I want easy copy my private keys, adds his to agent and after login in system - never not enter password.
 
Back
Top