diff --git a/apps/vub_desktop/form.yml.erb b/apps/vub_desktop/form.yml.erb index 7199f26..2c6b282 100644 --- a/apps/vub_desktop/form.yml.erb +++ b/apps/vub_desktop/form.yml.erb @@ -13,12 +13,11 @@ attributes: required: true desktop: "xfce" resolution: - widget: select - label: "screen resolution" - help: "This defines the resolution of your screen." + widget: "select" + label: "Screen resolution" options: - - ["FullHD", "1920x1080"] - - ["HD", "1280x720"] + - ["FullHD (1920x1080)", "1920x1080"] + - ["HD (1280x720)", "1280x720"] <%= ERB.new(File.read(File.expand_path("../common_files/_extra_attributes.yml.erb", __dir__)), eoutvar: "@common_attrs").result(binding) %> form: diff --git a/apps/vub_desktop/template/script.sh.erb b/apps/vub_desktop/template/script.sh.erb index 73a7577..ea3f515 100755 --- a/apps/vub_desktop/template/script.sh.erb +++ b/apps/vub_desktop/template/script.sh.erb @@ -2,23 +2,18 @@ <%= ERB.new(File.read('../common_files/work_directory_change.sh.erb'), eoutvar: 'child').result(binding) %> -# Ensure that the user's configured login shell is used -export SHELL="$(getent passwd $USER | cut -d: -f7)" +# Benchmark info +echo "TIMING - Starting main script at: $(date)" -if [ ${SLURM_GPUS_ON_NODE:-0} -gt 0 ]; then - gpu_bus_id=$(nvidia-smi --query-gpu=gpu_bus_id --format=csv,noheader) - # to lowercase - gpu_bus_id=${gpu_bus_id,,} - # Need to strip off first 4 zeros - dri_device=$(ls -d /sys/bus/pci/devices/${gpu_bus_id:4}/drm/card*) - export VGL_DISPLAY=/dev/dri/${dri_device##*/} - export VGL_LOGO=1 # for testing - echo "Setting VGL_DISPLAY to $VGL_DISPLAY" -else - export VGL_DISPLAY=$DISPLAY -fi +# Set VGL_DISPLAY to a GPU card if available, otherwise to Mesa llvmpipe +<%= ERB.new(File.read('../common_files/oodegl.sh.erb'), eoutvar: 'child').result(binding) %> + +<%- unless context.global_prerun.empty? -%> +<%= context.global_prerun.gsub("\r", "") %> +<%- end -%> # Start up desktop echo "Launching desktop '<%= context.desktop %>'..." -source "<%= session.staged_root.join("desktops", "#{context.desktop}.sh") %>" +<%= ERB.new(File.read("../common_files/desktops/#{context.desktop}.sh.erb"), eoutvar: 'child').result(binding) %> + echo "Desktop '<%= context.desktop %>' ended with $? status..." diff --git a/ondemand-vub.spec b/ondemand-vub.spec index 0f74072..e474397 100644 --- a/ondemand-vub.spec +++ b/ondemand-vub.spec @@ -3,7 +3,7 @@ Summary: Scripts, customizations and tools for Open OnDemand Name: ondemand-vub -Version: 2.06 +Version: 2.07 Release: 1 BuildArch: noarch License: GPL @@ -57,6 +57,8 @@ Scripts, customizations and tools for Open OnDemand as used at the VUB. /var/www/ood/apps/sys %changelog +* Sat Nov 15 2025 Samuel Moors +- Use common xfce desktop for Desktop app * Thu Nov 13 2025 Ward Poelmans - Create bookmarks for VSC directories * Tue Nov 11 2025 Samuel Moors