I can't seem to connect remotely to a friend's windows machine using vinagre.
My friend is using realvnc free edition as a server and he operates windows 7.
So how can I set it up so that I can remotely access his desktop?
You could try Remmina - http://remmina.sourceforge.net/. It works very well for me and is available in the Ubuntu Software Centre.