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

wsl2 native systemd doesn't run the user units #165

Closed
farcaller opened this issue Nov 14, 2022 · 2 comments
Closed

wsl2 native systemd doesn't run the user units #165

farcaller opened this issue Nov 14, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@farcaller
Copy link

Bug description

If the native systemd support is enabled, the user unit files are ignored.

To Reproduce

Steps to reproduce the behavior:
at e9e8d01, add a systemd unit to the user's directory (~/.config/systemd/user/) and enable it. Restart the wsl.

Expected behavior
The service starts.

Logs

With native support disabled:

$ systemctl list-unit-files --user --state=enabled
UNIT FILE                      STATE   PRESET
auto-fix-vscode-server.service enabled enabled
nixos-activation.service       enabled enabled
ssh-agent.service              enabled enabled
dbus.socket                    enabled enabled

4 unit files listed.

With native support enabled:

$ systemctl list-unit-files --user --state=enabled
Failed to connect to bus: No such file or directory

$ ps aux|grep ssh
nixos        507  0.0  0.0 222452  2516 pts/1    S+   10:45   0:00 /nix/store/86bp03jkmsl6f92w0yzg4s59g5mhxwmy-gnugrep-3.7/bin/grep --color=auto ssh
@farcaller farcaller added the bug Something isn't working label Nov 14, 2022
@psmf
Copy link
Contributor

psmf commented Nov 25, 2022

After some research, just providing /bin/login was sufficient for me to get properly setup user systemd services. PR #169 provisions the /bin/login symlink when native systemd is enabled.

@nzbr
Copy link
Member

nzbr commented Nov 26, 2022

This should have been fixed by #169. Feel free to re-open if the problem persists

@nzbr nzbr closed this as completed Nov 26, 2022
myme added a commit to myme/dotfiles that referenced this issue Mar 23, 2023
Having issues starting the user session and running the user units.

See: nix-community/NixOS-WSL#165

It seems like the issue above should be resolved, so it might be
something else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants