From f76ace3f8874466f1137f0a7215f3f7f2c3d778b Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Tue, 2 Jul 2024 10:20:30 +0200 Subject: [PATCH] role runonce: start runonce in desktop workspaces --- playbooks/roles/runonce/files/uu-runonce.desktop | 10 ++++++++++ playbooks/roles/runonce/meta/main.yml | 1 + playbooks/roles/runonce/tasks/main.yml | 7 +++++++ 3 files changed, 18 insertions(+) create mode 100644 playbooks/roles/runonce/files/uu-runonce.desktop diff --git a/playbooks/roles/runonce/files/uu-runonce.desktop b/playbooks/roles/runonce/files/uu-runonce.desktop new file mode 100644 index 00000000..79321105 --- /dev/null +++ b/playbooks/roles/runonce/files/uu-runonce.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=UU Runonce +Comment=Run configured scripts for ResearchCloud at first login. +Exec=/bin/bash -l -i /etc/profile.d/runonce.sh +Type=Application +NoDisplay=true +Icon= +Path= +Terminal=false +StartupNotify=false \ No newline at end of file diff --git a/playbooks/roles/runonce/meta/main.yml b/playbooks/roles/runonce/meta/main.yml index 8f06b0ac..77e18c16 100644 --- a/playbooks/roles/runonce/meta/main.yml +++ b/playbooks/roles/runonce/meta/main.yml @@ -1,3 +1,4 @@ --- dependencies: - fact_regular_users + - fact_workspace_info diff --git a/playbooks/roles/runonce/tasks/main.yml b/playbooks/roles/runonce/tasks/main.yml index d66d29a2..9934ae31 100644 --- a/playbooks/roles/runonce/tasks/main.yml +++ b/playbooks/roles/runonce/tasks/main.yml @@ -34,6 +34,13 @@ owner: root group: root +- name: Add runonce to autostart for desktop environment + when: fact_desktop_workspace + copy: + src: uu-runonce.desktop + dest: /etc/xdg/autostart/uu-runonce.desktop + mode: "0644" + # NB: link needs "follow:no" otherwise owner/group would be applied to its src - name: Add link to /etc/runonce.d in /etc/skel file: