diff --git a/ubuntu/focal_desktop/variables.auto.pkrvars.hcl b/ubuntu/focal_desktop/variables.auto.pkrvars.hcl index bdd97fd..bda7dcc 100644 --- a/ubuntu/focal_desktop/variables.auto.pkrvars.hcl +++ b/ubuntu/focal_desktop/variables.auto.pkrvars.hcl @@ -2,5 +2,6 @@ docker_repo = "ghcr.io/utrechtuniversity/src-test-workspace:ubuntu img_tag = "ubuntu_focal-desktop" docker_base_img = "ubuntu:focal" vagrant_base_img = "ubuntu/focal64" -extra_packages = "xfce4" +extra_packages = "gdm3 xfce4 xrdp xauth xorgxrdp" +extra_post_commands = "update-alternatives --set x-session-manager /usr/bin/xfce4-session" workspace_ansible_version = "2.9" diff --git a/ubuntu/src-ubuntu.pkr.hcl b/ubuntu/src-ubuntu.pkr.hcl index 5096de8..09bd6ad 100644 --- a/ubuntu/src-ubuntu.pkr.hcl +++ b/ubuntu/src-ubuntu.pkr.hcl @@ -66,6 +66,11 @@ variable "extra_packages" { type = string } +variable "extra_post_commands" { + default = "" + type = string +} + variable "testuser" { type = map(string) default = { @@ -191,7 +196,8 @@ build { inline = [ "useradd -m -s $(which bash) -p $(openssl passwd -1 ${var.testuser.password}) ${var.testuser.username}", "apt-get autoremove -y -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 && apt-get autoclean -y && apt-get clean -y", "rm -rf /tmp/* /var/tmp* /usr/share/doc/* /root/.ansible* /usr/share/man/* /root/.cache /etc/rsc/plugins/*", - "mkdir -p /usr/share/man/man1" # The step aboved removed all the man pages content, but this directory needs to be present as an install target for subsequent apt installs by components. + "mkdir -p /usr/share/man/man1", # The step above removed all the man pages content, but this directory needs to be present as an install target for subsequent apt installs by components. + var.extra_post_commands ] }