2013-07-08 17:44:40 +00:00
|
|
|
# The vncserver service unit file
|
|
|
|
#
|
|
|
|
# 1. Copy this file to /etc/systemd/system/vncserver@:<display>.service
|
|
|
|
# 2. Edit User=
|
|
|
|
# ("User=foo")
|
|
|
|
# 3. Edit and vncserver parameters appropriately
|
|
|
|
# ("/usr/bin/vncserver %i -arg1 -arg2 -argn")
|
|
|
|
# 4. Run `systemctl --system daemon-reload`
|
|
|
|
# 5. Run `systemctl enable vncserver@:<display>.service`
|
|
|
|
#
|
|
|
|
# DO NOT RUN THIS SERVICE if your local area network is untrusted!
|
|
|
|
#
|
|
|
|
# See the wiki page for more on security
|
|
|
|
# https://wiki.archlinux.org/index.php/Vncserver
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=Remote desktop service (VNC)
|
|
|
|
After=syslog.target network.target
|
|
|
|
|
|
|
|
[Service]
|
2016-09-08 18:00:48 +00:00
|
|
|
Type=simple
|
2013-07-08 17:44:40 +00:00
|
|
|
User=
|
|
|
|
|
2014-11-24 19:03:23 +00:00
|
|
|
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i >/dev/null 2>&1 || true'
|
2015-03-02 22:29:23 +00:00
|
|
|
ExecStart=/usr/bin/vncserver -fg %i
|
2013-07-08 17:44:40 +00:00
|
|
|
ExecStop=/usr/bin/vncserver -kill %i
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|