nmcli 无法使用秘密服务,除非 nm-applet 在后台运行

nmcli 无法使用秘密服务,除非 nm-applet 在后台运行

我已经pass配置pass_secret_service好,以便我的 Wifi 密码存储在该秘密服务(org.freedesktop.Secret.Service)中。因此,当我连接到 Wifi 网络时,网络管理员应该向特勤局询问密码。

但是,当我尝试使用 连接到网络时nmcli,它不起作用:

$ nmcli connection up Foobar
Passwords or encryption keys are required to access the wireless network 'Foobar'.
Warning: password for '802-11-wireless-security.psk' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
Error: Connection activation failed: Secrets were required, but not provided

但如果我nm-applet在后台运行,那么它会起作用:

$ nm-applet &

$ nmcli connection up Foobar
Passwords or encryption keys are required to access the wireless network 'Foobar'.
Warning: password for '802-11-wireless-security.psk' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/15)

nm-applet为什么不在后台运行就无法运行?任何想法如何解决这一问题?

相关内容