![flatpak ,gnome-keyring 初始状态,集合登录不存在](https://linux22.com/image/221299/flatpak%20%EF%BC%8Cgnome-keyring%20%E5%88%9D%E5%A7%8B%E7%8A%B6%E6%80%81%EF%BC%8C%E9%9B%86%E5%90%88%E7%99%BB%E5%BD%95%E4%B8%8D%E5%AD%98%E5%9C%A8.png)
env 是arm64 + Linux penguin 5.15....aarch64
在 Pithos 应用程序升级时,我需要安装 gnome-keyring。 Pithos 是第一个在这款新 chromebook 上运行的 flatpak 应用程序(dev linux 工作正常)。旧版的、非 Flatpak 版本的 Pithos 运行良好。新手希望这一切都能在我登录 Linux 的情况下正常工作,密钥环守护程序以钥匙串解锁的方式启动并运行,并且在从 Pithos 应用程序通过 dbus 进行调用时,来自链 + 密钥环的凭据会自动为应用程序提供适当的密码。
但...
当我以 Linux 用户身份登录 chromebook(此处使用 pin 而不是密码)时,我希望看到密钥环守护程序正在运行,但它没有运行。
在我尝试启动 Pithos 应用程序之前,密钥环守护程序不会启动。该应用程序在使用 dbus 调用提供的凭据的委托登录链上失败,并对保存 Pithos 密码的密钥环进行读取访问...
尝试启动 Pithos 应用程序后,密钥环守护进程终于出现:
rob@penguin:~$ ps aux | grep key
rob 1332 0.2 0.1 237724 8304 ? Sl 08:47 0:00 /usr/bin/gnome-keyring-daemon --start --foreground --components=secrets
但应用程序(pithos)在 dbus 调用上失败,未提供密码:
(pithos:2): Gtk-WARNING **: 19:33:03.075: Theme parsing error: adapta.css:11225:65: Using one color stop with linear-gradient() is deprecated.
ERROR - util:get_account_password:133 - Failed to lookup password sync, Error: g-io-error-quark: user interaction failed (0)
ERROR - util:on_password_store_finish:149 - Failed to store password, Error: g-io-error-quark: user interaction failed (0)
ERROR - util:get_account_password:133 - Failed to lookup password sync, Error: g-io-error-quark: user interaction failed (0)
不是 dbus 调试专家,但我的 dbus 日志有:
Jun 10 14:44:19 penguin dbus-daemon[194]: [session uid=1000 pid=194] Activating via systemd: service name='org.freedesktop.Flatpak' unit='flatpak-session-helper.service' requested by ':1.36' (uid=1000 pid=2419 comm="flatpak run io.github.Pithos " label="kernel")
Jun 10 14:44:19 penguin systemd[123]: Starting flatpak session helper...
Jun 10 14:44:19 penguin dbus-daemon[194]: [session uid=1000 pid=194] Successfully activated service 'org.freedesktop.Flatpak'
Jun 10 14:44:19 penguin systemd[123]: Started flatpak session helper.
Jun 10 14:44:19 penguin systemd[123]: Started app-flatpak-io.github.Pithos-2419.scope.
Jun 10 14:44:24 penguin xdg-desktop-por[1294]: Backend call failed: GDBus.Error:org.freedesktop.DBus.Error.Failed: Collection login doesn't exist
Jun 10 14:45:39 penguin xdg-desktop-por[1294]: Backend call failed: GDBus.Error:org.freedesktop.DBus.Error.Failed: Collection login doesn't exist
Jun 10 14:45:39 penguin xdg-desktop-por[1294]: Backend call failed: GDBus.Error:org.freedesktop.DBus.Error.Failed: Collection login doesn't exist
pretty clear fail in the above log:
Jun 10 08:47:10 penguin gnome-keyring-daemon[1332]: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory
Jun 10 08:47:10 penguin gnome-keyring-d[1332]: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory
但我不知道该怎么办..我应该安装seahorse还是libsecret-tools?
我如何通过 dbus 正确访问密钥环来继续/调试问题?
回复:钥匙圈,我认为 github 能够使用它,因为它需要钥匙串密码并继续推送到远程,但 git 不是通过 flatpak 运行:
Jun 10 11:03:32 penguin gpg-agent[2152]: gpg-agent (GnuPG) 2.2.27 starting in supervised mode.
Jun 10 11:03:32 penguin gpg-agent[2152]: using fd 3 for std socket (/run/user/1000/gnupg/S.gpg-agent)
Jun 10 11:03:32 penguin gpg-agent[2152]: using fd 4 for ssh socket (/run/user/1000/gnupg/S.gpg-agent.ssh)
Jun 10 11:03:32 penguin gpg-agent[2152]: using fd 5 for browser socket (/run/user/1000/gnupg/S.gpg-agent.browser)
Jun 10 11:03:32 penguin gpg-agent[2152]: using fd 6 for extra socket (/run/user/1000/gnupg/S.gpg-agent.extra)
Jun 10 11:03:32 penguin gpg-agent[2152]: listening on: std=3 extra=6 browser=5 ssh=4
Jun 10 11:03:32 penguin dbus-daemon[194]: [session uid=1000 pid=194] Activating service name='org.gnome.keyring.SystemPrompter' requested by ':1.24' (uid=1000 pid=2154 comm="pinentry --display :0 " label="kernel")
...
Jun 10 11:04:42 penguin gnome-keyring-daemon[1332]: asked to register item /org/freedesktop/secrets/collection/Default_5fkeyring/1, but it's already registered
Jun 10 11:04:42 penguin gnome-keyring-d[1332]: asked to register item /org/freedesktop/secrets/collection/Default_5fkeyring/1, but it's already registered
答案1
我是这样解决的:
- 安装
seahorse
- 创建一个新的钥匙串,名称=
login
- 解锁#2中的链条
下次我尝试启动应用程序时,应用程序提示我输入密码,并将dbus
其gnome-keyring
添加到正确的链中,一切都很好。
在上述之后,login.keyring
存在并且被解锁,所以我想我解决了它。
rob@penguin:~$ ls -l .local/share/keyrings/
total 12
-rw-r--r-- 1 rob rob 15 Jun 9 14:57 default
-rw------- 1 rob rob 813 Jun 11 13:19 Default_keyring.keyring
-rw------- 1 rob rob 327 Jun 11 13:24 login.keyring
-rw------- 1 rob rob 0 Jun 10 11:04 user.keystore