From be9cf05a3db2fbf8151e3170b82f3d7f552bd51d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 28 Apr 2014 14:37:51 +0200 Subject: [vmchooser] Fix creation of spooldir for lpd - remote log if failed --- .../vmchooser/data/opt/openslx/scripts/vmchooser-run_virt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt index 26d92dde..30a0d517 100755 --- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt +++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt @@ -446,7 +446,7 @@ amixer -q sset Front "$VOL" unmute 2>/dev/null amixer -q sset Speaker "$VOL" unmute 2>/dev/null # annoying built-in speaker amixer -q sset 'Front Mic' "$VOL" unmute 2>/dev/null # to be checked if Mic is actually activated amixer -q sset 'Rear Mic' "$VOL" unmute 2>/dev/null # =""= -amixer -q -c pcsp sset Master "0%" mute 2>/dev/null # fix random static noise when starting vmplayer TODO: find out why?! +amixer -q -c pcsp sset Master "0%" mute 2>/dev/null # fix random static noise when starting vmplayer when module snd_pcsp (not pcspkr) is loaded # Start printer daemon QUEUE="STANDARD" # This has to match the queue you configured in your VM @@ -460,9 +460,12 @@ SPOOLDIR= #fi # If failed, try to fall back to /tmp if [ -z "${SPOOLDIR}" ] || [ ! -w "${SPOOLDIR}/${QUEUE}" ]; then - SPOOLDIR="/tmp/printergui/${USER}-$$-${RANDOM}/" + SPOOLDIR="/tmp/printergui-${USER}-$$-${RANDOM}" rm -rf -- "${SPOOLDIR}" - mkdir -p "${SPOOLDIR}/${QUEUE}" + if ! mkdir -p "${SPOOLDIR}/${QUEUE}"; then + slxlog "virt-spooldir" "Could not create spool directory ($SPOOLDIR) for $USER - printing will not work!" + # TODO: Warn user + fi fi # Start the lpdaemon listening on the given port -- cgit v1.2.3-55-g7522 From 05cda1ad1aaac741be9617b8dc997ac011d51984 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 29 Apr 2014 16:22:54 +0200 Subject: [vmchooser] vmchooser-run_virt: Now logs executed VM command --- remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt | 1 + 1 file changed, 1 insertion(+) diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt index 30a0d517..f5878b9b 100755 --- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt +++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt @@ -584,6 +584,7 @@ fi #fi # This will start the VM +writelog "VM command: eval ${VIRTCMD} ${VIRTCMDOPTS}" eval ${VIRTCMD} ${VIRTCMDOPTS} # writelog "Bye." -- cgit v1.2.3-55-g7522 From 41beddc8562e53e36fcc0ce074b014ef9ec1ee63 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 29 Apr 2014 16:30:58 +0200 Subject: [vbox] Simplified script list to be patched with openslx binary path --- remote/modules/vbox/module.build | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/remote/modules/vbox/module.build b/remote/modules/vbox/module.build index 5a533089..f4a8610a 100644 --- a/remote/modules/vbox/module.build +++ b/remote/modules/vbox/module.build @@ -1,11 +1,16 @@ #!/bin/bash patch_vbox_scripts() { - # patching some virtualbox utility scripts to include openslx-busybox paths. Strange sed-ing, as the added - # openslx paths need to be at the end of PATH to not impede with system binaries to not impede with system binaries + # Patching virtualbox utility scripts to include openslx-busybox binary paths. Strange sed-ing, as the openslx + # binary paths need to be at the end of PATH to not impede with system binaries. + # It seems sufficient to patch just VBox, as eg. vboxmanage, vboxheadless etc. are just links to VBox. + # If only vboxmanage, vboxheadless or such should be patched (and not the base script VBox) just use a list + # in the loop (eg. 'for i in virtualbox vboxmanage vboxheadless; do'). These links will be replaced by patched + # 'real' files. Of course it will not make sense if VBox is included in the list, then. + # Patched files will be saved with extension .original. + pinfo "Patching virtual box scripts to include openslx (busybox)-paths ..." - # vboxmanage is a link to VBox; will get unlinked. Original link will be vboxmanage.original - for i in virtualbox vboxmanage vboxheadless; do + for i in VBox; do pinfo "Patching virtual box script $i ..." SCRIPTPATH=$(grep -m 1 PATH "${MODULE_BUILD_DIR}/usr/bin/$i"|sed 's/"//g') # assume first hit is real path sed -i "-i.original" "/^PATH=/c ${SCRIPTPATH}:/opt/openslx/bin:/opt/openslx/usr/bin:/opt/openslx/sbin"\ -- cgit v1.2.3-55-g7522 From 2511c04b0512ce0ba05888001411e02da15eaec8 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 29 Apr 2014 16:38:49 +0200 Subject: [vmchooser] Fix resolution detection for dualhead setups (only consider left most output, not whole virtual screen) --- remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt index f5878b9b..18df10d3 100755 --- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt +++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt @@ -481,7 +481,7 @@ PID_LPD="$!" # via virtual floppy cp "$xmlfile" "$VMCHOOSER_DIR/fd-loop/config.xml" # Add another file with resolution information -xrandr | grep -o -E 'current\s*[0-9]+\s*x\s*[0-9]+' | cut -c 8- | sed -r 's/(\s|\t|\n)//g' | head -n 1 > "$VMCHOOSER_DIR/fd-loop/hostres.txt" +xrandr | grep -o -E 'connected\s*[0-9]+x[0-9]+\+0\+0' | grep -o -E '[0-9]+x[0-9]+' | head -n 1 > "$VMCHOOSER_DIR/fd-loop/hostres.txt" # Add our magic openslx binary that sets the correct guest resolution cp "$VMCHOOSER_DIR/data/openslx.exe" "$VMCHOOSER_DIR/fd-loop/" -- cgit v1.2.3-55-g7522