Bläddra i källkod

make vncserver xsession work

timer
förälder
incheckning
54f679fb4d
3 ändrade filer med 15 tillägg och 4 borttagningar
  1. +7
    -1
      tasks/vnc.yaml
  2. +5
    -0
      templates/vnc/Xvnc-session.j2
  3. +3
    -3
      templates/vnc/vncserver.service.j2

+ 7
- 1
tasks/vnc.yaml Visa fil

@@ -39,6 +39,12 @@

- name: Xvnc-session script
template:
src: x11/xsessionrc.j2
src: vnc/Xvnc-session.j2
dest: ~/.vnc/Xvnc-session
mode: 0755

- name: vnc xsession script
template:
src: x11/xsession.j2
dest: ~/.vnc/xsession
mode: 0755

+ 5
- 0
templates/vnc/Xvnc-session.j2 Visa fil

@@ -0,0 +1,5 @@
#!/bin/sh

{{ansible_managed|comment}}

exec /etc/X11/Xsession ~/.vnc/xsession

+ 3
- 3
templates/vnc/vncserver.service.j2 Visa fil

@@ -15,13 +15,13 @@
# `systemctl --user enable vdesk@:<display>.service`

[Unit]
Description=vdesk service - display %i
Description=vncserver service - display %i
After=syslog.target network.target

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

[Install]