You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows version (build number): Windows 10 Pro Version 21H2 (Build 19044.1889)
Linux distribution: Debian Bullseye, upgraded from Debian Stretch from Microsoft Store
Kernel version: 5.10.16.3-microsoft-standard-WSL2
Genie version:
The output of the command is genie: not executing under WSL 2 - how did we get here?
The command sudo apt list | grep genie shows it's 2.4 amd64
Describe the bug
As the output of the version shows, genie is unable to detect that the environment is running WSL2.
Confirm that you are running inside the bottle:
Negative.
To Reproduce
Follows the instruction and install systemd-genie.
Shutdown the WSL2 with wsl.exe --shutdown
Try Starting WSL2 with wsl.exe genie -s, the error occurs.
Expected behavior
Launches WSL2 with systemd and opens a shell prompt.
The message appears to be generated genie: not executing under WSL 2 - how did we get here? in line 71 of file binsrc/genie/helpers.py
Here's a snippet of it:
ifnotos.path.exists('/run/WSL'):
if'microsoft'notinos.uname():
sys.exit("genie: not executing under WSL 2 - how did we get here?")
The function os.uname will return a structured named attributes.
Hence the checking the output of uname against 'microsoft' will never be True.
Thus I recommend using os.uname().release instead:
ifnotos.path.exists('/run/WSL'):
if'microsoft'notinos.uname().release:
sys.exit("genie: not executing under WSL 2 - how did we get here?")
I confirm that I have read the ENTIRE supplied readme file and checked for relevant information on the repository wiki before raising this issue, and that if the solution to this issue is found in either location, it will be closed without further comment:
Yes.
The text was updated successfully, but these errors were encountered:
Windows version (build number):
Windows 10 Pro Version 21H2 (Build 19044.1889)
Linux distribution:
Debian Bullseye
, upgraded fromDebian Stretch
from Microsoft StoreKernel version:
5.10.16.3-microsoft-standard-WSL2
Genie version:
The output of the command is
genie: not executing under WSL 2 - how did we get here?
The command
sudo apt list | grep genie
shows it's2.4 amd64
Describe the bug
As the output of the version shows, genie is unable to detect that the environment is running WSL2.
Confirm that you are running inside the bottle:
Negative.
To Reproduce
systemd-genie
.wsl.exe --shutdown
wsl.exe genie -s
, the error occurs.Expected behavior
Launches WSL2 with systemd and opens a shell prompt.
Screenshots
Additional context
Workaround:
Using command
wsl.exe sudo touch /run/WSL ; genie -s
==================
The message appears to be generated
genie: not executing under WSL 2 - how did we get here?
in line 71 of file binsrc/genie/helpers.pyHere's a snippet of it:
The function os.uname will return a structured named attributes.
Hence the checking the output of uname against
'microsoft'
will never beTrue
.Thus I recommend using
os.uname().release
instead:I confirm that I have read the ENTIRE supplied readme file and checked for relevant information on the repository wiki before raising this issue, and that if the solution to this issue is found in either location, it will be closed without further comment:
The text was updated successfully, but these errors were encountered: