Skip to content

Commit abf31e4

Browse files
committed
switch back to fullscreen on windows vs kiosk. fix2 for console logging for windows.
1 parent 26ac4cd commit abf31e4

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

frontend/chromium_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def launch_window(self, window_name, url, monitor, index):
7272
args = [
7373
chrome_path,
7474
f"--app={url}",
75-
"--kiosk",
75+
"--start-fullscreen",
7676
f"--window-position={monitor.x},{monitor.y}",
7777
f"--window-size={monitor.width},{monitor.height}",
7878
f"--user-data-dir={user_data_dir}",

main.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
import sys
44
import os
55

6-
# Windows --noconsole: stdout/stderr are None, redirect to devnull so print() doesn't crash
6+
# Windows --noconsole: stdout/stderr are None, redirect to a log file
77
if sys.stdout is None:
8-
sys.stdout = open(os.devnull, 'w')
9-
if sys.stderr is None:
10-
sys.stderr = open(os.devnull, 'w')
8+
from platformdirs import user_config_dir
9+
_log_dir = os.path.join(user_config_dir("vpinfe", "vpinfe"))
10+
os.makedirs(_log_dir, exist_ok=True)
11+
_log_file = open(os.path.join(_log_dir, 'vpinfe.log'), 'w')
12+
sys.stdout = _log_file
13+
sys.stderr = _log_file
1114

1215
import multiprocessing
1316
multiprocessing.freeze_support()

0 commit comments

Comments
 (0)