MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / detect_vnc_command

Function detect_vnc_command

Scripts/Developer Base/Mobile Desktop.py:819–828  ·  view source on GitHub ↗
(distro: str)

Source from the content-addressed store, hash-verified

817 run(proot_login_cmd(distro, cmd), check=False)
818
819def detect_vnc_command(distro: str) -> str:
820 cmd = r"""
821if command -v vncserver >/dev/null 2>&1; then echo vncserver; exit 0; fi
822if command -v tigervncserver >/dev/null 2>&1; then echo tigervncserver; exit 0; fi
823echo ""
824"""
825 try:
826 return run(proot_login_cmd(distro, cmd), capture=True, check=False).stdout.strip()
827 except Exception:
828 return ""
829
830def install_desktop_and_vnc(cfg: Dict, distro: str, desktop: str) -> bool:
831 family = detect_family(distro)

Callers 2

vnc_startFunction · 0.70
vnc_stopFunction · 0.70

Calls 2

runFunction · 0.70
proot_login_cmdFunction · 0.70

Tested by

no test coverage detected