You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

vncserver.service.j2 881B

4 年之前
4 年之前
12345678910111213141516171819202122232425262728
  1. {{ ansible_managed | comment }}
  2. #
  3. # /usr/lib/systemd/user/vncserver@.service
  4. #
  5. # 1. Switches for vncserver should be entered in ~/.vnc/config rather than
  6. # hard-coded into this unit file. See the vncserver(1) manpage.
  7. #
  8. # 2. Users wishing for the server to continue running after the owner logs
  9. # out MUST enable 'linger' with loginctl like this:
  10. # `loginctl enable-linger username`
  11. #
  12. # 3. The server can be enabled and started like this once configured:
  13. # `systemctl --user start vdesk@:<display>.service`
  14. # `systemctl --user enable vdesk@:<display>.service`
  15. [Unit]
  16. Description=vdesk service - display %i
  17. After=syslog.target network.target
  18. [Service]
  19. Type=forking
  20. ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
  21. ExecStart=/usr/bin/fish -c "/usr/bin/vncserver %i"
  22. ExecStop=/usr/bin/vncserver -kill %i
  23. [Install]
  24. WantedBy=default.target