Skip to content

Commit 04a6a14

Browse files
authored
Check if not WSL for automatically opening the UI #65
1 parent 8ee83b9 commit 04a6a14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

run.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def exiting():
360360
gf_url = "http://%s:%d/" % (config.HOST_ADDRESS, config.HTTP_PORT)
361361

362362
if not dontopenuionstartup:
363-
if 'Microsoft' in platform.uname().release or 'microsoft' in platform.uname().release:
363+
if ("Microsoft" in platform.uname().release or "microsoft" in platform.uname().release) and "WSL" not in platform.uname().release:
364364
os.system("/mnt/c/windows/system32/rundll32.exe url.dll,FileProtocolHandler %s" % gf_url)
365365
elif os.environ.get('DISPLAY'):
366366
if os.geteuid() != 0 and shutil.which("chrome"):
@@ -416,7 +416,7 @@ def exiting():
416416
gf_url = "http://%s:%d/" % (config.HOST_ADDRESS, config.HTTP_PORT)
417417

418418
if not dontopenuionstartup:
419-
if 'Microsoft' in platform.uname().release or 'microsoft' in platform.uname().release:
419+
if ("Microsoft" in platform.uname().release or "microsoft" in platform.uname().release) and "WSL" not in platform.uname().release:
420420
os.system("/mnt/c/windows/system32/rundll32.exe url.dll,FileProtocolHandler %s" % gf_url)
421421
elif os.environ.get('DISPLAY'):
422422
if os.geteuid() != 0 and shutil.which("chrome"):

0 commit comments

Comments
 (0)