Files
onefinity-firmware/installer/scripts/browser
David Carley 41e2334484 • Reorganized the scripts into different categories
• Refactored the graphical boot screens to have separate boot and shutdown images
• Changed the reboot and shutdown code to force the display of the splash images.
• Added 'Team Onefinity.ngc' to the installer files
2022-07-23 20:04:17 -07:00

16 lines
326 B
Python

#!/usr/bin/env python3
import os
import sys
import subprocess
def enter_cgroup():
with open('/sys/fs/cgroup/memory/chrome/tasks', 'w') as f:
f.write(str(os.getpid()))
# Start browser
args = ['/usr/lib/chromium-browser/chromium-browser'] + sys.argv[1:]
subprocess.Popen(args, preexec_fn = enter_cgroup).wait()