browser launch

This commit is contained in:
Concedo 2025-01-15 17:41:14 +08:00
parent e07de2ea92
commit 70ba616ecc
2 changed files with 3 additions and 1 deletions

View file

@ -1847,7 +1847,7 @@ def LaunchWebbrowser(target_url, failedmsg):
try:
if os.name == "posix" and "DISPLAY" in os.environ: # UNIX-like systems
import subprocess
result = subprocess.run(["xdg-open", target_url], check=True)
result = subprocess.run(["/usr/bin/env", "xdg-open", target_url], check=True)
if result.returncode == 0:
return # fallback successful
raise RuntimeError("no xdg-open")