()
| 107 | |
| 108 | |
| 109 | def start_vnc_server() -> None: |
| 110 | cmd = "/usr/bin/x11vnc" |
| 111 | vnc_pass = os.getenv(ENV.VNC_PASSWORD) |
| 112 | if vnc_pass: |
| 113 | pass_path = os.path.join(os.getenv(ENV.WORK_PATH), ".vncpass") |
| 114 | subprocess.check_call(f"{cmd} -storepasswd {vnc_pass} {pass_path}", shell=True) |
| 115 | last_arg = f"-rfbauth {pass_path}" |
| 116 | else: |
| 117 | last_arg = "-nopw" |
| 118 | |
| 119 | display = os.getenv(ENV.DISPLAY) |
| 120 | args = f"-display {display} -forever -shared {last_arg}" |
| 121 | vnc_server = Application("vnc_web", cmd, args, False) |
| 122 | vnc_server.start() |
| 123 | |
| 124 | |
| 125 | def start_vnc_web() -> None: |
no test coverage detected