home

Hamachi on OS X

You’ve probably heard of one of the best, easy-to-use VPN software since SSH (with port-forwarding): Hamachi.

And, yes, I know what the beef is with this tool. Yes, it’s easy to use in Windows…but not so much with OS X because of the absence of a decent GUI. HamachiX is not really counted (as of this writing) because it’s slow, unstable, doesn’t really work with Leopard…and it’s fugly.

I’ve shunned the command-line version (of OS X Hamachi) for a while since I have a WinXP running on VMWare Fusion on my Mac, and I can use that awesome Windows Hamachi GUI. I grew tired of it since the VM is already introducing a lag and it became a little bit frustrating to use.

Last night, I played around with the OS X command-line version, and upon setting it up by following the instructions on the README file, i was up and running in a few minutes (it’s really easy even a caveman can do it…AAawwww…sorry).

I decided to write a little hamachi.sh script to make it easier:


#!/bin/bash

clear
hamachi start
hamachi login
hamachi go-online {your vpn here}
hamachi
hamachi get-nicks
hamachi list

save the hamachi.sh file on my home folder and do a “chmod +x hamachi.sh” on the Terminal.

I went a bit further and created an AppleScript so I can run it as a “poor-man’s Hamachi GUI”

The AppleScript goes like this:

—-
set hamachioutput to do shell script “~/hamachi.sh”
display alert hamachioutput as informational giving up after 5
—-

I saved the script as with File Format as Application, leaving “Run Only” checked (”Stay Open” and “Startup Screen” UNchecked). And following how to change default icons here, I changed the Icon to a red little dinosaur downloaded from here.

Voila! every time I double-click on the Hamachi AppleScript, the hamachi.sh script is executed and I get a little dialog box that tells my Hamachi connection status.

hamachi

 

Popularity: 31% [?]

3 Responses to “Hamachi on OS X”

  1. Isa
    April 3rd, 2008 18:00
    1

    This was very informative, thank you. But I ended up going with this solution: http://forums.macrumors.com/showthread.php?p=5203162
    Because I needed to run tuncfg at an administrative level and hamachi on a normal user level, which was do-able via launchd.

  2. dalegaspi
    April 8th, 2008 09:57
    2

    hi, Isa

    yes, i am familiar with that thread…as a matter of fact, that inspired me to write this entry…because i don’t like the idea of loading the programs automatically without a lazy way of seeing what that status is.

    thanks for dropping by.

  3. Jonathan
    August 22nd, 2008 04:05
    3

    I cut and pasted the AppleScript above but I’m getting a null error when I try to run it. I also get a syntax error when trying to compile. The error is:

    Expected “given”, “in”, “of”, expression, “with”,”without”, other parameter name, etc. but found unknown token.

    I’m new to AppleScript so any help would be appreciated.

Leave a Reply

  • Ads