Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seems to help with issue #17 #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FerdinandSu
Copy link

I met the same issue as #17, since my wsl is using 'root' as default user.

It's caused by 00-wsl2-systemd:94

exec /usr/bin/nsenter --mount --pid --target "$SYSTEMD_PID" -- su - "$SUDO_USER"

that, variable "SUDO_USER" is empty when using root.

So I added line 17 SUDO_USER="root" to the file, and it seems to be working now (partially).

However, gpg-agent.sh:12 caused another issue: the wslvar 'ProgramFiles(x86)' useage, which is actually invalid:

image

It seems that wslvar imports an raw $env:ProgramFiles(x86) usage.

What's more, I do think most people may prefer to use git's gpg (Git\usr\bin\gpg.exe)?

@FerdinandSu
Copy link
Author

Actually, after changing gpg-agent.sh:12 to

ln -sf "$(wslpath "$(wslvar 'ProgramFiles')/Git/usr/bin/gpg.exe")" "$HOME/.wsl-cmds/gpg"

It works quite well. Such change is not included in this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant