Search posterous

Search all posts and users. Type a name, type a favorite song title, whatever! See what comes up.
  

More posterous blogs











More recommended blogs »

Here are posterous posts filed under macfuse...


Mac OS X does a good job of working with a wide variety of disk formats. It can, for example, read and write USB hard drives formatted using FAT32 which is also compatible with all versions of Microsoft Windows. Any FAT32 formatted hard drive is useable right out of the box by either Microsoft Windows or Mac OS X. The problem is that FAT32 is drives using have relatively slow disk access. And, the maximum file size is 4GB. The 4GB maximum file size becomes a problem if you want to, for example, copy a large file like a VMware or VirtualBox virtual machine hard disk file from a Mac to a PC running Windows. Transferring large video files from a Mac to a PC is another common problem. Microsoft's NTFS partition format is fast and does not have a 4GB maximum file size limit. However, while Mac OS X can read NTFS drive partitions, it cannot write to it. I've gotten around this issue by moving files over the network and other means. But, moving files using an external USB drive is a much simpler and faster means... If Mac OS X could writer to NTFS.

Fortunately, there is a simple and free solution for this issue called...

NTFS-3G for Mac OS X

...which coupled with...

MacFUSE 2.0.3.2

...lets your Mac write to an NTFS formatted hard drive as well as read it (OS X can read NTFS partitions natively).

macfuse_ntfs3g.png

You need to install MacFUSE before installing NTFS-3G. MacFUSE provides a base for add-on file handlers like NTFS-3G to extend OS X's ability to deal with additional file systems such as NTFS.


ntfs3g_0.png

Unpacking NTFS-3G reveals both an installation file and an uninstallation utility. The uninstaller can be handy if you later decide that NTFS-3G is not working for you or unnecessary. There's no instruction to reboot the Mac after installing MacFUSE and NTFS-3G. But, the superstitious Windows user in me decided restart my Mac anyway.


ntfs3g_1.png

ntfs3g_2.png

I attached an expendable (in case NTFS-3G/MacFUSE was buggy) external NTFS formatted USB hard drive to my Mac and copied two large, but not gigantic, files: A 589.5MB Xubuntu ISO file and a 2.85GB VirtualBox virtual drive for an Xubuntu Guest OS. After the file copying finished, I detached the USB drive from the Mac and plugged it into a PC running Windows Vista. After copying the virtual drive file over to the PC, I fired up VirtualBox under Vista and brought up the transported Xubuntu Guest OS on the PC (VirtualBox required a bit of tweaking and fussing).

The entire installation and test process was painless. The file transport worked fine (write to NTFS partition from a Mac). And, I'm very happy that I can easily copy large files using an NTFS formatted USB drive that Microsoft Windows can work with.

The NTFS-3G December 22, 2008 blog entry notes a couple of known issues for filenames with international characters and the Startup Disk preference pane (neither affected me). So, be sure to read that blog entry before installing NTFS-3G.

Filed under: macfuse

Brad says...

For the sake of this post let’s just assume that my desire to be write java in a text editor, and not an IDE, is justified.

My text editors of choice are first TextMate and second emacs. I use TextMate when I have the code local and emacs when not. I won’t run VNC or X Windows in order to have a UI to edit remote files. I have no tolerance for latency nor dependency on network connectivity when editing text. This is when I use emacs and most importantly screen so that if my connection dies it will be there when I reconnect.

I took a vacation from java for about a year and was quite the happy developer. As of late I’ve been back in that world. I built up an affection for TextMate and its simple expansion capabilities and wanted to give editing java in it a try. I quickly realized that I had my work cut out for me. On top of that my friends/coworkers think I’m a bit insane which I cannot deny. But I was up for the challenge and have reached a point where I’m happy, not elated but happy. There were multiple pieces of functionality that I missed but I’m only going to focus on one of the big ones here.

One of the basic IDE features is the ability to view the source of your dependencies. By that I mean I the ⌘⇧T Eclipse shortcut that allows you to view the source of a java file of a dependency jar. When writing java in a text editor without code completion this felt required.

Since it’s debut I’ve been intrigued by MacFUSE (and of course FUSE itself). The basic idea is that you can make a file system out of anything without hacking the kernel. I was hoping to see a shift back to the file system enabling users of any editor or command line util to have some of the benefits provided by IDEs. Unfortunately I’ve yet to see this happen in the java world (please let me know if you have examples). A file system seemed like a good solution to my problem plus it gave me a real world reason to play with something new.

As a result I created a file system. The odd thing is that there’s nothing to open source. One of the complexities of java development is some companies have developed their own package management system over the years for one reason or another. At work we have a system that caches packages and source locally. Because I have access to the source I wrote a file system that was essentially a symlink farm to the already expanded source. At this point there’s nothing to abstract and release publicly. If I see the need and find the will I might attempt it. Regardless, as a result I have the ability to grep the source of my dependencies and to browse them in anything that understands a file system.

My file system looks something like the following:

MyProject
|
\-> dependencies
    |
    \->MySourceCarryingDependency
       |
       \-> src
           |
           \-> com.company.package
               |
               \-> AClass.java
               \-> BClass.java

Essentially, this is similar to the tree of dependencies you’ll see in Eclipse for a java project.

The steps I took to create this:

  1. Install MacFUSE.
  2. Install the fusefs ruby extension. (Required only to develop/run a ruby FUSE file system.)
  3. Created an ant task that wrote my project’s classpath to a file. This just generates a file name “.run.classpath” in the project directory.
  4. Wrote a FUSE file system that on startup reads this file, finds the dependencies, and generates the file system.

File system creation via fusefs is simple. If you look at the demo in fusefs you’ll get the idea. You need to implement the following callbacks:

  • contents - array of directory and file names for a path
  • file? - boolean that states if the path is a file
  • directory? - boolean that states if the path is a directory
  • read_file - contents of a file

What’s my point of talking about this without releasing source? Basically, for those of us who prefer text editor s and the file system you don’t have to give up your editor for an IDE, at least for this. Don’t get me wrong, many developers love their IDE and I’m not knocking them (IDEs nor developers). But for those of us who prefer something else we have options and maybe they’re not out of reach.

Filed under: macfuse

@hc5duke says...

macfuse + macfusion + ssh = i can finally back up all the hd video of alex onto choilaptop and free up some space on this machine - maybe i’ll install win7 again?

at 802.11g speed, i can play redered video ok, but i doubt i could play the actual the original 1080p video. i definitely couldn’t over ftp; can’t try right now since I’m backing up said videos (10+ gigs)

my only complaint right now is the timestamps are all reset to 0 - the weirdest part is that it resets to 1904-based zero day (1904-01-01 00:00:00 GMT) instead of Unix zero day (1970-01-01 00:00:00 GMT), going from mac to ubuntu

Filed under: macfuse