Sunday, February 8, 2009

MacFUSE

Have you ever gotten frustrated with having to scp things around to your CS account from your Mac?  Wouldn't it be nice if you could just drag and drop?

Have you ever wanted to be able to read and write to your Boot Camp drive?  Maybe you want to give it a custom icon?

Here's the answer: MacFUSE and friends ntfs-3g, MacFusion, and sshfs.

MacFUSE is an implementation of the FUSE userspace filesystem API from Linux, and it allows you to easily build a normal program which implements a filesystem that looks just like a network share or hard drive to the Mac, without having to muck about in kernel land.  The upside for us is that it allows you do things like mounting another computer's files if you can SSH to that computer.

Just install MacFUSE, then either download MacFusion (GUI) or sshfs (command line), and tell it what computer to mount.  If you've got a ssh config file set up, you can just type in the name of your CS machine, and it'll mount.

Here's my command line for mounting on the CS machines:
mkdir /Volumes/sshfs
./sshfs-static-leopard lord-yupa.cs.utexas.edu: /Volumes/sshfs -oauto_cache,volname=sshfs

Now  you can view your CS account's files like they were on your local system!  You can drag and drop or go into command line and do things.  It might be a bit slower than a local filesystem, but still usable.

Be warned, if you try to do things from both ends of the connection (like svn up from the CS machine, and editing a file from the OSX machine) the files may get out of sync.  The auto_cache option helps by clearing the cache of a file if its modified date changes on the far end, so just click on the file in Finder or navigate out and back in to the folder to refresh its contents.

To unmount, just type "umount /Volumes/sshfs" or click the eject button in Finder.

No comments:

Post a Comment