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
This commit is contained in:
@@ -112,6 +112,7 @@ sudo snap install novnc
|
|||||||
Description=noVNC Service
|
Description=noVNC Service
|
||||||
After=x11vnc.service network.target snap.novnc.daemon.service
|
After=x11vnc.service network.target snap.novnc.daemon.service
|
||||||
Wants=x11vnc.service
|
Wants=x11vnc.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/snap/bin/novnc --vnc localhost:5900 --listen 5910
|
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_COOKIE=/run/snap.cookie
|
||||||
Environment=SNAP_NAME=novnc
|
Environment=SNAP_NAME=novnc
|
||||||
Environment=SNAP_REVISION=current
|
Environment=SNAP_REVISION=current
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
```
|
```
|
||||||
@@ -131,6 +133,7 @@ Write a file `x11vnc.service` with the following content:
|
|||||||
Description=X11 VNC Server
|
Description=X11 VNC Server
|
||||||
After=display-manager.service network.target
|
After=display-manager.service network.target
|
||||||
Wants=display-manager.service
|
Wants=display-manager.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=x11vnc -display :0 -rfbport 5900 -forever
|
ExecStart=x11vnc -display :0 -rfbport 5900 -forever
|
||||||
@@ -139,6 +142,7 @@ Restart=on-failure
|
|||||||
RestartSec=3
|
RestartSec=3
|
||||||
Environment=DISPLAY=:0
|
Environment=DISPLAY=:0
|
||||||
Environment=XAUTHORITY=/home/user/.Xauthority
|
Environment=XAUTHORITY=/home/user/.Xauthority
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user