Using vnc to connect to a vmware virtual machine

Problem

Could not get the vmware console to work with firefox 4… 🙁

Solution
In the vmx file add:
RemoteDisplay.vnc.enabled = "TRUE"
RemoteDisplay.vnc.port = "5910"

Off course, you could change the port number to whatever port you want to use…

Restart the virtual machine.

Connect to the console: vncviewer 127.0.0.1:5910

Fixed

 

Bonus

A small script the connects and reconnects to a console.

#!/bin/sh
VMX=/local/vm/lamp/lamp.vmx
PORT=`grep RemoteDisplay.vnc.port $VMX | sed 's/\"//g' | awk '{print $NF}'`
while `true`; do
    vncviewer 127.0.0.1:$PORT
    sleep 1
done

This entry was posted in UNIX/Linux and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *