plattfot / pinentry-rofi

Rofi frontend to pinentry
43 stars 5 forks source link

-- mode: org; coding: utf-8; --

SPDX-FileCopyrightText: 2023 Fredrik Salomonsson plattfot@posteo.net

#

SPDX-License-Identifier: GPL-3.0-or-later

+TITLE: README for Pinentry-Rofi

*** Guix on a foreign distro

If you are running guix on a foreign distro, you need to make sure
the =GUIX_LOCPATH= environment variable is passed to the gpg-agent
otherwise rofi will fail to set the locale and therefore cannot
launch. Which result in the pinentry aborting.

On a distribution that is using systemd (here I'm using Arch Linux
as an example) simply run:

#+begin_src shell
  echo "GUIX_LOCPATH=$GUIX_LOCPATH"
#+end_src

Copy that, then run:
#+begin_src shell
  systend --user edit gpg-agent.service
#+end_src

And add it in the =override.conf=:
#+begin_src conf
  [Service]
  Environment=GUIX_LOCPATH=%h/.guix-profile/lib/locale
#+end_src

On my system, =GUIX_LOCPATH= points to the default profile i.e.
=$HOME/.guix-profile/lib/locale=. =%h= in systemd gives you the
path to the home directory. This should be the case for most
people, but if your =GUIX_LOCPATH= points to something different
change the =override.conf= to reflect that.

** Arch Linux The =PKGBUILD= file for arch is in the =build-aux=, so just run:

+begin_src shell

 cd build-aux
 makepkg -ic

+end_src

The binary location is then /usr/bin/pinentry-rofi.

** From Source

See [[file:HACKING][HACKING]] on how to build this from source