Tuesday, August 30, 2005

gnomefs

GnomeVFS is a filesystem abstraction used in GNOME desktop environment. In adition to traditional FS operations, it has several extra features (better metadata suport, clever handling of file types, async operations, can operate on any URI, not just files, extensible through modules). Unfortunately, GnomeVFS is used only by GNOME - the rest of the system is unaware of it. This is both confusing for new users (who must distinguish between paths in GNOME and non-GNOME aware programs), and annoying for everyone (imho ;-).

Enter Filesystem in Userspace. This incredibly cool thing allows anyone to write filesystem handler in one afternoon - which is exactly what I did. Combine GnomeVFS and FUSE and you bring previosly GNOME-only features to the whole system! The hack is a just over 200 lines long, and supports read-only operation. It's basically a mapping between GnomeVFS and FUSE API.

Obligatory "screenshot":

senko@rei:~/src/gnomefs$ sudo ./gnomefs sftp://senko@marvin.kset.org/ -o allow_other /mnt/gnomefs
senko@rei:~/src/gnomefs$ cat /mnt/gnomefs/etc/hostname
marvin

The code is just a proof of concept - it's really ugly, unoptimized and probably contains a couple of bugs. Also, currently only one scheme/host pair is mounted - I plan to extend gnomefs to have just one mountpoint, with translation: /scheme/host/path -> scheme://host/path I started doing that and then ran away in terror before the C's string handling ;-)

Grab the the code here and play with it! You'll need FUSE 2.2.1 and GnomeVFS 2.10 (these are versions available for Ubuntu Hoary which I'm running).

Update:With the Internet as vast space as it is, I might've suspected that someone has already figured out this cool idea and has done something about it. Well, at least it was a fun..

2 Comments:

Anonymous Jza said...

What ever happened to the GnomeFS is it the VFS is it fuse. Microsoft announced WinFS and GnomeFS was like a response meta-tagging everything. Then Windows pulled it out and I am not sure if the GnomeFS project was also cancelled.

9:07 PM  
Anonymous twisty previews said...

I was searching blogs,and I found yours.Please,
accept my congratulations for your excellent work!
If you have a moment, please visit my twisty previews site.
Have a good day!

12:15 PM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home