Mate Desktop in an Apptainer container?

I’ve been following this thread: Mate Desktop in a Singularity container?

In my quest to build my desktop inside an apptainer container and it’s been a challenge.

I use OOD 2.0.31 and Apptainer 1.1.7.

From the original bc_desktop, I changed the form.yml.erb

cluster: "hpcc"

  desktop: "mate"
  bc_vnc_idle: 0
    required: true
  node_type: null
    widget: "number_field"
    label: "Number of hours"
    value: 1
    min: 1
    max: 8
    step: 1
    help: |
      - Choose the amount of time up to a maximum of 8 hours

  - bc_vnc_idle
  - desktop
  - bc_num_hours
  - node_type
  - bc_vnc_resolution

and submit.yml.erb files

  # your image location will differ
  queue_name: "apps"
    - "--job-name=desktop"
    - "--mem=2G"
#  template: "vnc"

  template: "vnc"
  websockify_cmd: '/usr/bin/websockify'
  header: |
    . ~/.bashrc
  script_wrapper: |
    cat << "CTRSCRIPT" >
    export PATH="$PATH:/opt/TurboVNC/bin"

    export APPTAINER_BIND="$HOME,/run,/var,/tmp"
    # your bindpath will differ
    apptainer exec <%= image %> /bin/bash

The container build mate.def manifest

Bootstrap: docker

From: centos:7.9.2009

  yum install -y epel-release
  yum groupinstall -y 'MATE Desktop'
  yum install -y python3-pip
  pip3 install ts
  yum install -y
  yum install -y
  yum remove -y tigervnc-server python3-pip mate-power-manager
  yum clean all
  rm -rf /var/cache/yum/*

Everything looks fine and I get a desktop instance, but something is missing:

After a few seconds…

My output.log has a few things:

It seems to me that the most critical error is:

error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files

Any ideas that might help me please?

Off the top, I’d suggest adding /run into the container. Maybe /var as well.

Seems like you can’t communicate with dbus correctly and I know those are important directories.

A google search of the error seems to indicate there’s a library issue. You’re using centos 7.9 container, what’s the host OS? Maybe there’s some mismatch or some missing package. That file seems to come from dconf itself so I wonder if it was missed somehow?

I’m mounting /run and /var with export APPTAINER_BIND="$HOME,/run,/var,/tmp" in my submit.yml.erb

My host operating system is Rocky Linux 8.7

I have only replicated the examples that I have only found with centos 7 with the difference of some updates:

  • centos:7.9
  • python3-pip (python2-pip doesn’t work)
  • turbovnc-2.2.5

If you run 8 on the host, I’d suggest trying the same OS in the container and see how that fares.

You are absolutely right! I created the container compatible with my host OS and it worked. In my case, Rocky Linus installed Xfce, because it is easily available in the dnf group list. Now it’s time to work on the settings to adjust the desktop and its applications.

For management, follow the file for building the container xfce.def:

Bootstrap: docker
From: rockylinux:8.7

  dnf install -y epel-release
  dnf groupinstall -y 'Xfce'
  pip3 install ts
  dnf install -y
  dnf install -y
  dnf clean all

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.