nullpo-head / wsl-distrod

Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
MIT License
1.9k stars 91 forks source link

[Bug]: Failed to connect to bus: No such file or directory systemctl --user flag #20

Closed lopugit closed 2 years ago

lopugit commented 2 years ago

Describe the bug

Bug happens when I try to run systemctl with --user flag

normal systemctl enable service works fine but I would like to run as user, is this possible?

Steps to reproduce

systemctl --user enable service

Expected behavior

No response

Windows version

21H2 19044.1348

Linux kernel version

Linux win 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Distro

Ubuntu Focal

Logs

a

additional comment

No response

lopugit commented 2 years ago

Oh does this mean it can't work? https://github.com/nullpo-head/wsl-distrod/issues/13

All good

nullpo-head commented 2 years ago

Yes, this issue is a duplicate of #13. As a workaround, do sudo login -f username once. user slice will be implemented later.

lopugit commented 2 years ago

Yes, this issue is a duplicate of #13. As a workaround, do sudo login -f username once. user slice will be implemented later.

How often do I have to do this though? Just once ever or every session or?

rksplash commented 2 years ago

Experimentally, once per reboot for me, but your set up might require it every time your systemd/dbus session would end.