Using MacFuse on OS X: Part 3
In this part of my series on MacFuse, I will discuss the installation and use of two very innovative implementations of FUSE filesystems. The first involves mounting your GMail storage on your Mac and the second allows you to edit the Wikipedia in your favorite text editor as if it lived on your computer. In the first part of this series, I discussed the installation and basics of MacFuse. In the second part, we saw SpotlightFS, which is probably the most innovative Mac-only implementation of a FUSE filesystem.
WikipediaFS allows you to virtually mount Wikipedia on your computer so that you can browse different articles or edit them as if they were files on your computer. So, instead of browsing to http://en.wikipedia.org/wiki/Apple and clicking edit, you could simply open /Volumes/WikipediaFS/Apple in your favorite text editor and have the changes appear on the Wikipedia when you save the file. GmailFS allows you to store files in your GMail storage. Similarly, file systems for many online services such as PicasaWeb, Flickr, RSS feeds, and Google docs have been created.
To prepare your system for the GMailFS (and many other popular FUSE file systems), you will need to install the following, in addition to MacFUSE:
- Python 2.4 or higher—This can be installed using MacPorts or Fink.
- Python-FUSE bindings—Also available in MacPorts (install fuse-bindings-python) and Fink (install fuse-py24 or fuse-py25).
- libgmail—Available through MacPorts (install py-libgmail) and Fink (install libgmail-py24 or libgmail-py25).
- gmailFS—Available through Fink and directly from the developer’s web site.
Since all of these components are available through Fink, that would be the easiest way to install GMailFS. If you already use MacPorts and are comfortable with it, you may install everything up to libgmail using MacPorts. After that, you can download the latest version of GMailFS from the developer Richard Jones’ web site.
If you have installed GMailFS using Fink, you can skip these instructions. Once you have downloaded it from the web site, you will have to open it and move the source files from the command line in Terminal.app as follows:
tar –zxvf gmailfs-0.8.0.tar.gz
cd gmailfs-0.8.0/
The number 0.8.0 represents the version of GMailFS, which may change in the future. The following commands may prompt you for your OS X password:
sudo mv gmailfs.py /usr/local/bin/gmailfs.py
sudo mv mount.gmailfs /sbin/mount_gmail
Now you should have a working GMailFS installation, except for one last thing. In the gmailfs-0.8.0 directory, there will be a file called gmailfs.conf. Edit this file in your favorite text editor to change these lines:
[account]
username = gmailusername
password = gmailpassword
Set gmailusername to your actual GMail user name and gmailpassword to your GMail password. Then save this file in the /private/etc directory of your computer. It is time to try moving files to the storage space of your GMail account. In Terminal.app, enter the following commands:
mkdir ~/gmailfs
mount -ovolname=bla -o username=gmailuser -o password=gmailpass -o fsname=zOlRRa -t gmailfs /usr/local/bin/gmailfs.py ~/gmailfs
This will mount your GMail account in your home directory at /Users/yourosxusername/gmailfs. On the command line, ~ stands for your home directory.
Now, if the last command was successful, any files you move to the ~/gmailfs/ directory will be stored in your GMail account. You can access this through Finder, where your GMail space should also appear as a mounted drive, or through the command line.
The files you store on your GMail drive will appear as strange emails in your Inbox. This is normal, but may not be the desired effect. To make sure that these emails do not show up in your Inbox, you can create a Filter in GMail to send every email that matches the search string ‘zOlRRa’ directly to your archived email. The string ‘zOlRRa’ is what is used in the mount command above as your file system name and can be replaced with any other word of your choice.
To install WikipediaFS, you will also need Python 2.4 or higher and the Python-FUSE bindings. As described above, these can be installed using Fink or MacPorts or directly from the source, if you are so inclined.
WikipediaFS is not currently available through Fink or MacPorts, and so needs to be installed manually. The package is available at the developer’s web site along with instructions for its use, though it is a fairly involved process.
Comments