Git Product home page Git Product logo

Comments (25)

carnager avatar carnager commented on July 27, 2024 2

You could do something like this: http://unix.stackexchange.com/questions/236746/change-pinentry-program-temporarily-with-gpg-agent

keep in mind: rofi-pass config is just a bash script too, so you can actually define variables in there.

from rofi-pass.

carnager avatar carnager commented on July 27, 2024 1

I should probably add this to the README

from rofi-pass.

carnager avatar carnager commented on July 27, 2024 1

It's not rofi-pass that spawns anything. it isn't even pass itself. it's gnupg that calls the helper.

from rofi-pass.

carnager avatar carnager commented on July 27, 2024

what clipboard did you set in config?

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024
# Clipboard settings
# Possible options: primary, clipboard, both
clip=primary

I've tried change primary to any of those with the same result.

from rofi-pass.

rhssk avatar rhssk commented on July 27, 2024

Had the same issue but then realized I had copied /etc/rofi-pass.conf 1:1 to ~/.config/rofi-pass while it is required to rename it to config. After that and changing clip from primary to clipboard everything works.

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024

@rhssk I hoped for this to be the case, but I just checked now, and the filename is ~/.config/rofi-pass/config 😞

from rofi-pass.

rhssk avatar rhssk commented on July 27, 2024

Can you put your config contents here? Also, after entering this echo -n "test" | xclip -selection clipboard in terminal can you paste the copied text ("test")?

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024

Yep, that command works.

# permanently set alternative root dir
# root=/path/to/root

# rofi command. Make sure to have "$@" as last argument
_rofi () {
    rofi -i -width 700 -no-levenshtein-sort "$@"
}

# keyboard layout (set this to your actual layout. E.g. keyboard="de us"
#keyboard=us

# fields to be used
URL_field='url'
USERNAME_field='user'
AUTOTYPE_field='autotype'

# delay to be used for :delay keyword
delay=2

## Programs to be used
# Editor
EDITOR='gvim -f'

# Browser
BROWSER='google-chrome-beta'

## Misc settings

default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
auto_enter='false'
notify='false'

# color of the help messages
# leave empty for autodetection
help_color="#4872FF"

# Clipboard settings
# Possible options: primary, clipboard, both
clip=clipboard

# Options for generating new password entries
default_user=Brottweiler
default_user2=Brott
password_length=24

# Custom Keybindings
autotype="Alt+1"
type_user="Alt+2"
type_pass="Alt+3"
open_url="Alt+4"
copy_name="Alt+u"
copy_url="Alt+l"
copy_pass="Alt+p"
show="Alt+o"
copy_entry="Alt+2"
type_entry="Alt+1"
copy_menu="Alt+c"
action_menu="Alt+a"
type_menu="Alt+t"
help="Alt+h"
switch="Alt+x"
insert_pass="Alt+n"

from rofi-pass.

rhssk avatar rhssk commented on July 27, 2024

Can you even get the unlocked password with rofi-pass? Try selecting record, hit Enter and choose pass. Does it print anything relevant at all?

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024

@rhssk Now when you say it, I don't even get anything regarding unlocking with gpg key... Surely I'd need to type my passphrase somewhere?

If I click Enter to choose an entry, then Enter on pass, nothing happens. Or, the rofi window disappears, that's what happens.

from rofi-pass.

rhssk avatar rhssk commented on July 27, 2024

Yes, you should get some kind of dialog menu asking for your GPG passphrase. Does running plain pass with any password record from terminal work for you?

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024

Plain pass shows me all my different websites and accounts. Obviously, pass somesite.com/account gives me the pinentry to write password (for me, pinentry-curses, not a GUI one). After I've typed my passphrase in, terminal shows me my password. And then ofcource I can use -c to copy it to clipboard.

from rofi-pass.

rhssk avatar rhssk commented on July 27, 2024

I assume you're on Ubuntu so I'm not familiar with their packages, but you should make sure that you have the GUI one available as pinentry-curses would obviously need a terminal called first (I doubt rofi-pass can do that for you). I just checked and there seem to be some GUI packages available. Try playing around with pinentry-qt and pinentry-gnome3 or pinentry-gtk2.

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024

Not sure why you think I am on ubuntu, but I am on arch 😛

Hmm, I edited my gpg-agent.conf file to use the qt one instead of curses, but I also assume I had to restart gpg-agent. I used killall for it, but not sure how to start it, so I just rebooted to let it start. pass gives me gpg: decryption failed: No secret key, so I need to solve that first...

from rofi-pass.

rhssk avatar rhssk commented on July 27, 2024

Couldn't find pinentry-curses in Arch repos but could in Ubuntu's. Turns out it is build in core/pinetry. You can just kill gpg-agent and it will be called when needed. I don't have anything configured in gpg-agent.conf besides default-cache-ttl, mostly default behavior. Check this section out: https://wiki.archlinux.org/index.php/GnuPG#pinentry

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024

I fixed my issue above. For reference, I think using killall gpg-agent is bad. From reading man gpg-agent, I killed gpg agent with gpgconf --kill gpg-agent, then started it with gpgconf --kill gpg-agent, and now it works.


@rhssk

% ls -l /usr/bin/pinentry*
lrwxrwxrwx 1 root root     14 Nov 27 18:54 /usr/bin/pinentry -> pinentry-gtk-2
-rwxr-xr-x 1 root root  64976 Nov 27 18:54 /usr/bin/pinentry-curses
-rwxr-xr-x 1 root root  52400 Nov 27 18:54 /usr/bin/pinentry-emacs
-rwxr-xr-x 1 root root  73488 Nov 27 18:54 /usr/bin/pinentry-gnome3
-rwxr-xr-x 1 root root  82160 Nov 27 18:54 /usr/bin/pinentry-gtk-2
-rwxr-xr-x 1 root root 115328 Nov 27 18:54 /usr/bin/pinentry-qt
-rwxr-xr-x 1 root root  56560 Nov 27 18:54 /usr/bin/pinentry-tty

So because I now use the qt default one (I backed up my gpg-agent.conf file), and already tried it out in terminal, I already identified. So now when I copy entries in rofi-pass, it works. So the issue was pinentry being curses and not a GUI one. Closing, thanks for the help.

from rofi-pass.

rhssk avatar rhssk commented on July 27, 2024

Cheers

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024

Since it's unrelated to the clipboard manager, I edited the title of this issue to reflect what the issue actually was; that the password didn't get copied, and that pinentry didn't show up at all.

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024

@carnager Do you think it would be possible, if having the curses pinentry enabled, to spawn a terminal? So instead of using the gtk one, and having a GUI pop up, you get a terminal to popup, with pinentry-curses. After entering the password successfully, it closes.

from rofi-pass.

rhssk avatar rhssk commented on July 27, 2024

You could specify pinentry program in you ~/.gnupg/gpg-agent.conf like this:
pinentry-program termite --exec="/usr/bin/pinentry-curses"
or if you're using urxvt
pinentry-program urxvt -e "/usr/bin/pinentry-curses"

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024

True, but then the issue is when I actually use the terminal to use pass, it will still launch a new terminal. First world problems...

from rofi-pass.

Brottweiler avatar Brottweiler commented on July 27, 2024

I'm trying to get the above script work with rofi-pass but I'm not being successfull. I've tried simply just copy pasting the script to the config, but all I get is the OK Pleased to meet you message which you get if you try to run the pinentry-gtk-2 for example by itself.

Any idea?

from rofi-pass.

xyakimo1 avatar xyakimo1 commented on July 27, 2024

I had a similar problem: when executing rofi-pass with an i3 key binding, pinentry didn't show up, but if I ran rofi-pass from a terminal emulator, everything worked fine and pinentry-curses was used. Installing the qt-based pinentry helped (sudo dnf install pinentry-qt on Fedora).

from rofi-pass.

xyakimo1 avatar xyakimo1 commented on July 27, 2024

Does anybody have an idea on how to make pinentry-curses work?

from rofi-pass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.