Sunday, June 19, 2022

VNC: Arch linux autostart vnc

Add /home//.config/systemd/user/myvnc@:1.service [Unit]
Description=My VNC

[Service]
Type=simple
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver %i
ExecStop=/usr/bin/vncserver -kill %i

[Install]
WantedBy=default.target
Then systemctl --user start myvnc@\:1.service and systemctl --user enable myvnc@\:1.service and