Add on-demand Xvfb + x11vnc socket activation
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
[Unit]
|
||||
Description=X11 VNC Server (On-Demand)
|
||||
After=network.target xvfb.service
|
||||
Requires=xvfb.service
|
||||
Documentation=http://www.karlrunge.com/x11vnc/
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=intense
|
||||
Environment="DISPLAY=:99"
|
||||
|
||||
# Start x11vnc connected to Xvfb display :99
|
||||
# -forever: keep running
|
||||
# -nopw: no password required (can change)
|
||||
# -localhost: only local connections (can change to 0.0.0.0 for remote)
|
||||
ExecStart=/usr/bin/x11vnc -display :99 -forever -nopw -localhost -listen localhost
|
||||
|
||||
# Wait for display to be ready
|
||||
ExecStartPost=/bin/bash -c 'sleep 2 && echo "✓ VNC ready on :5900"'
|
||||
|
||||
# Restart on failure
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
# Resource limits
|
||||
MemoryLimit=256M
|
||||
CPUQuota=30%
|
||||
|
||||
# Logging
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=x11vnc
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user