Closed andsens closed 2 years ago
Ehhh, this one seems cool, but I hestitate for....
All fair points. (3) could be fixed with $(id -u)
or something, but I get your point. It's all quite experimental.
I would prefer to keep this as an unmerged PR or "tips" issue. So people can find it by search/query and see the ideas.
Update! Closing this one as the workaround is no longer needed :-D
Make sure you have wsl >= v0.67.6 (https://github.com/microsoft/WSL/releases) and enable systemd by following this guide: https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/
Actually... pinentry-qt and pinentry-gtk2 work now as well. It would seem the latest update addresses a lot of issues.
It's now possible to run systemd in wsl: https://itzenplitz.net/posts/wsl-enabling-systemd-ubuntu22.04/
This means there is no need to have all these workarounds for starting gpg-agent. However, there are still some pain points regarding systemd interoperability with WSL. Specifically $PATH is reset to the system paths, meaning we can't invoke powershell.exe. Additionally WSL_INTEROP is not set. This changes works around both issues.
p.s.: Note that to interact with
systemctl --user
you need to change$XDG_RUNTIME_DIR
so it points to/run/user/1000
.