salawank

VM Console

Sep 20th, 2011
87
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. ################################################## ##############################
  3. # Call VMWare Server�s Remote Console in a clean GTK setup.
  4. ################################################## ##############################
  5.  
  6. # Clean GTK setup for VMWare
  7.  
  8. export VMWARE_USE_SHIPPED_GTK=yes
  9. export GDK_NATIVE_WINDOWS=true
  10.  
  11. # Find console executable in Firefox plugins.
  12. vmrc="$(find "$HOME/.mozilla/firefox" -name vmware-vmrc -type f -perm -111 | tail -1)"
  13. [ -x "$vmrc" ] || exit 1
  14.  
  15. VMLIB=$(dirname "$vmrc")
  16. VMLIB=$(dirname "$VMLIB")/lib
  17.  
  18. export LD_LIBRARY_PATH=$VMLIB/libexpat.so.0:$VMLIB/libsexymm.so.2:$VMLIB/libview.so.2:$VMLIB/libvmwarebase.so.0:$VMLIB/libvmwareui.so.0:$VMLIB/libgvmomi.so.0
  19.  
  20. set -x
  21. cd "$(dirname "$vmrc")" && "$vmrc" -h 192.168.117.33:8333
RAW Paste Data