Copy passwords under pure Wayland

Options
2»

Comments

  • smgt
    smgt
    Community Member
    Options

    @Claudi It has always worked copying passwords from the browser extension (using firefox). When I switched to wayland from xorg I never seamed to be able to copy passwords from the electron app. Then one day, it just worked. So either 1password did something to the electron app or there was something I updated in the wayland stack. I run arch so I get the latest software releases.

    Maybe someone from 1Password can shed some light on the issue?

  • haizaar
    haizaar
    Community Member
    Options

    Good day,
    Besides clipboard, another issue for me is that ssh-agent doesn't work in wayland:

    Jun 27 16:48:01 ... 1password[45604]: INFO  2023-06-27T06:48:01.617 tokio-runtime-worker(ThreadId(4)) [1P:ssh/op-ssh-agent/src/lib.rs:358] ssh authorization prompt timed out
    Jun 27 16:48:01 ... 1password[45604]: [45604:0627/164801.620653:ERROR:browser_main_loop.cc(274)] Gtk: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
    

    No UI prompt is displayed, and e.g. git push just times out.

    $ git push
    sign_and_send_pubkey: signing failed for ED25519 "SSH GitHub 1password" from agent: communication with agent failed
    
  • mattya
    mattya
    Community Member
    Options

    Hello,

    I still can't get copying to work from the desktop app under Wayland on Fedora or Arch Linux (using Sway as the window manager). I am running the app like this:

    /opt/1Password/1password --log debug --enable-features=UseOzonePlatform --ozone-platform=wayland
    

    The app was installed from the official repositories.

    Below are some steps I took to attempt to debug the issue.

    I don't see any debug output for the clipboard except for this:

    DEBUG 2023-07-20T16:33:46.989 invocation_loop(ThreadId(21)) [1P:op-app/src/app/backend.rs:284] Invoked: FieldAction(OpAppFieldActionClickedRequest { item_id: <ItemRowId>, action: SecureCopy(<SecureCopyAction>) })
    

    I thought maybe 1Password was copying but the selection was being cleared. I ran the following command to check:

    wl-paste -w wl-paste
    

    However the selection never changes when I copy from 1Password.

    @smgt could you share more info about your setup since it works for you?

    I looked at the https://github.com/1Password/arboard library and tried running the examples. The "hello_world" example does work for me if I enable the "wayland-data-control" feature. So the library itself does seem to work, just not the 1Password app for some reason.

  • Claudi
    Claudi
    Community Member
    Options

    The "hello_world" example does work for me if I enable the "wayland-data-control" feature

    Interesting point. Look at this:

    $ strings /opt/1Password/resources/app.asar.unpacked/index.node | grep -i --color=always 'arboard' | wc -l
    81
    
    $ strings /opt/1Password/resources/app.asar.unpacked/index.node | grep -i --color=always 'wl-clipboard-rs' | wc -l
    0
    

    No signs of wl-clipboard-rs whatsoever?
    Could it be that the development team simply has forgotten to turn on the wayland-data-control feature?

    The fix would be to change just a single line in their Cargo.toml, right?

    E. g., the line

    arboard = "3.0"
    

    would have to be changed to:

    arboard = { version = "3.0", features = ["wayland-data-control"] }
    

    Could it be that this is all it takes to fix the issue? Or am I on the wrong track?

  • pluiedev
    pluiedev
    Community Member
    Options

    1Password is currently the only reason I'm stuck with X11 — Xwayland mode didn't even work for me (it showed a simple black screen instead) and while the Electron app does run on Wayland natively with flags, the SSH signer I depend on is completely broken (Git simply complains that the signer didn't appear to do anything and there's no pop up asking me to input credentials.)

    Can we get more momentum for fixing this, please? I'd really like to use my graphics tablet and swipe gestures that aren't available on X11 🤦🏻‍♀️

  • solarizde
    solarizde
    Community Member
    Options

    Guys...

    That being said, currently 1Password for Linux does not support Wayland.

    since when is that? What is making 1p to revert back to X Only? It worked in the past flawless for me in wayland.

    Are you aware that all major DE going wayland in 2024? With KDE6 and Gnome 45 wayland is default before X. It still puzzles me how nowadays it can be ignored so hardly...

    thats a real bummer.

  • solarizde
    solarizde
    Community Member
    Options

    Addition to this:

    Can confirm - what once worked flawless is now broken. I still can start 1password under wayland but all clipboard interaction is now completely broken also some parts of the UI does not respond anymore :(

  • papabryce
    papabryce
    Community Member
    Options

    Are there any updates on this? I need to use Wayland because I use two different monitors at two different scales. On XWayland, 1Password is huge on my second monitor.

  • solarizde
    solarizde
    Community Member
    Options

    Good finding @Claudi I bet this would at least solve some of the issues. Unfortunately it is currently more than just the clipboard. I hope the future com of the 1p Team will be a bit more inclusive on that problem. This is not just a "small glitch" I really fear that with current lack of coms with a major thing like Wayland that they might drop linux support (Not abandon their 1p linux but make it unsupported) fully when more and more moving away to wayland.

    Still I cant understand the whole Linux community, even normally very slowly adapting distros, jumping on the wayland train and 1p... yeah no let`s dont go there.

  • markstos
    markstos
    Community Member
    Options

    Copying from Quick Access is still not working with Sway/Wayland on Arch Linux whether I launch 1Password as an XWayland or Wayland app.

  • Keloran
    Keloran
    Community Member
    Options

    For me 1Password and jetbrains are the ones that run in xwayland, but when I run 1p native, it sometimes can’t inject to clipboard, so I would rather have it working rather than hit/miss, and when it’s in xwayland it never has issues

  • Claudi
    Claudi
    Community Member
    Options

    To the 1Password support team: I don't understand why you're not prioritizing this. How is copying passwords not a crucial feature that's supposed to work?

    It's been three years and I'm still stuck with an unusable desktop app. Can you imagine how I'm feeling about this, given that I've been a paying customer for more than 15 years?

  • hallettj
    hallettj
    Community Member
    edited April 28
    Options

    I was investigating why NixOS doesn't automatically enable native Wayland support for 1Password the way it does with most Electron apps when you set the environment variable NIXOS_OZONE_WL. It turns out the relevant line is commented out, and there is a link to this thread. https://github.com/NixOS/nixpkgs/blob/61b6a6ae6f11d013ab29cc85e0234fa2001af8dd/pkgs/applications/misc/1password-gui/linux.nix#L138

    I suppose I can see why they think lack of copy functionality is a reason to keep the app running in X11 mode. But it's kinda inconvenient for me since I'm using a window manager that doesn't implement XWayland.

  • hallettj
    hallettj
    Community Member
    Options

    For frustrated users here, there is a workaround that I haven't seen mentioned. But it is clunky. I'm sure most posters here know Linux has two selections:

    • clipboard selection which is accessed with ctrl+c / ctrl+v
    • primary selection where you copy by selecting text, and paste with middle click or shift+insert

    In native wayland mode copying from 1password to the clipboard does not work, but the primary selection does. To copy you can:

    • edit the password item
    • select text from the field you want to copy from
    • cancel editing
    • paste in another app with middle click

    I'm guessing that ctrl+c doesn't work because 1password intercepts that binding so that it can start the 90 second timer to clear the clipboard, and makes its own API call to store a value in the clipboard. Unfortunately since 1password is not using the appropriate clipboard API for wayland that has the side-effect of breaking copying with ctrl+c. I found that disabling the option to clear the clipboard does not fix anything so I'm guessing that keybind intercept stays in place with our without that setting.

    I'm further guessing that if you use the primary selection workaround that selection is not automatically cleared after 90 seconds.

    Btw I'm new to 1password, and still in the trial period. I switched from Enpass because I couldn't get their app working in native wayland mode, and Enpass stopped working for me in Android browsers. Finding out belatedly that 1password's wayland support is lagging somewhat undercuts my reasoning for switching. The other option I considered was Bitwarden which does not seem to have any wayland issues. But there are enough things that I like about 1password that I'll probably stick with it.