This commit is contained in:
Jonas Forsberg 2021-10-11 21:44:15 +02:00
parent 4d22f60e10
commit f36d29003f
6 changed files with 36 additions and 1 deletions

View File

@ -7,7 +7,7 @@ network:
interface:
internal: eth0
external: eth0.1000
external: eth1
vlan:
-

View File

@ -0,0 +1,2 @@
remote-desktop:
password: linux0

View File

@ -5,6 +5,7 @@ base:
- mysql
- rmt
- docker
- remote-desktop
{% if salt['pillar.file_exists']('local.sls') %}
- local
{% endif %}

View File

@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Exec=x0vncserver -passwordfile /home/{{ pillar['user'] }}/.vnc/passwd
Hidden=false
X-GNOME-Autostart-enabled=true
Name=x0vncserver
Comment=x0vncserver

View File

@ -0,0 +1,24 @@
Install xorg-x11-Xvnc:
pkg.installed:
- name: xorg-x11-Xvnc
Set vnc password if no passwd file:
cmd.run:
- name: bash -c "echo {{ pillar['remote-desktop']['password'] }} | vncpasswd -f > /home/{{ pillar['username'] }}/.vnc/passwd"
- runas: {{ pillar['username'] }}
- unless: bash -c "[[ -f /home/{{ pillar['username'] }}/.vnc/passwd ]]"
Check that passwd file has correct settings:
file.managed:
- name: /home/{{ pillar['username'] }}/.vnc/passwd
- user: {{ pillar['username'] }}
- group: users
- mode: "0600"
Create x0vncserver desktop file:
file.managed:
- name: /home/{{ pillar['username'] }}/.config/autostart/x0vncserver.desktop
- source: salt://remote-desktop/files/x0vncserver.desktop.template
- user: {{ pillar['username'] }}
- group: users
- mode: "0600"

View File

@ -10,3 +10,4 @@ base:
- rmt
- podman
- docker.registry
- remote-desktop