Skip to content

Commit 24d8863

Browse files
authored
runtime: check for DISPLAY instead of XDG_CURRENT_DESKTOP to check if linux machine is GUIless or not (#2373)
Signed-off-by: lucasew <[email protected]>
1 parent 5294391 commit 24d8863

File tree

1 file changed

+1
-1
lines changed
  • sdk/python/packages/flet-runtime/src/flet_runtime

1 file changed

+1
-1
lines changed

sdk/python/packages/flet-runtime/src/flet_runtime/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def is_linux_server():
4747
with open(p, "r") as file:
4848
if "microsoft" in file.read():
4949
return False # it's WSL, not a server
50-
return os.environ.get("XDG_CURRENT_DESKTOP") is None
50+
return os.environ.get("DISPLAY") is None
5151
return False
5252

5353

0 commit comments

Comments
 (0)