Gopass: Regressions in 1.9

Created on 5 May 2020  路  4Comments  路  Source: gopasspw/gopass

Summary

This was partly discussed in https://github.com/gopasspw/gopass/issues/1323 but it was not addressed in https://github.com/gopasspw/gopass/pull/1327 .

  1. Before 1.9, I could execute gopass show -f when I wasn't in an X session, but now I get:
Error: failed to write to clipboard: exit status 1
  1. Before 1.9, gopass show -f didn't print:
Copied passwd to clipboard. Will clear in 45 seconds.

Which made sense to me since I use -f so I not only expect gopass to not put the password in the clipboard, but also to print it as is.

Steps To Reproduce

For regression (1), run outside an X session:

gopass show -f passwd

And you'll get:

Error: failed to write to clipboard: exit status 1

For regression (2), run inside an X session:

gopass show -f passwd

And see that it still prints:

Copied passwd to clipboard. Will clear in 45 seconds.

Expected behavior

gopass show -f passwd prints nothing but tha password.

gopass show -f passwd works outside an X session and there it also, prints nothing but the password.

Environment

  • OS: NixOS
  • OS version: [uname -a]
  • gopass Version: Both latest master and latest version
  • Installation method: Distro & Git repo.

Additional context

This regression broke a few startup scripts which I had running before startx which I used to put some passwords in environmental variables.

Also, I think it should be possible to use gopass even without an X session running, even if autoclip is true. I expect the auto in autoclip to mean that gopass automatically detects if it's an X session or not, meaning it can decide for himself whether it'll be possible to put something in the clipboard or not. And not failed so ungracefully, with:

Error: failed to write to clipboard: exit status 1
bug

Most helpful comment

Thanks for reporting back. Glad to hear.
We will try to have a new release out soon.

All 4 comments

Failing gracefully when autoclip is true and no clipboard is available sounds good to me.

If gopass show -f wouldn't put the password in the clipboard would be great as well, because now I need to tail -1 the output if I want to pipe the password to another command.

Thanks! It all works as expected :+1: .

Thanks for reporting back. Glad to hear.
We will try to have a new release out soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blaggacao picture blaggacao  路  5Comments

braderhart picture braderhart  路  7Comments

nostdm picture nostdm  路  5Comments

sevenmaxis picture sevenmaxis  路  4Comments

Brixy picture Brixy  路  7Comments