diff options
| author | Simon Rettberg | 2025-04-14 19:10:07 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2025-04-14 19:10:07 +0200 |
| commit | f4c487c6518c74142d168fe326683d1c63cf5bed (patch) | |
| tree | 07aa02de71b6a9729db47ca4df6d7bc4aca59ad3 | |
| parent | [qemu] Remove obsolete test (diff) | |
| download | mltk-f4c487c6518c74142d168fe326683d1c63cf5bed.tar.gz mltk-f4c487c6518c74142d168fe326683d1c63cf5bed.tar.xz mltk-f4c487c6518c74142d168fe326683d1c63cf5bed.zip | |
[beamergui/printergui] Support SLX_MINIMAL_GUI
| -rwxr-xr-x | core/modules/beamergui/data/etc/X11/Xsession.d/99-beamergui-starter_script | 6 | ||||
| -rw-r--r-- | core/modules/printergui/data/opt/openslx/vmchooser/run-virt.d/setup_printer_lpd.inc | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/core/modules/beamergui/data/etc/X11/Xsession.d/99-beamergui-starter_script b/core/modules/beamergui/data/etc/X11/Xsession.d/99-beamergui-starter_script index ff75c849..4572b31f 100755 --- a/core/modules/beamergui/data/etc/X11/Xsession.d/99-beamergui-starter_script +++ b/core/modules/beamergui/data/etc/X11/Xsession.d/99-beamergui-starter_script @@ -4,8 +4,12 @@ # HACK: Don't interfere when we're in remote access mode [ -n "$SLX_REMOTE_VNC" ] && return 0 +# Also don't interfere if we requested a minimal gui +. /opt/openslx/bin/slx-tools +is_on "$SLX_MINIMAL_GUI" && return 0 if [ -z "$SLX_FORCE_RESOLUTION" ]; then + # Nothing set, normal operation /opt/openslx/bin/beamergui -a # Detach /bin/bash <<HERE @@ -16,8 +20,10 @@ if [ -z "$SLX_FORCE_RESOLUTION" ]; then } & HERE elif [ -z "$SLX_RESOLUTION_MAPPING" ]; then + # Forced resolution only /opt/openslx/bin/beamergui --resolutions "$SLX_FORCE_RESOLUTION" else + # Forced resolution and mapping /opt/openslx/bin/beamergui --resolutions "$SLX_FORCE_RESOLUTION" --mapping "$SLX_RESOLUTION_MAPPING" fi diff --git a/core/modules/printergui/data/opt/openslx/vmchooser/run-virt.d/setup_printer_lpd.inc b/core/modules/printergui/data/opt/openslx/vmchooser/run-virt.d/setup_printer_lpd.inc index 14ee0341..1e140ffd 100644 --- a/core/modules/printergui/data/opt/openslx/vmchooser/run-virt.d/setup_printer_lpd.inc +++ b/core/modules/printergui/data/opt/openslx/vmchooser/run-virt.d/setup_printer_lpd.inc @@ -6,6 +6,11 @@ setup_virtual_printer() { # TODO: QUEUE should prolly not be hardcoded .... local QUEUE="STANDARD" # This has to match the queue you configured in your VM local SPOOLDIR + + if is_on "$SLX_MINIMAL_GUI"; then + # Printergui could interfere with remote sessions + return 0 + fi ### Disabled: 100megs is not enough, some jobs are HUGE, try to use temp which should be on disk ## Try using user's tmpfs home first, as it gets wiped on logout @@ -16,7 +21,7 @@ setup_virtual_printer() { # If failed, try to fall back to /tmp if [ -z "${SPOOLDIR}" ] || [ ! -w "${SPOOLDIR}/${QUEUE}" ]; then - SPOOLDIR="${TMPDIR}/printergui-${RANDOM}" + SPOOLDIR="${TMPDIR}/printergui-$$-${RANDOM}" rm -rf -- "${SPOOLDIR}" if ! mkdir -p "${SPOOLDIR}/${QUEUE}"; then writelog "Could not mkdir -p '${SPOOLDIR}/${QUEUE}'" |
