diff options
| author | Jonathan Bauer | 2014-04-30 14:16:19 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2014-04-30 14:16:19 +0200 |
| commit | c4288e3fa227b8a750124a05463ae9a53c9ad92f (patch) | |
| tree | 81485c89497c6ffb7fa6c90da09adac0e225b653 /remote/modules/vmchooser/data | |
| parent | [openstack] skeleton for new openstack module (diff) | |
| parent | Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff) | |
| download | tm-scripts-c4288e3fa227b8a750124a05463ae9a53c9ad92f.tar.gz tm-scripts-c4288e3fa227b8a750124a05463ae9a53c9ad92f.tar.xz tm-scripts-c4288e3fa227b8a750124a05463ae9a53c9ad92f.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules/vmchooser/data')
| -rwxr-xr-x | remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt | 12 |
1 files changed, 8 insertions, 4 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..18df10d3 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 @@ -478,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/" @@ -581,6 +584,7 @@ fi #fi # This will start the VM +writelog "VM command: eval ${VIRTCMD} ${VIRTCMDOPTS}" eval ${VIRTCMD} ${VIRTCMDOPTS} # writelog "Bye." |
