From bf33babc90203f84c244378fa31dc1d34bf9acd7 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sun, 10 Jan 2021 01:52:41 +0100 Subject: [PATCH] make vdesk display number configurable --- defaults/main.yaml | 1 + tasks/clean.yaml | 7 +++++++ tasks/main.yaml | 2 +- templates/workspaces/workspace.space.fish.j2 | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/defaults/main.yaml b/defaults/main.yaml index f87a642..63e6196 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -13,6 +13,7 @@ kanboard_api_settings: "{{ lookup('file', '~/.kanboard_api_settings.json') }}" # kanboard_api_user: ka # kanboard_api_key: xxx home_vdesk_started_and_enabled: false +home_vdesk_display_number: 47 home_profile: desktop diff --git a/tasks/clean.yaml b/tasks/clean.yaml index c30bcb7..41b1ce6 100644 --- a/tasks/clean.yaml +++ b/tasks/clean.yaml @@ -17,3 +17,10 @@ file: path: ~/.eralitex state: absent + +- name: disable and stop vdesk user service at display 16 + systemd: + name: vdesk@:16.service + state: stopped + enabled: false + scope: user diff --git a/tasks/main.yaml b/tasks/main.yaml index 07fac52..768b6e9 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -27,7 +27,7 @@ - name: enable and start vdesk user service systemd: - name: vdesk@:16.service + name: vdesk@:{{home_vdesk_display_number}}.service state: started enabled: true scope: user diff --git a/templates/workspaces/workspace.space.fish.j2 b/templates/workspaces/workspace.space.fish.j2 index 17eb455..1e4bfd2 100644 --- a/templates/workspaces/workspace.space.fish.j2 +++ b/templates/workspaces/workspace.space.fish.j2 @@ -3,7 +3,7 @@ {% if workspaces[workspace].type == "vdesk" %} -xtigervncviewer localhost:{{workspaces[workspace].display|default(16)}} -via {{workspaces[workspace].host}} -PasswordFile ~/.vnc/passwd.{{workspaces[workspace].host}} +xtigervncviewer localhost:{{workspaces[workspace].display|default(home_vdesk_display_number)}} -via {{workspaces[workspace].host}} -PasswordFile ~/.vnc/passwd.{{workspaces[workspace].host}} {% elif workspaces[workspace].type == "tmux" %}