Jeff, thank you very much for your engagement on this!
Those edits didn’t work for me, but I was able to get a fix.
It had to do with the dbus-launch
command you first identified on our call, when reviewing the bc_desktop/template/desktops/xfce.sh script. I’m not sure what made me conclude it wasn’t working during the call, but it’s definitely working now.
Here’s my submit.sh.erb (the notable addition being eval $(dbus-launch --sh-syntax
):
#!/usr/bin/env bash
# Clean the environment
module purge
# Set working directory to home directory
cd "${HOME}"
# Launch Xfce Window Manager and Panel
#
(
export XDG_CONFIG_HOME="<%= session.staged_root.join("config") %>"
export XDG_DATA_HOME="<%= session.staged_root.join("share") %>"
export XDG_CACHE_HOME="$(mktemp -d)"
module restore
# set -x
eval $(dbus-launch --sh-syntax)
xfwm4 --compositor=off --sm-client-disable
xsetroot -solid "#D3D3D3"
xfsettingsd --daemon --sm-client-disable
xfce4-panel --sm-client-disable
) &
#
# Start MATLAB
#
# Load the required environment
module load matlab
# Launch MATLAB
module list
set -x
matlab -desktop
I’m still a little hazy on the full picture, but the result that the Xfce components now have a dbus session interface running in the slurmd cgroup, rather than trying to use the short-lived connection in the user cgroup (XDG_RUNTIME_DIR
). And the window control features work as expected!