Skip to content

Instantly share code, notes, and snippets.

@0x00009b
Created March 30, 2021 18:10
Show Gist options
  • Save 0x00009b/006bb77c8f2c3cc9e54ca6ecb99a2ff9 to your computer and use it in GitHub Desktop.
Save 0x00009b/006bb77c8f2c3cc9e54ca6ecb99a2ff9 to your computer and use it in GitHub Desktop.
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
User=enp
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/Xvnc -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/Xvnc :1 -SecurityTypes None
ExecStop=/usr/bin/Xvnc -kill %i
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment