plattfot / pinentry-rofi

Rofi frontend to pinentry
43 stars 5 forks source link

How to add options to gpg-agent.conf #22

Closed lyca-knight closed 3 months ago

lyca-knight commented 3 months ago

Hello,

Maybe a dump question. But how would I use the -- OPTIONS in my gpg-agent.conf it works perfectly fine in the CLI with, for example: echo GETPIN | /usr/bin/pinentry-rofi -- -m DP-3 But as soon as I try to add something after, the binary (pinentry-program /usr/bin/pinentry-rofi) in my gpg-agent.conf the config doesn't work anymore.

plattfot commented 3 months ago

Hi,

Not a dumb question. I assumed you could just attached the options after the command in pinentry-program. But I just checked the source code for gnupg and it just expects the path to the pinentry program. So best you can do right now is to wrap it up in a shell script. Something like this should work (note not tested):

#! /usr/bin/bash

/usr/bin/pinentry "$@" -- -m DP-3

And use that script as the pinentry-program in the gpg-agent.conf file

lyca-knight commented 3 months ago

Nice. Thank you very much :) That was easier than I thought. xD Works perfectly fine :) Screenshot_2024-05-21-13-25-27_3840x1080
3840x2160
3840x2160