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"

attributes:
  desktop: "mate"
  bc_vnc_idle: 0
  bc_vnc_resolution:
    required: true
  node_type: null
  bc_num_hours:
    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

form:
  - bc_vnc_idle
  - desktop
  - bc_num_hours
  - node_type
  - bc_vnc_resolution

and submit.yml.erb files

<%
  # your image location will differ
  image="/opt/img-apps/mate.sif"
%>
---
script:
  queue_name: "apps"
  native:
    - "--job-name=desktop"
    - "--mem=2G"
#  template: "vnc"

batch_connect:
  template: "vnc"
  websockify_cmd: '/usr/bin/websockify'
  header: |
    #!/bin/bash
    . ~/.bashrc
  script_wrapper: |
    cat << "CTRSCRIPT" > container.sh
    export PATH="$PATH:/opt/TurboVNC/bin"
    %s
    CTRSCRIPT

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

The container build mate.def manifest

Bootstrap: docker

From: centos:7.9.2009

%post   
  yum install -y epel-release
  yum groupinstall -y 'MATE Desktop'
  yum install -y python3-pip
  pip3 install ts
  yum install -y https://yum.osc.edu/ondemand/1.6/compute/el7Server/x86_64/python-websockify-0.8.0-1.el7.noarch.rpm
  yum install -y https://yum.osc.edu/ondemand/latest/compute/el7Server/x86_64/turbovnc-2.2.5-1.el7.x86_64.rpm
  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

%post   
  dnf install -y epel-release
  dnf groupinstall -y 'Xfce'
  pip3 install ts
  dnf install -y https://yum.osc.edu/ondemand/3.0/compute/el8Server/x86_64/python3-websockify-0.10.0-1.el8.noarch.rpm
  dnf install -y https://yum.osc.edu/ondemand/3.0/compute/el8Server/x86_64/turbovnc-2.2.5-1.el8.x86_64.rpm
  dnf clean all

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