TabFS Makes Your Browser A File System

Like Unix, old-fashioned Linux has the philosophy that everything should look like a file. That paradigm works well and most of the operating system’s core features follow that pattern. However, many modern additions don’t really treat things as files or, at least, not files you can easily manipulate with the other tools. [Omar Rizwan] has a handy Chrome extension, though, that will make your browser tabs look like part of your file system. Not only is it a novel idea, but it is also surprisingly handy.

The extension feels like a bit of a proof of concept, so installation is a bit rough, but it does work and it allows you to do things that you would otherwise have to write an extension or a sophisticated program to screen scrape which is always less than desirable.

Once you have a directory with all your tabs, you can use tools like ls, find, and ordinary glob expressions to search through their titles, text, and URLs. There’s also a file-based interface to control each tab. For example, if you wanted to close all the Hackaday tabs (although, really, why would you want to do that?) you could issue either of these shell commands

rm ~/browser/tabs/by-title/*Hackaday*
echo remove | tee -a ~/browser/tabs/by-title/*Hackaday*/control

It wasn’t clear what all you can send to the control file, but the source code has a link to the extension developer’s documentation and it looks like you could use most of those methods (e.g., goBack, reload, etc.).

You can even grab all the images from a page, pull the current title from YouTube Music, and a host of other things. There are folders for each extension, each window, and tabs organized by title, by ID, or you can find the last tab that had the focus. There’s also a way to create a new tab.

By default, the program mounts in a subdirectory of its choice. I changed the code to use a different directory, but if you do this, don’t put ~ in the name since that won’t be expanded as it would be in the shell.

Sure, you could do all of these things in a custom extension, but that’s a pretty big burden for simple tasks. You could probably do some of them with some of the user script extensions like GreaseMonkey. But bringing the power of shell scripting and Linux tools to the browser means you can do some pretty sophisticated processing without much effort.

The extension does take over a lot of your browser, so if you are security conscious, you’ll want to read the source code carefully. Right now to install it, you must compile it yourself, so there’s no doubt that the code you read matches the code your browser will use. We expect there will be an easier install one day and things like the debugging popups will hopefully eventually disappear.

What will you do with your tabs laid out in a directory? Let us know what you come up with. We wondered how this would be for testing, for example. TabFS would probably have made the tab knob an easier project, too.

11 thoughts on “TabFS Makes Your Browser A File System

  1. I’m feeling like it’s gonna be close to how MS had explorer and explorer be the same thing, web page view of files, and you could set it up in dual pane list mode and have almost a norton commander that could view web pages.

  2. This honestly is a great idea that I’m surprised Linux did not consider supporting years ago. What I would really love is if they could add something like including all the html,javascript,etc into sub files within each tabs folder. Then I could do something like grep -r ‘stuff’ and poof I can find every tab that I’m working with that involves stuff.

  3. This is a pretty cool idea, though somewhat seemingly similar to the way MS Explorer’s been handling pages for a long time now. Though that’s not a dig– I think it’s pretty neat and look forward to playing around with it and seeing how it can be useful. The first thing right off the top of my head I can think of, is that it seems like it would be easier to “deal with a page” under Linux than it previously has been. The way windows does it seems like a bit of a hack, having to have two components hanging around in the file system, but it’s worked reasonably well thus far. This new approach seems more refined and in keeping with the “Unix/Linux way”.

  4. Are browser extensions so universal now that they can be pretty much expected to work in all common browsers?

    That’s the first question I have when I see something about a new browser extension. “does this even run on my browser?”

    I didn’t see anything in the summary above to answer it and had to read a good 2/3 of the way through the actual linked page to see that it runs on Firefox and the Chromium family.

    Ok, looking again I could have found that in the table of contents of the linked page but still… I would think that detail is a major enough aspect of the project to almost be part of the title!

    1. Thanks to nearly everyone forking webkit engine it is less of a nightmare but I totally understand your concern. Someone above mentioned Brotab which is what I used for a while. You might want to give it a try too if TabFS gives you issues.

    2. That is my concern as well. This is something similar to what has gone before, the integration of GUI tools into operating systems. Remember that Windows before 95 was just an application. With Windows 95 (and all of the Mac OSs) the GUI became just a part of the OS, making it harder to write applications that ran in multiple OSs. Taking advantage of the user interface tools available in a browser has the similar effect of making programs that work with specific browser extensions dependent on those extensions and therefore the set of browsers that accept those extensions. But then, this is mitigated by the fact that for browsers that work in multiple OSs, you gain access to all of the OSs that a given browser runs in. So it’s kind of a reconvergence of runtime environments in that sense.

Leave a Reply to TerryMatthews Cancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.