You are not logged in.

#1 2023-02-24 22:22:10

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 205

Docker container Arch Linux - start gnome-keyring daemon

Hello,
I'm using Arch Linux container by docker and I would like to use gnome-keyring for storing secrets. I searched several posts on Internet about some issues related to gnome-keyring usage in container but still I didn't find any working solution.

According to some web resources, for running GNOME keyring headless, I run the container in the following manner:

sudo docker run --rm --cap-add ipc_lock -ti test/arch

and, according to https://unix.stackexchange.com/question … bsecret-an and similar resources, inside the container I run, as standard user:

eval "$(dbus-launch --sh-syntax)"

mkdir -p ~/.cache
mkdir -p ~/.local/share/keyrings # where the automatic keyring is created

# 1. Create the keyring manually with a dummy password in stdin
eval "$(printf '\n' | gnome-keyring-daemon --unlock)"

# 2. Start the daemon, using the password to unlock the just-created keyring:
eval "$(printf '\n' | /usr/bin/gnome-keyring-daemon --start)"

When I run the last command above for starting the daemon, I get the following message:

** Message: 22:09:16.869: couldn't connect to dbus session bus: Cannot spawn a message bus when AT_SECURE is set

and the daemon seems not to start, indeed, when I try to store a secret by secret-tool, I get the following error:

secret-tool store --label='test' attrib testvalue
Password:

secret-tool: Error calling StartServiceByName for org.freedesktop.secrets: Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)

If I execute the commands above by root user, it seems to work correctly, but if I switch to the standard user, it does not work. I would also like to avoid to use the root account. Is there a way to overcome the issue above for running gnome-keyring daemon as standard user?

Offline

Board footer

Powered by FluxBB