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

—-

Open The AppleScript Editor (Applications -> AppleScript -> Script Editor) and then copy-and-paste the script above.

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: 40% [?]

9 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.

  4. Ian Page-Echols
    August 18th, 2009 05:57
    4

    Yeah, same error for me. There’s either some program called hamachioutput that we need to know where to find, or it’s some variable that has to be set in the AppleScript. Either way, a little point would be helpful.

    Thanks, Ian

  5. dalegaspi
    August 18th, 2009 06:24
    5

    Jonathan/Ian:

    I know what has happened: WordPress changed the ” character to the pretty version of the quote character, which is why compiling fails. I fixed it now…try again. my WordPress formatting makes it 3 lines…but it’s just actually 2 lines of code.

    thanks for dropping by.

  6. Martin
    October 18th, 2009 22:31
    6

    Thank you very much!, this is great man!

  7. Martin
    October 18th, 2009 22:41
    7

    I forgot something! I made this icon based on a original Hamachi2 logo. Use it if yo u like it.

    http://cablemodem.fibertel.com.ar/martinnogue/Hamachi_Icon.png

  8. dalegaspi
    October 19th, 2009 05:38
    8

    ^^^ thanks, Martin! it’s just a shame that LogMeIn is STILL not giving Mac users some love. Mac users have been totally left out with the release of Hamachi2.

  9. Brian
    November 26th, 2009 12:10
    9

    This is a great little script. I’ve bookmarked you on Delicious, and we’ll see how it goes.

    I also think it’s a real shame that LogMeIn has just given up on OS X user…especially with their market share going up little by little.

Leave a Reply

Spam Protection by WP-SpamFree

  • Ads

Bad Behavior has blocked 395 access attempts in the last 7 days.