Skip to content

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

@farcaller

Description

@farcaller

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions