Posts tagged with “”

Give Firefox Fangs

Fangs logo

Fangs is a Firefox extension that presents a web page in a manner similar to how it would be read by a screen reader. I’m not an accessibility guru, nor am I and accessibility geek. I try to hit the high points of accessibility like employing skip navigation, alt tags, meaningful link text, etc. when I build sites, but at the same time I have to confess that I’ve never dug much deeper than that. As far as I can tell, Fangs doesn’t offer much in the way of education, but what I really like is that it provides another way of visualizing the structure of my content. Moreover, it’s a practical visualization since it emulates the way a screen reader will read that content rather than some kind of basic block diagram.

Although, my impression so far is that Fangs doesn’t offer much in the way of accessibility information or evaluation, there are some hints about how to effectively use Fang on the FAQ. Even with limited use so far, I’ve seen enough to know that there’s a place in my development toolbox for this extension.

Set or Change the Greasemonkey Script Editor

In my life, particularly my technical life, there are a number of things that I do regularly, but not frequently. A consequence of the lack of frequency (or maybe of getting older) is the inability to remember exactly what I did to accomplish the task successfully the last time I did it. A consequence of the regularity is that my inability to remember annoys me. I know I’ve done it, I just can’t remember how.

One of those things that I need to do regularly, but infrequently, is edit Greasemonkey scripts for Firefox. All too often, I select Tools > Greasemonkey > Manage User Scripts > [Script I Want to Edit] > Edit only to be seized by that familiar paralysis that is normally reserved for trips to the refrigerator when nothing happens.

I know exactly why nothing happens, I just can’t remember how to fix it. Fortunately, that’s what blogs are for, so here are the steps to set (or update) the default editor for Greasemonkey scripts:

  1. In the Firefox address bar, type about:config and press Enter.
  2. In the Filter input, type greasemonkey.editor.
  3. If the preference exists, just double click on the preference name and, in the popup, enter the file path of the preferred editor.
  4. If the preference does not exist, right click in the preference list and select New > String. When prompted for the preference name, type greasemonkey.editor and press OK. At the next prompt, enter the file path of the preferred editor.

Dropbox, Firefox, Synchronization and Gnome Do

I’ve written about Dropbox, I’ve written about Firefox, I’ve written about synchronizing Firefox through Dropbox. In fact, I’ve written about using Dropbox to sync Firefox twice. I’ve also written about using Gnome Do to launch bookmarks (albeit as an update to a post about using Launchy to do so).

Shortly fter applying a more targeted technique for synchronizing Firefox through Dropbox, I realized that Gnome Do had stopped indexing bookmarks on my Linux machine. After looking around and asking a few questions, I realized that Do had been updated so that it no longer indexed bookmarks.html, but rather included a JSON parser that parsed the Firefox backup files that are created automatically. That required one additional change:

$ cd ~/Dropbox/Application Support/firefox/profile-share
$ cp -r ~/Dropbox/Application Support/firefox/profiles/wg3x0vhj.dropbox/bookmarkbackups/ .
$ cd ~/.mozilla/firefox/erbbyfam.default
$ mv bookmarkbackups bookmarkbackups.orig
$ ln -s ~/Dropbox/Application Support/firefox/profile-share/bookmarkbackups bookmarkbackups

After restarting Do, I was able to launch my Firefox bookmarks without a single click.

Redux: Synchronizing Firefox Through Dropbox

For the most part, the Dropbox-enabled synchronization of Firefox that I wrote about a couple of months ago has been reasonably solid. A few hiccups and a few annoyances, but nothing serious or even significant enough to warrant a change of approach. This morning, though, that changed and I needed to re-evaluate my synchronization strategy.

Yesterday.

Until today, I’ve been running something of a kitchen sink mechanism. You can read the full post for the details, but I was sharing my entire Firefox profile across multiple systems and platforms using Dropbox activity. Bookmarks, extensions, cookies, history and everything else. The transparent and immediate way that Dropbox works made this possible.

Over the last couple of months of using this method across one Mac client, one Linux client and two lesser used Windows clients, I’ve been bothered by several side effects:

  • Sharing profiles is chatty. Really chatty. I noticed this immediately and even mentioned it in my original post, but damn. Sharing an entire profile means a lot of Dropbox activity. Turning off system tray notifications in the preferences helped, but I kid you not when I tell you that the little blue animated icon overlay never stopped spinning. Unless Firefox wasn’t running at all, that thing was spinning like a madman.
  • When I move from machine to machine, I’m not as diligent as I should be about quitting Firefox on the machine I’m leaving. Because of this, I assume, I ended up with a lot conflicted files in my Dropbox-mounted, shared profile directory after a while. This isn’t really a problem, as far as I know, but I hate clutter.
  • Virtually every time I launched Firefox, I got the prompt that tells me my last session quit unexpectedly and asks whether I want to start a new session or restore my last. Because of the difference between how Mac and Windows/Linux order OK/Cancel buttons (even when the buttons don’t actually say OK or Cancel), I’d often find myself hitting the wrong one. Remember, I work in all platforms.

All of these actions by both applications, of course, are absolutely correct. Both Dropbox and Firefox were behaving exactly as expected, but the necessary side effects of the architecture I had concocted were still annoying.

Today.

This morning things got a bit more dire. Firefox simply wouldn’t launch while I was at work on my Linux machine. No matter how I tried – command line, Applications menu, Gnome Do, etc. – Firefox just wouldn’t start. There was no error or indication of an issue, Firefox just, well, did nothing at all. When I launched Firefox into the Profile Manager, though, I was able to select the default profile rather than my Dropbox-ified profile and run Firefox happily.

Knowing that the problem was in my shared profile created a level of severity that I needed to address.

Fixed.

Now that simple annoyance had turned to need, I set about defining a less brutish synchronization mechanism. What I really want synchronized across all of my machines – the profile elements that are most needed and yet the biggest pain to synchronize manually – are my bookmarks, my extensions and my Greasemonkey scripts so I decided to apply a more targeted solution.

Leaving my shared profile directory in place, I created a new Dropbox directory outside of my shared profile directory. To this directory, I copied what I wanted to synchronize from my Dropbox-shared profile. Then, in my default profile – the profile that is local to each machine rather than shared en masse via Dropbox – I created symbolic links to the bits I just copied.

Here’s what it looks like from the shell:


$ mkdir ~/Dropbox/Application Support/firefox/profile-share
$ cd ~/Dropbox/Application Support/firefox/profile-share
$ cp ~/Dropbox/Application Support/firefox/profiles/wg3x0vhj.dropbox/bookmarks.html .
$ cp ~/Dropbox/Application Support/firefox/profiles/wg3x0vhj.dropbox/places.sqlite .
$ cp -r ~/Dropbox/Application Support/firefox/profiles/wg3x0vhj.dropbox/extensions/ .
$ cp -r ~/Dropbox/Application Support/firefox/profiles/wg3x0vhj.dropbox/gm_scripts/ .
$ cd ~/.mozilla/firefox/erbbyfam.default
$ mv bookmarks.html bookmarks.html.orig
$ ln -s ~/Dropbox/Application Support/firefox/profile-share/bookmarks.html bookmarks.html
$ mv places.sqlite places.sqlite.orig
$ ln -s ~/Dropbox/Application Support/firefox/profile-share/places.sqlite places.sqlite
$ mv extensions extensions.orig
$ ln -s ~/Dropbox/Application Support/firefox/profile-share/extensions extensions
$ mv gm_scripts gm_scripts.orig
$ ln -s ~/Dropbox/Application Support/firefox/profile-share/gm_scripts gm_scripts

Details.

Although I thought I knew which files and directories I needed to create my targeted solution, I spent a little time verifying just to be sure. Here are the guts of what I wanted synchronized:

  • In Firefox 3, bookmarks are stored in profile root>/places.sqlite.
  • My application launchers (Quicksilver, Gnome Do & Launchy) key off of profile root>/bookmarks.html, so I needed to synchronize that, too.
  • Extensions are stored in profile root>/extensions/.
  • Greasemonkey scripts are stored in profile root>/gm_scripts/.

The nitty-gritty is pretty readable in the shell syntax above, but here’s the high level:

  1. I created a new directory so I could keep my targeted synchronizations independent of my complete profile synchronization.
  2. From my shared profile, I copied each resource into my new directory.
  3. In my local, default Firefox profile, I renamed its copy of each resource by appending .orig.
  4. In that same local profile, I created a symbolic link for each resource to the shared version in my new directory.
  5. I restarted Firefox and my default profile looked like my old profile in all of the ways that matter to me.

Now.

Hopefully this targeted solution will be much less flaky. Of course, my browsing history, form input history, cookies, etc. won’t be synchronized, but I think I can live without that just fine. The critical path for me, I’m pretty sure, is in the things I use and update frequently: bookmarks, Greasemonkey scripts and extensions.

Epilogue

Once I got home, I logged in and gave Dropbox time to sync up with the Mac. Once sync’d, I edited the Mac’s Firefox default profile and created the same symbolic links I’d created on my Linux machine. After restarting, the default profile loaded up beautifully here too.

I’ll keep an eye over the next few weeks, but hopefully this will be every bit as effective as my kitchen sink solution, but without the annoyances.

Firefox Profile Sharing with Dropbox

Not too long ago, I wrote about keeping Firefox sync’d across multiple machines using Dropbox. Now that I’ve used that system for going on two weeks, I feel like I can report that there’s nothing to report. By and large, things are running quite smoothly (since turning off Dropbox notifications). This morning, though, I did come across a gotcha that was a direct result of this profile sync’ing, so I thought I’d mention it and share the solution. Or at least a solution. There may be others.

This morning I tried to download something and couldn’t. I could click on it, I could even see the .part file appear in my downloads directory (~/Downloads for me), but that was it. Firefox seemed to create the partial download file and then stop. There was no error, no indication of anything afoul, just an aborted – and orphaned – download. My preferences all looked okay, so I rolled up my sleeves and ventured into about:config.

In about:config, I didn’t know what I was looking for so I did the obvious and typed “download” into the filter textbox. The only thing that looked odd in any way was that I had a preference named browser.download.lastDir (this may not be exactly right, after fixing the problem and before returning to write about it, the setting has disappeared) and the path it contained was a Windows path – the path to the downloads path I have set on the Windows box that shares this profile. I reset that value and tried my download again. This time it worked exactly as expected.

My guess is that the presence of backslashes in Windows paths throws the Unix-based Mac a curve ball it doesn’t know how to handle. Perhaps it’s treating the backslash (\) as an escape character in this context, but I don’t know that. I’m going to try turning off the download history retention on all of my machines to determine whether that makes any difference moving forward. I suspect it might. To do that, just open up Firefox’s Preferences, select the Privacy tab and uncheck Remember what I’ve downloaded.

← Earlier Posts Page 1 of 3