Files
second-brain/x11vnc.service
T
2026-04-26 08:02:12 +02:00

36 lines
803 B
Desktop File

[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