diff --git a/template/script.sh.erb b/template/script.sh.erb index 75a09de..ad76fbd 100755 --- a/template/script.sh.erb +++ b/template/script.sh.erb @@ -11,21 +11,28 @@ cd "${HOME}" # # Launch Xfce Window Manager and Panel # +export SEND_256_COLORS_TO_REMOTE=1 +export XDG_CONFIG_HOME="<%= session.staged_root.join("config") %>" +export XDG_DATA_HOME="<%= session.staged_root.join("share") %>" +export XDG_CACHE_HOME="$(mktemp -d)" +export $(dbus-launch) -( - export SEND_256_COLORS_TO_REMOTE=1 - export XDG_CONFIG_HOME="<%= session.staged_root.join("config") %>" - export XDG_DATA_HOME="<%= session.staged_root.join("share") %>" - export XDG_CACHE_HOME="$(mktemp -d)" - export $(dbus-launch) +module restore +set -x + +source /etc/os-release - module restore - set -x +if [[ "$VERSION_ID" < "9" ]]; then xfwm4 --compositor=off --daemon --sm-client-disable xsetroot -solid "#D3D3D3" xfsettingsd --sm-client-disable - xfce4-panel --sm-client-disable -) & + xfce4-panel --sm-client-disable & +else + xfwm4 --compositor=off --sm-client-disable & + xsetroot -solid "#D3D3D3" + xfsettingsd --sm-client-disable & + xfce4-panel --sm-client-disable & +fi # # Start MATLAB