Skip to content

Commit

Permalink
set the PATH so that dbus-launch comes from the OS (#4160)
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Feb 27, 2025
1 parent 97e7ef7 commit 6bb0884
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/bc_desktop/template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ module purge && module restore
# Ensure that the user's configured login shell is used
export SHELL="$(getent passwd $USER | cut -d: -f7)"

# use a safe PATH to boot the desktop because dbus-launch can be
# in another location from a python/conda installation and that will
# conflict and cause issues. See https://github.com/OSC/ondemand/issues/700 for more.
SAFE_PATH="/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin"

# Start up desktop
echo "Launching desktop '<%= context.desktop %>'..."
source "<%= session.staged_root.join("desktops", "#{context.desktop}.sh") %>"
PATH="$SAFE_PATH" source "<%= session.staged_root.join("desktops", "#{context.desktop}.sh") %>"
echo "Desktop '<%= context.desktop %>' ended with $? status..."

0 comments on commit 6bb0884

Please sign in to comment.