From e762adea28f3ce714f1a81ba0d9bb67190491a96 Mon Sep 17 00:00:00 2001 From: Timothyxxx <384084775@qq.com> Date: Fri, 21 Feb 2025 16:32:00 +0800 Subject: [PATCH] Add systemd service configurations for x11vnc and noVNC Update README.md with detailed systemd service files for: - x11vnc service to enable VNC server on display :0 - noVNC service to provide web-based VNC access - Include proper service dependencies and environment settings --- desktop_env/server/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop_env/server/README.md b/desktop_env/server/README.md index b09e14f..9645786 100644 --- a/desktop_env/server/README.md +++ b/desktop_env/server/README.md @@ -112,6 +112,7 @@ sudo snap install novnc Description=noVNC Service After=x11vnc.service network.target snap.novnc.daemon.service Wants=x11vnc.service + [Service] Type=simple ExecStart=/snap/bin/novnc --vnc localhost:5900 --listen 5910 @@ -122,6 +123,7 @@ Environment=XAUTHORITY=/home/user/.Xauthority Environment=SNAP_COOKIE=/run/snap.cookie Environment=SNAP_NAME=novnc Environment=SNAP_REVISION=current + [Install] WantedBy=default.target ``` @@ -131,6 +133,7 @@ Write a file `x11vnc.service` with the following content: Description=X11 VNC Server After=display-manager.service network.target Wants=display-manager.service + [Service] Type=simple ExecStart=x11vnc -display :0 -rfbport 5900 -forever @@ -139,6 +142,7 @@ Restart=on-failure RestartSec=3 Environment=DISPLAY=:0 Environment=XAUTHORITY=/home/user/.Xauthority + [Install] WantedBy=default.target ```