Skip to content

systemd doesn't create user (d)bus #8842

@mangkoran

Description

@mangkoran

Version

Windows version: 10.0.22621.521

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.62.1-microsoft-standard-WSL2

Distro Version

ArchWSL

Other Software

  • systemd 251 (251.4-1-arch)
  • D-Bus Message Bus Daemon 1.14.0

Repro Steps

  1. Upgrade WSL to 0.67.6.0
  2. Enable systemd.
  3. sudo loginctl enable-linger <username> [1]
  4. wsl --shutdown
  5. Open WSL

Expected Behavior

User systemd service should launched.

Actual Behavior

User systemd service is not launched. Checked via below commands. Neither succeeded.

❯ systemctl list-units --type=service --user
Failed to connect to bus: No such file or directory

❯ systemctl status --user
Failed to connect to bus: No such file or directory

Diagnostic Logs

I noticed that now WSL set below variables correctly.

❯ echo $XDG_RUNTIME_DIR\n$DBUS_SESSION_BUS_ADDRESS
/run/user/1000/
unix:path=/run/user/1000/bus

But then I suppose that this is due to init now handled by systemd, which is the normal behavior. However, the user (d)bus is not present in the above directory.

❯ exa -l /run/user/1000/
drwx------ - mangkoran 22 Sep 05:30 dbus-1
|rw------- 0 mangkoran 22 Sep 05:31 fish_universal_variables.notifier
srwx------ 0 mangkoran 22 Sep 05:31 lf.mangkoran.sock
drwx------ - mangkoran 22 Sep 05:30 pulse
srwxrwxrwx 0 mangkoran 22 Sep 05:30 wayland-0
.rw-rw---- 0 mangkoran 22 Sep 05:30 wayland-0.lock

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions