Level up your business security with free, on-demand training and certification. Explore 1Password Academy today →
Forum Discussion
greysave
2 years agoNew Contributor
Linux 1password CLI annot connect to the desktop app
The server is running Ubuntu 22.04 and I get the following error:
op vault list
[ERROR] 2024/04/05 09:54:38 connecting to desktop app: cannot connect to 1Password app, make sure it is running
...
Michael_Mercuri
1 month agoDedicated Contributor
There appears to be more going on than just setting the environment variable that impacts how the 1Password CLI is allowed to talk to the 1Password Desktop app.
Just setting the environment variable is not enough.
I have my Wayland GNOME desktop configured to set both of these environment variables using ~/.config/environment.d/00-env.conf:
OP_BIOMETRIC_UNLOCK_ENABLED=true
OP_LOAD_DESKTOP_APP_SETTINGS=trueIf I launch WezTerm directly from the desktop launcher, WezTerm is unable to access the 1Password Desktop App using the 1Password CLI:
19:57:39.250 ERROR logging > lua: Failed to get password: [ERROR] 2026/03/24 19:57:39 error initializing client: connecting to desktop app: connection reset, make sure 1Password CLI is installed correctly, then open the 1Password app, select 1Password > Settings > Developer and make sure the 'Integrate with 1Password CLI' setting is turned on. If you're still having trouble connecting, visit https://developer.1password.com/docs/cli/app-integration#troubleshooting for more help.I'm able to verify that the WezTerm process does indeed have the environment variables set using `ps` or checking /proc/pid/environ.
However, if I first launch another terminal program and then launch WezTerm from there, WezTerm is able to use 1Password CLI to interact with 1Password Desktop App and read my vault.
What is the difference between launching `op` from an interactive shell in a terminal vs from another process launched directly by the desktop launcher?
And what do the `OP_BIOMETRIC_UNLOCK_ENABLED` and `OP_LOAD_DESKTOP_APP_SETTINGS` environment variables do?
And why would this behavior be different on Ubuntu 22 under X11 compared to Ubuntu 24 under Wayland?
Michael_Mercuri
2 days agoDedicated Contributor
Btw, for anyone reading this... my observation above was WRONG. Setting the OP_BIOMETRIC_UNLOCK_ENABLED had no impact. The CLI worked for me in these cases because I was executing it from my shell running in a terminal vs previously attempting to run it from a Lua-based plugin from within WezTerm where the CLI was not running inside a terminal (PTY).