From 06553717db159945f7b8a42285fc07dcc9b5a99f Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Thu, 16 Oct 2008 21:59:47 +0000 Subject: restructured runvmware: removed bug with cdr_: works with declare now the vmem file is written to /dev/shm when the host has 2.5+ gb of ram git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2350 95ad53e4-c205-0410-b2fa-d234c58c8868 --- .../plugins/vmware/files/runvmware-player-v1 | 137 ++++++++++--------- .../plugins/vmware/files/runvmware-player-v2 | 150 ++++++++++++--------- .../plugins/vmware/files/runvmware-player-v25 | 150 ++++++++++++--------- 3 files changed, 240 insertions(+), 197 deletions(-) (limited to 'os-plugins/plugins') diff --git a/os-plugins/plugins/vmware/files/runvmware-player-v1 b/os-plugins/plugins/vmware/files/runvmware-player-v1 index c8a523f2..3ee02d62 100644 --- a/os-plugins/plugins/vmware/files/runvmware-player-v1 +++ b/os-plugins/plugins/vmware/files/runvmware-player-v1 @@ -6,10 +6,10 @@ # orwards it into B drive of vmplayer # # Author(s): see project authors file -# letzte Änderung mj0, 15/10/2008 +# last changes mj0, 16/10/2008 # Copyright: (c) 2003 - 2008 - RZ Universitaet Freiburg # -# Version: 0.17 +# Version: 0.18 # ################################################################################ @@ -86,7 +86,7 @@ cdr_2="FALSE" # be done while creating the runscripts ... ide="TRUE" scsi="FALSE" -hddrv="lsilogic" +hddrv="ide" # Displayresolution needed for vmware.config hostres=$(xvidtune -show 2>/dev/null| grep -ve "^$") @@ -102,17 +102,19 @@ vmopt="-X" # temporary disk space for logs, etc... # use /tmp/vmware/${USER} if /tmp sits on NFS import -export tmpdir=/tmp/${USER} +redodir=/tmp/vmware/${USER} + +# dir for configs and vmem file +confdir=${redodir} # configfile -confile="${tmpdir}/runvmware.conf" +conffile="${confdir}/run-vmware.conf" # users vmware config folder vmhome="${HOME}/.vmware" -#vmhome="/tmp/${USER}/.vmware" - -# unknow variables needed vor vmwplayer configuration +# config and hardware version ex. 8/6 for VMware6.5 +# will be replaced automatically during run of vmware/player confver=8 hver=4 @@ -176,10 +178,7 @@ diskfile="${vmdir}/${imagename}" debug=0 #TODO: Bad done... we should do this another way later -last_changes=$(head -n 15 $0 | grep "@" | awk -F ", " '{print $2}' \ - | awk -F "-" '{print $3" "$2" "$1}' | sort -bfnr \ - | awk '{print $3"-"$2"-"$1}' | grep -m 1 [0-9]) -version=$(head -n 15 $0 | grep "# Version: " | awk '{print $3}') +version=$(head -n 20 $0 | grep "# Version: " | awk '{print $3}') ############# ## TODO: End of uncleaned area @@ -196,7 +195,7 @@ version=$(head -n 15 $0 | grep "# Version: " | awk '{print $3}') ## ################################################################################ -### write runvmware.conf ####################################################### +### write run-vmware.conf ####################################################### #TODO: only not yet checked function filecheck () { @@ -217,11 +216,11 @@ filecheck () # does file exist if [ "${noimage}" -ge "1" ]; then - writelog "Vmware Image Problem:\c" + writelog "Vmware Image Problem:\c " writelog "\tThe image you've specified doesn't exist." - writelog "Filecheck says:\c" + writelog "Filecheck says:\c " writelog "\t\t${diskfile}:\n\t\t\tNo such file or directory" - writelog "Hint:\c" + writelog "Hint:\c " writelog "\t\t\tCompare spelling of the image with your options.\n" exit 1 fi @@ -229,7 +228,7 @@ filecheck () # readable? if ! [ -r "${diskfile}" >/dev/null 2>&1 \ -o -r "${diskfile}" >/dev/null 2>&1 ]; then - writelog "Vmware Image Problem:\c" + writelog "Vmware Image Problem:\c " writelog "\tThe image you've specified has wrong rights." writelog "Filecheck says:\t\t$(echo ${filecheck} \ | awk '{print $1" "$3" "$4}') ${rightsfile}" @@ -241,8 +240,8 @@ filecheck () if ! [ -w "${diskfile}" >/dev/null 2>&1 \ -o -w "${diskfile}" >/dev/null 2>&1 ] \ && [ "${np}" = "independent-persistent" ]; then - writelog "Vmware Image Problem:\c" - writelog "\tThe image you've specified has wrong rights." + writelog "Vmware Image Problem:\c " + writelog "\tThe image you have specified has wrong rights." writelog "Filecheck says:\t\t$(echo ${filecheck} \ | awk '{print $1" "$3" "$4}') ${rightsfile}" writelog "Hint:\t\t\tUse nonpersistent-mode or change rights to rw\n" @@ -251,12 +250,12 @@ filecheck () } -### write runvmware.conf ####################################################### +### write run-vmware.conf ####################################################### runvmwareconfheader () { echo " ############################################################################## - ###### This configuration file was generated by 'runvmware', ###### + ###### This configuration file was generated by run-vmware.sh, ###### ###### dont use it for your own configurations - it will be overwritten ###### ###### ###### @@ -331,12 +330,11 @@ runvmwareconfheader () sharedFolder.maxNum = \"1\" ###### misc ################################################################## - tmpDirectory = \"${tmpdir}\" + tmpDirectory = \"${redodir}\" mainMem.useNamedFile = \"TRUE\" snapshot.disabled = \"TRUE\" tools.syncTime = \"TRUE\" - # use redoLogDir = \"/dev/shm\" if sitting on NFS import - redoLogDir = \"${tmpdir}\" + redoLogDir = \"${redodir}\" hints.hideAll = \"TRUE\" logging = \"FALSE\" isolation.tools.hgfs.disable = \"FALSE\" @@ -349,11 +347,12 @@ runvmwareconfheader () pref.hotkey.alt = \"TRUE\" svga.maxWidth = \"${xres}\" svga.maxHeight = \"${yres}\" + svga.autodetect = \"TRUE\" " \ - >${confile} + >${conffile} # set the appropriate permissions for the vmware config file - chmod u+rwx ${confile} >/dev/null 2>&1 + chmod u+rwx ${conffile} >/dev/null 2>&1 } @@ -362,15 +361,14 @@ preferencesheader () { echo " ############################################################################## - ###### This configuration file was generated by 'runvmware', ###### + ###### This configuration file was generated by run-vmware.sh, ###### ###### dont use it for your own configurations - it will be overwritten ###### ###### ###### ################################## Wichtig! ################################## ###### *.vmem wird immer angelegt und frisst soviel Speicher, wie fuer ###### ###### den Gast vorgesehen. Sollte nicht im tempfs liegen. NFS OK, da ###### ###### IO nur einmal beim Start erheblich. Wird gesteuert ueber ###### - ###### tmpDirectory = /nfs-viel-platz und darin wird dann vmware-\$user ###### - ###### angelegt. ###### + ###### confdir=/nfs-viel-platz ###### # DEBUG: some versions accept it only upper or lowercase... which one? # The following 4 could also be uppercase @@ -384,8 +382,8 @@ preferencesheader () pref.vmplayer.fullscreen.autohide = \"true\" pref.vmplayer.webUpdateOnStartup = \"false\" prefvmx.defaultVMPath = \"${vmhome}\" - prefvmx.mru.config = \"${confile}:\" - tmpDirectory = \"${tmpdir}\" + prefvmx.mru.config = \"${conffile}:\" + tmpDirectory = \"${redodir}\" webUpdate.checkPeriod = \"manual\" pref.eula.size = \"2\" pref.eula.0.appName = \"VMware Player\" @@ -405,7 +403,7 @@ writelog () echo -e "$1" # log in file - echo -e "$1" >>${tmpdir}/runvmware.${USER}.log + echo -e "$1" >>${redodir}/run-vmware.${USER}.log } @@ -419,24 +417,24 @@ writelog () ## ################################################################################ -# Delete the LOCK file. its unsecure, but ... -rm -f ${tmpdir}/*LOCK >/dev/null 2>&1 +# Delete the LOCK file. its insecure, but ... +rm -f ${confdir}/*LOCK >/dev/null 2>&1 # create vmware directories -mkdir -p ${tmpdir} >/dev/null 2>&1 +mkdir -p ${redodir} >/dev/null 2>&1 +mkdir -p ${confdir} >/dev/null 2>&1 mkdir -p ${vmhome} >/dev/null 2>&1 -# NO X-server, no runvmware ;) +# NO X-server, no run-vmware ;) [ -z "$DISPLAY" ] && echo -e "\n\tStart only within a desktop!\n" && exit 1 # logo for console cat </dev/null done # adjust volume -writelog "Unmuting sound...\c" -amixer -q sset Master 28 unmute -amixer -q sset PCM 28 unmute +writelog "Unmuting sound...\c " +amixer -q sset Master 28 unmute 2>/dev/null +amixer -q sset PCM 28 unmute 2>/dev/null +amixer -q sset Headphone 28 unmute 2>/dev/null +amixer -q sset Front 0 mute 2>/dev/null writelog "finished\n" ### run vmplayer ############################################################### # ...with the automatically written config file -if [ $(which vmplayer 2>/dev/null) ]; then writelog "\nStarting VMplayer..." +if [ $(which vmplayer 2>/dev/null) ]; then writelog "Starting ..." # run VMplayer - writelog "... vmplayer ${vmopt} ${confile}...\n" - vmplayer ${vmopt} ${confile} 2>&1 >/dev/null + writelog "... vmplayer ${vmopt} ${conffile}\n" + vmplayer ${vmopt} ${conffile} >/dev/null 2>&1 else - writelog "\nNo VMware/VMPlayer found!\n" + writelog "No VMware/VMPlayer found!\n" exit 1 fi -writelog "\nBye.\n" +writelog "Bye.\n" exit 0 diff --git a/os-plugins/plugins/vmware/files/runvmware-player-v2 b/os-plugins/plugins/vmware/files/runvmware-player-v2 index 581181a3..2860517a 100644 --- a/os-plugins/plugins/vmware/files/runvmware-player-v2 +++ b/os-plugins/plugins/vmware/files/runvmware-player-v2 @@ -6,10 +6,10 @@ # orwards it into B drive of vmplayer # # Author(s): see project authors file -# letzte Änderung mj0, 15/10/2008 +# last changes mj0, 16/10/2008 # Copyright: (c) 2003 - 2008 - RZ Universitaet Freiburg # -# Version: 0.17 +# Version: 0.18 # ################################################################################ @@ -86,7 +86,7 @@ cdr_2="FALSE" # be done while creating the runscripts ... ide="TRUE" scsi="FALSE" -hddrv="lsilogic" +hddrv="ide" # Displayresolution needed for vmware.config hostres=$(xvidtune -show 2>/dev/null| grep -ve "^$") @@ -102,17 +102,19 @@ vmopt="-X" # temporary disk space for logs, etc... # use /tmp/vmware/${USER} if /tmp sits on NFS import -export tmpdir=/tmp/${USER} +redodir=/tmp/vmware/${USER} + +# dir for configs and vmem file +confdir=${redodir} # configfile -confile="${tmpdir}/runvmware.conf" +conffile="${confdir}/run-vmware.conf" # users vmware config folder vmhome="${HOME}/.vmware" -#vmhome="/tmp/${USER}/.vmware" - -# unknow variables needed vor vmwplayer configuration +# config and hardware version ex. 8/6 for VMware6.5 +# will be replaced automatically during run of vmware/player confver=8 hver=4 @@ -176,10 +178,7 @@ diskfile="${vmdir}/${imagename}" debug=0 #TODO: Bad done... we should do this another way later -last_changes=$(head -n 15 $0 | grep "@" | awk -F ", " '{print $2}' \ - | awk -F "-" '{print $3" "$2" "$1}' | sort -bfnr \ - | awk '{print $3"-"$2"-"$1}' | grep -m 1 [0-9]) -version=$(head -n 15 $0 | grep "# Version: " | awk '{print $3}') +version=$(head -n 20 $0 | grep "# Version: " | awk '{print $3}') ############# ## TODO: End of uncleaned area @@ -196,7 +195,7 @@ version=$(head -n 15 $0 | grep "# Version: " | awk '{print $3}') ## ################################################################################ -### write runvmware.conf ####################################################### +### write run-vmware.conf ####################################################### #TODO: only not yet checked function filecheck () { @@ -217,11 +216,11 @@ filecheck () # does file exist if [ "${noimage}" -ge "1" ]; then - writelog "Vmware Image Problem:\c" + writelog "Vmware Image Problem:\c " writelog "\tThe image you've specified doesn't exist." - writelog "Filecheck says:\c" + writelog "Filecheck says:\c " writelog "\t\t${diskfile}:\n\t\t\tNo such file or directory" - writelog "Hint:\c" + writelog "Hint:\c " writelog "\t\t\tCompare spelling of the image with your options.\n" exit 1 fi @@ -229,7 +228,7 @@ filecheck () # readable? if ! [ -r "${diskfile}" >/dev/null 2>&1 \ -o -r "${diskfile}" >/dev/null 2>&1 ]; then - writelog "Vmware Image Problem:\c" + writelog "Vmware Image Problem:\c " writelog "\tThe image you've specified has wrong rights." writelog "Filecheck says:\t\t$(echo ${filecheck} \ | awk '{print $1" "$3" "$4}') ${rightsfile}" @@ -241,8 +240,8 @@ filecheck () if ! [ -w "${diskfile}" >/dev/null 2>&1 \ -o -w "${diskfile}" >/dev/null 2>&1 ] \ && [ "${np}" = "independent-persistent" ]; then - writelog "Vmware Image Problem:\c" - writelog "\tThe image you've specified has wrong rights." + writelog "Vmware Image Problem:\c " + writelog "\tThe image you have specified has wrong rights." writelog "Filecheck says:\t\t$(echo ${filecheck} \ | awk '{print $1" "$3" "$4}') ${rightsfile}" writelog "Hint:\t\t\tUse nonpersistent-mode or change rights to rw\n" @@ -251,12 +250,12 @@ filecheck () } -### write runvmware.conf ####################################################### +### write run-vmware.conf ####################################################### runvmwareconfheader () { echo " ############################################################################## - ###### This configuration file was generated by 'runvmware', ###### + ###### This configuration file was generated by run-vmware.sh, ###### ###### dont use it for your own configurations - it will be overwritten ###### ###### ###### @@ -331,12 +330,11 @@ runvmwareconfheader () sharedFolder.maxNum = \"1\" ###### misc ################################################################## - tmpDirectory = \"${tmpdir}\" + tmpDirectory = \"${redodir}\" mainMem.useNamedFile = \"TRUE\" snapshot.disabled = \"TRUE\" tools.syncTime = \"TRUE\" - # use redoLogDir = \"/dev/shm\" if sitting on NFS import - redoLogDir = \"${tmpdir}\" + redoLogDir = \"${redodir}\" hints.hideAll = \"TRUE\" logging = \"FALSE\" isolation.tools.hgfs.disable = \"FALSE\" @@ -349,11 +347,12 @@ runvmwareconfheader () pref.hotkey.alt = \"TRUE\" svga.maxWidth = \"${xres}\" svga.maxHeight = \"${yres}\" + svga.autodetect = \"TRUE\" " \ - >${confile} + >${conffile} # set the appropriate permissions for the vmware config file - chmod u+rwx ${confile} >/dev/null 2>&1 + chmod u+rwx ${conffile} >/dev/null 2>&1 } @@ -362,15 +361,14 @@ preferencesheader () { echo " ############################################################################## - ###### This configuration file was generated by 'runvmware', ###### + ###### This configuration file was generated by run-vmware.sh, ###### ###### dont use it for your own configurations - it will be overwritten ###### ###### ###### ################################## Wichtig! ################################## ###### *.vmem wird immer angelegt und frisst soviel Speicher, wie fuer ###### ###### den Gast vorgesehen. Sollte nicht im tempfs liegen. NFS OK, da ###### ###### IO nur einmal beim Start erheblich. Wird gesteuert ueber ###### - ###### tmpDirectory = /nfs-viel-platz und darin wird dann vmware-\$user ###### - ###### angelegt. ###### + ###### confdir=/nfs-viel-platz ###### # DEBUG: some versions accept it only upper or lowercase... which one? # The following 4 could also be uppercase @@ -384,15 +382,20 @@ preferencesheader () pref.vmplayer.fullscreen.autohide = \"true\" pref.vmplayer.webUpdateOnStartup = \"false\" prefvmx.defaultVMPath = \"${vmhome}\" - prefvmx.mru.config = \"${confile}:\" - tmpDirectory = \"${tmpdir}\" + prefvmx.mru.config = \"${conffile}:\" + tmpDirectory = \"${redodir}\" webUpdate.checkPeriod = \"manual\" pref.eula.size = \"2\" pref.eula.0.appName = \"VMware Player\" pref.eula.0.buildNumber = \"${vmbuild}\" pref.eula.1.appName = \"VMware Workstation\" pref.eula.1.buildNumber = \"${vmbuild}\" - pref.enableAllSharedFolders = "TRUE" + pref.enableAllSharedFolders = \"TRUE\" + sharedFolder0.enabled = \"TRUE\" + pref.grabOnKeyPress = \"TRUE\" + pref.autoFitFullScreen = \"fitHostToGuest\" + pref.autoFitGuestToWindow = \"TRUE\" + pref.grabOnMouseClick = \"TRUE\" " \ >${vmhome}/preferences } @@ -406,7 +409,7 @@ writelog () echo -e "$1" # log in file - echo -e "$1" >>${tmpdir}/runvmware.${USER}.log + echo -e "$1" >>${redodir}/run-vmware.${USER}.log } @@ -420,24 +423,24 @@ writelog () ## ################################################################################ -# Delete the LOCK file. its unsecure, but ... -rm -f ${tmpdir}/*LOCK >/dev/null 2>&1 +# Delete the LOCK file. its insecure, but ... +rm -f ${confdir}/*LOCK >/dev/null 2>&1 # create vmware directories -mkdir -p ${tmpdir} >/dev/null 2>&1 +mkdir -p ${redodir} >/dev/null 2>&1 +mkdir -p ${confdir} >/dev/null 2>&1 mkdir -p ${vmhome} >/dev/null 2>&1 -# NO X-server, no runvmware ;) +# NO X-server, no run-vmware ;) [ -z "$DISPLAY" ] && echo -e "\n\tStart only within a desktop!\n" && exit 1 # logo for console cat </dev/null done # adjust volume -writelog "Unmuting sound...\c" -amixer -q sset Master 28 unmute -amixer -q sset PCM 28 unmute +writelog "Unmuting sound...\c " +amixer -q sset Master 28 unmute 2>/dev/null +amixer -q sset PCM 28 unmute 2>/dev/null +amixer -q sset Headphone 28 unmute 2>/dev/null +amixer -q sset Front 0 mute 2>/dev/null writelog "finished\n" ### run vmplayer ############################################################### # ...with the automatically written config file -if [ $(which vmplayer 2>/dev/null) ]; then writelog "\nStarting VMplayer..." +if [ $(which vmplayer 2>/dev/null) ]; then writelog "Starting ..." # run VMplayer - writelog "... vmplayer ${vmopt} ${confile}...\n" + writelog "... vmplayer ${vmopt} ${conffile}\n" # start fvwm for player 2+ # problems with windows opening in background - which fvwm2 && \ - ( echo "EdgeScroll 0 0" >/tmp/fvwm-$USER - fvwm -f /tmp/fvwm-$USER & ) - vmplayer ${vmopt} ${confile} 2>&1 >/dev/null + which fvwm2 >/dev/null 2>&1 && \ + ( echo "EdgeScroll 0 0" > ${redodir}/fvwm + fvwm2 -f ${redodir}/fvwm >/dev/null 2>&1 & ) + vmplayer ${vmopt} ${conffile} >/dev/null 2>&1 else - writelog "\nNo VMware/VMPlayer found!\n" + writelog "No VMware/VMPlayer found!\n" exit 1 fi -writelog "\nBye.\n" +writelog "Bye.\n" exit 0 diff --git a/os-plugins/plugins/vmware/files/runvmware-player-v25 b/os-plugins/plugins/vmware/files/runvmware-player-v25 index 581181a3..2860517a 100644 --- a/os-plugins/plugins/vmware/files/runvmware-player-v25 +++ b/os-plugins/plugins/vmware/files/runvmware-player-v25 @@ -6,10 +6,10 @@ # orwards it into B drive of vmplayer # # Author(s): see project authors file -# letzte Änderung mj0, 15/10/2008 +# last changes mj0, 16/10/2008 # Copyright: (c) 2003 - 2008 - RZ Universitaet Freiburg # -# Version: 0.17 +# Version: 0.18 # ################################################################################ @@ -86,7 +86,7 @@ cdr_2="FALSE" # be done while creating the runscripts ... ide="TRUE" scsi="FALSE" -hddrv="lsilogic" +hddrv="ide" # Displayresolution needed for vmware.config hostres=$(xvidtune -show 2>/dev/null| grep -ve "^$") @@ -102,17 +102,19 @@ vmopt="-X" # temporary disk space for logs, etc... # use /tmp/vmware/${USER} if /tmp sits on NFS import -export tmpdir=/tmp/${USER} +redodir=/tmp/vmware/${USER} + +# dir for configs and vmem file +confdir=${redodir} # configfile -confile="${tmpdir}/runvmware.conf" +conffile="${confdir}/run-vmware.conf" # users vmware config folder vmhome="${HOME}/.vmware" -#vmhome="/tmp/${USER}/.vmware" - -# unknow variables needed vor vmwplayer configuration +# config and hardware version ex. 8/6 for VMware6.5 +# will be replaced automatically during run of vmware/player confver=8 hver=4 @@ -176,10 +178,7 @@ diskfile="${vmdir}/${imagename}" debug=0 #TODO: Bad done... we should do this another way later -last_changes=$(head -n 15 $0 | grep "@" | awk -F ", " '{print $2}' \ - | awk -F "-" '{print $3" "$2" "$1}' | sort -bfnr \ - | awk '{print $3"-"$2"-"$1}' | grep -m 1 [0-9]) -version=$(head -n 15 $0 | grep "# Version: " | awk '{print $3}') +version=$(head -n 20 $0 | grep "# Version: " | awk '{print $3}') ############# ## TODO: End of uncleaned area @@ -196,7 +195,7 @@ version=$(head -n 15 $0 | grep "# Version: " | awk '{print $3}') ## ################################################################################ -### write runvmware.conf ####################################################### +### write run-vmware.conf ####################################################### #TODO: only not yet checked function filecheck () { @@ -217,11 +216,11 @@ filecheck () # does file exist if [ "${noimage}" -ge "1" ]; then - writelog "Vmware Image Problem:\c" + writelog "Vmware Image Problem:\c " writelog "\tThe image you've specified doesn't exist." - writelog "Filecheck says:\c" + writelog "Filecheck says:\c " writelog "\t\t${diskfile}:\n\t\t\tNo such file or directory" - writelog "Hint:\c" + writelog "Hint:\c " writelog "\t\t\tCompare spelling of the image with your options.\n" exit 1 fi @@ -229,7 +228,7 @@ filecheck () # readable? if ! [ -r "${diskfile}" >/dev/null 2>&1 \ -o -r "${diskfile}" >/dev/null 2>&1 ]; then - writelog "Vmware Image Problem:\c" + writelog "Vmware Image Problem:\c " writelog "\tThe image you've specified has wrong rights." writelog "Filecheck says:\t\t$(echo ${filecheck} \ | awk '{print $1" "$3" "$4}') ${rightsfile}" @@ -241,8 +240,8 @@ filecheck () if ! [ -w "${diskfile}" >/dev/null 2>&1 \ -o -w "${diskfile}" >/dev/null 2>&1 ] \ && [ "${np}" = "independent-persistent" ]; then - writelog "Vmware Image Problem:\c" - writelog "\tThe image you've specified has wrong rights." + writelog "Vmware Image Problem:\c " + writelog "\tThe image you have specified has wrong rights." writelog "Filecheck says:\t\t$(echo ${filecheck} \ | awk '{print $1" "$3" "$4}') ${rightsfile}" writelog "Hint:\t\t\tUse nonpersistent-mode or change rights to rw\n" @@ -251,12 +250,12 @@ filecheck () } -### write runvmware.conf ####################################################### +### write run-vmware.conf ####################################################### runvmwareconfheader () { echo " ############################################################################## - ###### This configuration file was generated by 'runvmware', ###### + ###### This configuration file was generated by run-vmware.sh, ###### ###### dont use it for your own configurations - it will be overwritten ###### ###### ###### @@ -331,12 +330,11 @@ runvmwareconfheader () sharedFolder.maxNum = \"1\" ###### misc ################################################################## - tmpDirectory = \"${tmpdir}\" + tmpDirectory = \"${redodir}\" mainMem.useNamedFile = \"TRUE\" snapshot.disabled = \"TRUE\" tools.syncTime = \"TRUE\" - # use redoLogDir = \"/dev/shm\" if sitting on NFS import - redoLogDir = \"${tmpdir}\" + redoLogDir = \"${redodir}\" hints.hideAll = \"TRUE\" logging = \"FALSE\" isolation.tools.hgfs.disable = \"FALSE\" @@ -349,11 +347,12 @@ runvmwareconfheader () pref.hotkey.alt = \"TRUE\" svga.maxWidth = \"${xres}\" svga.maxHeight = \"${yres}\" + svga.autodetect = \"TRUE\" " \ - >${confile} + >${conffile} # set the appropriate permissions for the vmware config file - chmod u+rwx ${confile} >/dev/null 2>&1 + chmod u+rwx ${conffile} >/dev/null 2>&1 } @@ -362,15 +361,14 @@ preferencesheader () { echo " ############################################################################## - ###### This configuration file was generated by 'runvmware', ###### + ###### This configuration file was generated by run-vmware.sh, ###### ###### dont use it for your own configurations - it will be overwritten ###### ###### ###### ################################## Wichtig! ################################## ###### *.vmem wird immer angelegt und frisst soviel Speicher, wie fuer ###### ###### den Gast vorgesehen. Sollte nicht im tempfs liegen. NFS OK, da ###### ###### IO nur einmal beim Start erheblich. Wird gesteuert ueber ###### - ###### tmpDirectory = /nfs-viel-platz und darin wird dann vmware-\$user ###### - ###### angelegt. ###### + ###### confdir=/nfs-viel-platz ###### # DEBUG: some versions accept it only upper or lowercase... which one? # The following 4 could also be uppercase @@ -384,15 +382,20 @@ preferencesheader () pref.vmplayer.fullscreen.autohide = \"true\" pref.vmplayer.webUpdateOnStartup = \"false\" prefvmx.defaultVMPath = \"${vmhome}\" - prefvmx.mru.config = \"${confile}:\" - tmpDirectory = \"${tmpdir}\" + prefvmx.mru.config = \"${conffile}:\" + tmpDirectory = \"${redodir}\" webUpdate.checkPeriod = \"manual\" pref.eula.size = \"2\" pref.eula.0.appName = \"VMware Player\" pref.eula.0.buildNumber = \"${vmbuild}\" pref.eula.1.appName = \"VMware Workstation\" pref.eula.1.buildNumber = \"${vmbuild}\" - pref.enableAllSharedFolders = "TRUE" + pref.enableAllSharedFolders = \"TRUE\" + sharedFolder0.enabled = \"TRUE\" + pref.grabOnKeyPress = \"TRUE\" + pref.autoFitFullScreen = \"fitHostToGuest\" + pref.autoFitGuestToWindow = \"TRUE\" + pref.grabOnMouseClick = \"TRUE\" " \ >${vmhome}/preferences } @@ -406,7 +409,7 @@ writelog () echo -e "$1" # log in file - echo -e "$1" >>${tmpdir}/runvmware.${USER}.log + echo -e "$1" >>${redodir}/run-vmware.${USER}.log } @@ -420,24 +423,24 @@ writelog () ## ################################################################################ -# Delete the LOCK file. its unsecure, but ... -rm -f ${tmpdir}/*LOCK >/dev/null 2>&1 +# Delete the LOCK file. its insecure, but ... +rm -f ${confdir}/*LOCK >/dev/null 2>&1 # create vmware directories -mkdir -p ${tmpdir} >/dev/null 2>&1 +mkdir -p ${redodir} >/dev/null 2>&1 +mkdir -p ${confdir} >/dev/null 2>&1 mkdir -p ${vmhome} >/dev/null 2>&1 -# NO X-server, no runvmware ;) +# NO X-server, no run-vmware ;) [ -z "$DISPLAY" ] && echo -e "\n\tStart only within a desktop!\n" && exit 1 # logo for console cat </dev/null done # adjust volume -writelog "Unmuting sound...\c" -amixer -q sset Master 28 unmute -amixer -q sset PCM 28 unmute +writelog "Unmuting sound...\c " +amixer -q sset Master 28 unmute 2>/dev/null +amixer -q sset PCM 28 unmute 2>/dev/null +amixer -q sset Headphone 28 unmute 2>/dev/null +amixer -q sset Front 0 mute 2>/dev/null writelog "finished\n" ### run vmplayer ############################################################### # ...with the automatically written config file -if [ $(which vmplayer 2>/dev/null) ]; then writelog "\nStarting VMplayer..." +if [ $(which vmplayer 2>/dev/null) ]; then writelog "Starting ..." # run VMplayer - writelog "... vmplayer ${vmopt} ${confile}...\n" + writelog "... vmplayer ${vmopt} ${conffile}\n" # start fvwm for player 2+ # problems with windows opening in background - which fvwm2 && \ - ( echo "EdgeScroll 0 0" >/tmp/fvwm-$USER - fvwm -f /tmp/fvwm-$USER & ) - vmplayer ${vmopt} ${confile} 2>&1 >/dev/null + which fvwm2 >/dev/null 2>&1 && \ + ( echo "EdgeScroll 0 0" > ${redodir}/fvwm + fvwm2 -f ${redodir}/fvwm >/dev/null 2>&1 & ) + vmplayer ${vmopt} ${conffile} >/dev/null 2>&1 else - writelog "\nNo VMware/VMPlayer found!\n" + writelog "No VMware/VMPlayer found!\n" exit 1 fi -writelog "\nBye.\n" +writelog "Bye.\n" exit 0 -- cgit v1.2.3-55-g7522