TextMate + SSHFS (via FUSE)

January 14th, 2007

Some of you may have noticed that Amit Singh (from Google) recently released a 20% time project he’s been working on, called MacFuse. Well, what does that mean for those of us managing remote projects with a Mac?

We can treat remote file systems as local ones (via SSH), instead of using something like Transmit!

All it takes is a few simple steps:

  • Download the binary package (or compile from source if you wish). I used the file fuse-binaries-0.1.0b006.tar.bz2.
  • Unpack the file:
$ sudo tar -C / -jxvpf fuse-binaries-0.1.0b006.tar.bz2
  • Reboot
  • Ensure that /usr/local/bin is part of your $PATH:
$ export PATH=/usr/local/bin:$PATH
  • Make a directory for SSHFS to mount to:
$ mkdir /Volumes/sshfs
  • Mount your remote filesystem:
$ sshfs nathandv@atnan.com:/home/nathandv /Volumes/sshfs -oping_diskarb,volname=Atnan.com

And then….TADA:

This should make things a hell of a lot easier for remote development on the Mac!

6 Responses to “TextMate + SSHFS (via FUSE)”

  1. John Beeler Says:

    This is great. Thanks.

    Could you explan for a noob such as myself how to mount this automatically upon startup? I would love you even more.

  2. Nathan de Vries Says:

    Doing this automatically on startup would be fairly trivial. All you need to do is throw a script into /Library/StartupItems and you’re away! All the script would do is run the command I’ve shown above.

  3. Kevin Dangoor Says:

    Have you noticed any problem with TextMate setting the file timestamps to 0 (December 31, 1969)? It seems that when I save in TM, the timestamp is reset. I can just touch the file and the timestamp is updated fine.

    sshfs solves a big headache for me, once I get the timestamp problem worked out. Have you seen that problem?

  4. Nathan de Vries Says:

    Seems to work fine for me Kevin.

    I’m not really sure how to solve that problem other than logging a bug on the MacFUSE bug tracker and seeing if the developers can help you.

  5. Adam Says:

    There’s still a delay when TM gets focus—just like when I was mounting the share over SMB. It might be a bit shorter, but it’s still there.

    Is there any way to further minimize or eliminate this delay? ... short of using something such as the commercial Interarchy and “sync”ing the share all the time?

  6. Nathan de Vries Says:

    AFAIK, there’s not much you can do. Caching is on by default…although there’s a chance that extending the default 20 second cache time would improve things (using the -ocache_timeout=N argument).

    I’m going to try another SSHFS implementation soon (which uses URDFS instead of FUSE), and I’ll let you know if the performance is superior.

Leave a Reply