Skip to content

Commit

Permalink
Merge pull request #1260 from freedomofpress/update-as-gui-user
Browse files Browse the repository at this point in the history
fix(`update-fedora-template-if-new`): run as GUI user
  • Loading branch information
rocodes authored Feb 27, 2025
2 parents e9e218b + 821e6f5 commit f05e969
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions securedrop_salt/sd-sys-vms.sls
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ include:
{% set sd_supported_fedora_version = 'fedora-41' %}
{% set sd_fedora_base_template = sd_supported_fedora_version + '-xfce' %}

{% set gui_user = salt['cmd.shell']('groupmems -l -g qubes') %}

# Install latest templates required for SDW VMs.
dom0-install-fedora-template:
cmd.run:
Expand All @@ -33,6 +35,7 @@ set-fedora-template-as-default-mgmt-dvm:
update-fedora-template-if-new:
cmd.wait:
- name: qubes-vm-update --quiet --force-update --targets {{ sd_fedora_base_template }}
- runas: {{ gui_user }}
- require:
- cmd: dom0-install-fedora-template
# Update the mgmt-dvm setting first, to avoid problems during first update
Expand Down

0 comments on commit f05e969

Please sign in to comment.