MCPcopy
hub / github.com/budtmo/docker-android / start_vnc_server

Function start_vnc_server

cli/src/app.py:109–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108
109def 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
125def start_vnc_web() -> None:

Callers 1

startFunction · 0.85

Calls 2

startMethod · 0.95
ApplicationClass · 0.90

Tested by

no test coverage detected