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

systemctl reboot gives error Failed to spawn the command status.code() is None unexpectedly #15

Closed IamMarcIvanov closed 2 years ago

IamMarcIvanov commented 2 years ago

I installed ArchLinux using Distrod. I have enabled it upon being given a prompt. I install xorg-server and xorg-xinit. I installed lightdm and lightdm-gtk-greeter and enabled it using systemctl enable lightdm. I also installed qtile using pacman -S qtile. After that, to start lightdm at startup, I did systemctl reboot. I got the following error:

Hangup [Distrod][ERROR] Failed to spawn the command. Caused by: status.code() is None unexpectedly.

I then tried to start x server manually by doing startx which gave the following error: Xorg.1.log

I had also install alacritty terminal emulator and when I ran alacritty, it worked fine and a terminal instance spawned.

I also tried starting qtile directly by running qtile start but got the error

2021-11-22 16:49:34,139 libqtile core.py:init():L106 not starting; existing window manager Weston WM Traceback (most recent call last): File "/usr/sbin/qtile", line 33, in sys.exit(load_entry_point('qtile==0.18.1', 'console_scripts', 'qtile')()) File "/usr/lib/python3.9/site-packages/libqtile/scripts/main.py", line 55, in main options.func(options) File "/usr/lib/python3.9/site-packages/libqtile/scripts/start.py", line 87, in start q = make_qtile(options) File "/usr/lib/python3.9/site-packages/libqtile/scripts/start.py", line 50, in make_qtile kore = libqtile.backend.get_core(options.backend) File "/usr/lib/python3.9/site-packages/libqtile/backend/init.py", line 15, in get_core return importlib.import_module(f"libqtile.backend.{backend}.core").Core(*args) File "/usr/lib/python3.9/site-packages/libqtile/backend/x11/core.py", line 107, in init raise ExistingWMException(existing_wmname) libqtile.backend.x11.core.ExistingWMException: Weston WM

meaning that Weston WM (which I guess wsl is built on) was already running

I am on windows build 22504.1010

nullpo-head commented 2 years ago

I did systemctl reboot. I got the following error:

Hangup

That's because you rebooted the WSL instance. WSL2 is a VM, so rebooting it reboots the VM, and you lose the connection with the session you were in. However, the error message has room for improvement, which seemed to have confused you.

BTW, rebooting a VM indeed works, but I guess that's not how WSL expects users to do.

nullpo-head commented 2 years ago

Other parts related to running a full desktop environment in WSL2 are not related to Distrod. So, I may close this issue in a while.

Running lightdm on WSL2, whether systemd is running or not, is not the kind of thing that can be done by following the Arch wiki's instructions for desktop PCs, you know. It's technically possible, but you'll need to find existing documentation first or need to be familiar with wayland and other login mechanisms.

nullpo-head commented 2 years ago

Closing this.