Open diablodale opened 1 year ago
Looks great @diablodale! Thanks for the shoutout :-)
Remember that the user session itself still runs rather weirdly under an old-style init process, and not directly as a systemd session, which gives some trouble when you want to interact with systemd components (e.g. no dbus user session, systemctl --user
doesn't work). Doesn't look like this affects your changes, but it's just something to keep in mind :-)
(Started with wsl zsh -l
)
Hmmm, something is different in our systems. My tree is very different
I generated that by installing zsh into Ubuntu, choosing option 2 during zsh install. Then closed wsl and run wsl zsh -l
from the windows menu.
I recently upgraded in-place to Win 11 (Version 10.0.22621.1344). Everything else 😆 the same. Same Ubuntu 20.04.5 LTS. What unix do you use? I would like to try that and see if I get similar results as you.
A brittle part of my PR is this $(pstree -np -s -T -u | grep -E "Relay.+$USER" | grep -o -E '[0-9]+');
where I look for a socket owned by the user via Relay
as a process parent. Since your pstree is so different...that may not be a good approach.
Also on the newest Win 11, but my wsl is from September. So that might explain the discrepancy.
I'm not using pinentry-wsl-ps1 anymore actually, instead I simply attach my YubiKey with "C:\Program Files\usbipd-win\usbipd.exe" wsl attach -i 1050:0407
and directly connect to it with gpg.
pinentry did not work with WSL2 with systemd and gpg-agent running as a systemctl service. @andsens previously visited this subject area with PR #14.
This PR
WSL_INTEROP
socket. I am using an approach that only looks at sockets owned by the same user.