diff options
author | Simon Rettberg | 2017-11-30 22:33:43 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-11-30 22:33:43 +0100 |
commit | 603048e1e9335a63f2cc8128072884ddee08d3e3 (patch) | |
tree | e6bb16e9df95a138b6acbc4642b8687d7ff5bc0d /core/modules/pvs2 | |
parent | [kernel-vanilla] 4.14.3 (diff) | |
download | mltk-603048e1e9335a63f2cc8128072884ddee08d3e3.tar.gz mltk-603048e1e9335a63f2cc8128072884ddee08d3e3.tar.xz mltk-603048e1e9335a63f2cc8128072884ddee08d3e3.zip |
[pvs2] Make dedicated mgr mode work again with lightdm(-greeter-bwlp)
Diffstat (limited to 'core/modules/pvs2')
3 files changed, 27 insertions, 22 deletions
diff --git a/core/modules/pvs2/data/opt/openslx/lightdm/autologin.d/00-check-pvs-dedicated b/core/modules/pvs2/data/opt/openslx/lightdm/autologin.d/00-check-pvs-dedicated new file mode 100644 index 00000000..420cfc5c --- /dev/null +++ b/core/modules/pvs2/data/opt/openslx/lightdm/autologin.d/00-check-pvs-dedicated @@ -0,0 +1,10 @@ +#!/bin/ash +# This file is SOURCED + +# PVSMGR? +if [ -n "$SLX_PVS_DEDICATED" ]; then + exec /opt/openslx/scripts/setup-pvsmgr +fi + +true + diff --git a/core/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr b/core/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr index 1a56e8d0..9fe09ec3 100755 --- a/core/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr +++ b/core/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr @@ -9,14 +9,5 @@ if [ -n "$SLX_PVS_CONFIG_URL" ]; then [ -s "${DST}.new" ] && mv -f "${DST}.new" "${DST}" fi -# If this is a dedicated PVS station, make it launch right away -if [ -n "$SLX_PVS_DEDICATED" ] && cd /opt/openslx/xsessions; then - for file in *.desktop; do - cp -f "/usr/share/xsessions/pvs2mgr.desktop" "$file" - done - # patch autologin into kdmrc - sed -i '/AutoLogin.*=/d;/^\[X-.*-Core\]/a AutoLoginEnable=true\nAutoLoginUser=demo\nAutoLoginAgain=true\nAutoLoginDelay=0' "/etc/kde/kdm/kdmrc" -fi - exit 0 diff --git a/core/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient b/core/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient index 5ff03227..e044f415 100755 --- a/core/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient +++ b/core/modules/pvs2/data/opt/openslx/vmchooser/sessionstart.d/50-PVSclient @@ -2,20 +2,24 @@ # SESSION_TYPE can be either 'VSESSION' or 'XSESSION' -# detect session command of the PVS-Manager session by looking at the xsession file -PVSMGR_SESSION_CMD= -PVSMGR_XSESSION_FILE="pvs2mgr.desktop" -# the second directory should not be needed, but lets be compatible with the old crap...... -for DIR in "/usr/share/xsessions" "/opt/openslx/xsessions/"; do - if [ -f "${DIR}/${PVSMGR_XSESSION_FILE}" ]; then - # extract the exact command string - PVSMGR_SESSION_CMD="$(grep -E "^Exec=.*$" "${DIR}/${PVSMGR_XSESSION_FILE}" |cut -c 6-)" - break +if [ "$SESSION_TYPE" = "XSESSION" ]; then + # detect session command of the PVS-Manager session by looking at the xsession file + # TODO Maybe the vmchooser should just expose the session file's name/path, or we + # can define a new X-Property in the .desktop file that stops pvsclient from starting. + PVSMGR_SESSION_CMD= + PVSMGR_XSESSION_FILE="pvs2mgr.desktop" + # the second directory should not be needed, but lets be compatible with the old crap...... + for DIR in "/usr/share/xsessions" "/opt/openslx/xsessions/"; do + if [ -f "${DIR}/${PVSMGR_XSESSION_FILE}" ]; then + # extract the exact command string + PVSMGR_SESSION_CMD="$(grep -E "^Exec=.*$" "${DIR}/${PVSMGR_XSESSION_FILE}" |cut -c 6-)" + break + fi + done + if [ -n "${PVSMGR_SESSION_CMD}" ]; then + # do not start pvsclient if we are running the pvs manager session + [ "x${SESSION_CMD}" == "x${PVSMGR_SESSION_CMD}" ] && exit 0 fi -done -if [ -n "${PVSMGR_SESSION_CMD}" ]; then - # do not start pvsclient if we are running the pvs manager session - [ "x${SESSION_CMD}" == "x${PVSMGR_SESSION_CMD}" ] && exit 0 fi # Download fresh copy of config file if possible |