diff options
Diffstat (limited to 'remote/modules')
| -rw-r--r-- | remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc | 2 | ||||
| -rw-r--r-- | remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc | 20 |
2 files changed, 20 insertions, 2 deletions
diff --git a/remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc b/remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc index ff562b20..5f12fe29 100644 --- a/remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc +++ b/remote/modules/run-virt/data/opt/openslx/scripts/includes/setup_virtual_floppy.inc @@ -19,7 +19,7 @@ else SHARE_REMAP_MODE_INI="$SHARE_REMAP_MODE" fi [ -z "$SHARE_CREATE_MISSING_REMAP" ] && SHARE_CREATE_MISSING_REMAP="1" -RESOLUTION=$(xrandr | grep -o -E 'connected\s*(primary)?\s*[0-9]+x[0-9]+\+0\+0' \ +declare -rg RESOLUTION=$(xrandr | grep -o -E 'connected\s*(primary)?\s*[0-9]+x[0-9]+\+0\+0' \ | grep -o -E -m1 '[0-9]+x[0-9]+') # Legacy: HOSTRES.TXT diff --git a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc index 878e9a9d..69ec513a 100644 --- a/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc +++ b/remote/modules/vmware/data/opt/openslx/vmchooser/vmware/includes/parse_vmx.inc @@ -128,8 +128,26 @@ if [ -n "$SLX_EXAM" ]; then echo 'gui.restricted = "true"' >> "${TMPCONFIG}" fi +# Hack resolution if we know the desired one is not in the default list of vmx_svga +# For now, only do it on the odd ones, as we don't know if this has any side effects +# This seems unnecessary on Win7 but is required on WinXP - need more research for other OSs +case "$RESOLUTION" in + 1600x900|2560x1440|2880x1800|3200x1800) + X=${RESOLUTION%x*} + Y=${RESOLUTION#*x} + BYTES=$(( ( ( X * Y * 4 + 65535 ) / 65536 ) * 65536 )) + [ "$BYTES" -lt 16777216 ] && BYTES=16777216 + cat >> "${TMPCONFIG}" <<-EOF + svga.autodetect = "FALSE" + svga.vramSize = $BYTES + svga.maxWidth = $X + svga.maxHeight = $Y + EOF + ;; +esac + # Killing duplicate lines (output much nicer than sort -u): -awk '!a[$0]++' "${TMPCONFIG}" > "${TMPCONFIG}.tmp" && mv "${TMPCONFIG}.tmp" "${TMPCONFIG}" +awk '!a[$0]++' "${TMPCONFIG}" > "${TMPCONFIG}.tmp" && mv -f "${TMPCONFIG}.tmp" "${TMPCONFIG}" # Apply $maxhardwareversion to final VMX HWVER=$(grep -i -m1 '^virtualHW.version *= *' "${TMPCONFIG}" | awk -F '=' '{print $2}' | sed -r 's/[^0-9]//g') |
