| | import subprocess |
| | import os |
| | import sys |
| |
|
| | def run_xpra_brave(): |
| | port = 7860 |
| | display = ":100" |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | cmd = [ |
| | "xpra", "start", display, |
| | f"--bind-tcp=0.0.0.0:{port}", |
| | "--html=on", |
| | "--daemon=no", |
| | "--notifications=no", |
| | "--mdns=no", |
| | "--speaker=off", |
| | "--microphone=off", |
| | "--webcam=no", |
| | "--exit-with-children=no", |
| | "--start-child=brave-browser --no-sandbox", |
| | "--start-child=xterm" |
| | ] |
| |
|
| | print(f"--- BRAVE XPRA SERVER STARTING ---") |
| | print(f"Web Interface: http://localhost:{port}") |
| | print(f"Display: {display}") |
| | print(f"Note: Brave is running with --no-sandbox") |
| | print(f"-----------------------------------") |
| |
|
| | try: |
| | |
| | subprocess.run(cmd) |
| | except KeyboardInterrupt: |
| | print("\nStopping Xpra...") |
| | subprocess.run(["xpra", "stop", display]) |
| | except Exception as e: |
| | print(f"An unexpected error occurred: {e}") |
| |
|
| | if __name__ == "__main__": |
| | run_xpra_brave() |