-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the keyring python module with gnome-keyring #609
Comments
Keyring tries to use the most relevant backend available, and in your environment, it believes the kwallet.DBusKeyring is the best backend for your environment. You can see that preference in the debugging command (DBusKeyring has the highest priority at 4.9). My guess is you probably want to be using the See the section in the readme on configuring for headless Linux systems, which gives some tips around making the SecretService backend work in constrained environments. You can also manually construct that backend:
You'll get an exception when You can configure keyring to manually use that keyring on your system, but that's not going to help you any if that keyring isn't viable, so I'm assuming you don't want that. When it comes to coding for others to use, you'll want to simply use Hope that helps. |
Is there anything odd about your terminal or shell session, which could cause an environment variable from your login not to show up there? D-Bus is normally launched, and that environment variable set, when you log in. There is a fallback way to find the D-Bus session bus using X11, which might be how |
Not exactly a bug, but a lack of documentation. Sorry if it is not the right use of keyring.
In a shell script I can get a needed password from gnome-keyring to a variable or feed it via pipe to some program:
If I got it right, keyring can be used for the same purpose in a python script. I could not find any minimal working example example to do that in python with keyring module. There probably must be a better way than using
os.popen(cmd).read()
with the above shell command...The example from the README file
launces "KDE Wallet Service" configuration which is not relevant for me, since I use gnome-keyring...
Thank you!
Environment
The text was updated successfully, but these errors were encountered: