--- vmd.orig 2014-02-21 09:52:33.762007670 +0100 +++ vmd 2014-02-21 10:10:11.197951374 +0100 @@ -135,9 +135,14 @@ # when we spawn the VMD binary, we don't run it as a background process. set VMDWEBHELPER=0 set VMDRUNDEBUGGER=0 +set VMDFORCE=0 @ parmcount = 0 foreach i ( $* ) @ parmcount++ + if ( "$argv[$parmcount]" == "-force") then + set VMDFORCE=1 + endif + if ( "$argv[$parmcount]" == "-webhelper") then set VMDWEBHELPER=1 endif @@ -177,6 +182,15 @@ endif end +# check whether ".vmdrc" exists in the current directory and we are not in $HOME +# if it does, bail out! +if ( $cwd != $home && $cwd != $VMDDIR && $VMDFORCE != "1" ) then + if ( -r ".vmdrc" ) then + echo 'ERROR: .vmdrc exists in this directory!' + echo 'If you are sure that this is OK, use "vmd -force".' + exit 1 + endif +endif # determine type of machine, and run appropriate executable set MACHARCH=`uname -s`