Skip to content

Commit

Permalink
Add RDP support to Ubuntu desktop image
Browse files Browse the repository at this point in the history
  • Loading branch information
dometto committed Nov 8, 2023
1 parent 5474bfb commit 9ad2380
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ubuntu/focal_desktop/variables.auto.pkrvars.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 7 additions & 1 deletion ubuntu/src-ubuntu.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ variable "extra_packages" {
type = string
}

variable "extra_post_commands" {
default = ""
type = string
}

variable "testuser" {
type = map(string)
default = {
Expand Down Expand Up @@ -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
]
}

Expand Down

0 comments on commit 9ad2380

Please sign in to comment.