Skip to main content
March 16, 2022
Question

v2 Client unable to connect to Desktop App

  • March 16, 2022
  • 13 replies
  • 1361 views

Hi there. I'm testing out the new v2 cli and it seems to be unable to connect to the desktop app.
I have enabled all the 'developer' settings in the v8 beta app. Any suggestions on how to debug this?

```
❯ op -v
2.0.0

❯ op account add
Biometric unlock integration with the 1Password app is enabled. Add an account through the 1Password app.

To learn how to add an account to the 1Password app, visit: https://support.1password.com/add-account

❯ op account list
[ERROR] 2022/03/16 13:10:30 connecting to desktop app: not connected
```

nearly all commands return connecting to desktop app: not connected


1Password Version: 8.6.0
Extension Version: 2.3.0
OS Version: 12.3

13 replies

September 15, 2022

Hey @ehllie!

I have good news for you: on Linux there is actually no requirement for the CLI binary to be in /usr/local/bin/op (the online documentation seems to contradict this; I'll get that fixed 😀).

On Linux, it is important that the CLI is owned by a group named onepassword-cli and has the setgid bit set. Check the https://developer.1password.com/docs/cli/get-started#requirements in the Getting Started guide how to do that (you can ignore the part about the /usr/local/bin/op).

Let me know if that helps.

Joris

September 15, 2022

Ah, that's true. Turns out I installed 1password somewhat incorrectly. I only added _1password and _1password-gui to environment.systemPackages, but all that did was add their binaries to my path. The correct way to install them, with the ability to use the gui integration, was to enable them in the nixos configuration like so:
nix
programs = {
_1password.enable = true;
_1password-gui = {
enable = true;
polkitPolicyOwners = [ "my-user-name" ];
};
};

In hindsight, the documentation https://search.nixos.org/options?&query=_1password even mentions my specific issue, but I suppose I did not read it carefully enough. But it all works now at least. Thank you for the quick response!

September 16, 2022

Good to hear you got it to work!

To make sure that others don't run into similar problems with NixOS in the future: is there anything that we could add to our documentation (on developer.1password.com) that could make it easier to get the CLI to work on NixOS? Would it be enough to add the snippet you shared and tell users to add that to environment.systemPackages?

Joris