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
...
thecatfix
2 days agoDedicated Contributor
hey 1P_Dave can you find someone who can answer Michael_Mercuri research. He did a **bleep** good job chasing down issues and is not getting any feedback.
Michael_Mercuri
2 days agoDedicated Contributor
I ended up submitting a support ticket on this and the 1Password engineering team was able to get me a work-around.
In my case, specifically, I was attempting to use 1Password CLI from a WezTerm plugin while WezTerm was launched from Pop!_OS COSMIC desktop launcher. When the plugin executes 1Password CLI, it’s not running in a PTY. Because there’s no PTY and because COSMIC desktop doesn’t populate the environment with typical GNOME session variables (e.g. SESSION_ID, INVOCATION_ID, and others) the desktop app refuses to allow the CLI to connect as a security measure because it can’t properly determine it was legitimately launched by the user.
So far, this has only been an issue for me with COSMIC. It does not occur with GNOME on Ubuntu 22 (X11) or Ubuntu 24 (Wayland). I intend on filing a bug against COSMIC related to this.
The work-around involves running the CLI in wrapper script that uses “script” command to temporarily create a PTY. It works but it’s not ideal. For me, I’d rather just launch WezTerm from another terminal session which also works.
I’ll follow-up if I get anywhere with a bug report against Pop!_OS COSMIC Desktop