I'm trying to write a python application that can unlock gnome-keyring from a text-only system (headless machine) and retrieve the credentials. I have the gnome-keyring package installed in this machine.
Basically, my application will:
- Start a new dbus session
 - Unlock the gnome-keyring in that dbus session
 - Extract the credentials from the keyring
 - Destroy the dbus session bus
 
I'm trying to follow this tutorial: https://pypi.org/project/keyring/#using-keyring-on-headless-linux-systems
I tried reading: Python DBUS SESSION_BUS - X11 dependency but, the OP uses dbus-launch instead of the dbus-run-session. The original man page for dbus-launch says to use 'dbus-run-session` for text-only systems.
If I start a new dbus session using python's subprocess, how can I run the step #2 in the same dbus-session?