notes-computer-firefox

Firefox tips and tweaks

I'm currently transitioning from firefox 2 to firefox 3, so there are some minor inconsistencies in this page.

Tips

Preferences

add-ons

Check out https://addons.mozilla.org/firefox/recommended/ and addons sorted by popularity and addons sorted by rating.

See https://addons.mozilla.org/collections/bayle-shanks/bshanks/ for a list of add-ons that i like.

Other comments about some addons:

Addons that let you post stuff to identi.ca/twitter:

Tab clicking options

extensions i'd like to see but that i can't find

about:config

A list of about:config settings is at http://kb.mozillazine.org/Firefox_:_FAQs_:_About:config_Entries.

keyconfig

gBrowser.mTabContainer.advanceSelectedTab(-1);F21 (joystick)
gBrowser.mTabContainer.advanceSelectedTab(1);F22 (joystick)
BrowserBack?();F19 (keyboard special key, joystick)
BrowserForward?();F20 (keyboard special key, joystick)
BrowserOpenTab?();F24 (joystick)
BrowserCloseTabOrWindow?()F23 (joystick)

bookmarklets

Compiling Firefox 3 on Debian

Here's what I did to compile Firefox 3 on my Debian system. I don't really know what I'm doing here (e.g. not sure if I really needed xulrunner, not sure if a static build was a good idea) but it seemed to work:

aptitude install libxp-dev liborbit2-dev libidl-dev libgnome2-dev libgconf2-dev libgnomevfs2-dev libgnomeui-dev librsvg2-bin libhunspell-dev libnss3-dev

cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk

cd mozilla/

./configure --with-system-jpeg=/usr --with-system-zlib=/usr --disable-composer --disable-elf-dynstr-gc --disable-gtktest --disable-install-strip --disable-installer --disable-ldap --disable-mailnews --disable-profilesharing --disable-strip --disable-strip-libs --disable-tests --disable-mochitest --disable-updater --disable-xprint --enable-application=browser --enable-canvas --enable-default-toolkit=cairo-gtk2 --enable-gnomevfs --enable-optimize --enable-pango --enable-postscript --enable-svg --enable-mathml --enable-xft --enable-xinerama --enable-extensions=default --enable-single-profile --enable-system-myspell --enable-static --disable-shared --disable-libxul

make -f client.mk checkout MOZ_CO_PROJECT=browser,xulrunner

make install

Changing the "Bookmark this page" default to "unsorted bookmarks"

By default, clicking the star places a bookmark in "unsorted bookmarks", while using the "Bookmark this page" menu item places defaults to the "bookmarks menu" folder.

I haven't made an add-on, but here is how to change the "Bookmark this page" default to "unsorted bookmarks" in case anyone is interested. This provides a quick way to tag links without adding them to the bookmarks menu.

In chrome/browser.jar/content/browser/browser.xul (note that .jar files are archives), replace:

<command id="Browser:AddBookmarkAs?" oncommand="PlacesCommandHook?.bookmarkCurrentPage(true, PlacesUtils?.bookmarksMenuFolderId);"/>

with:

<command id="Browser:AddBookmarkAs?" oncommand="PlacesCommandHook?.bookmarkCurrentPage(true, PlacesUtils?.unfiledBookmarkFolderId);"/>

In more detail.

1) cd <firefox-directory>/chrome 2) unzip browser.jar 3) Edit content/browser/browser.xul, making the replacement described above 4) zip -rD0 browser.jar content/browser/ 5) Restart Firefox

Preventing Firefox from stealing focus

A really annoying thing that Firefox sometimes does is hop between virtual desktops/workspaces when it starts up, or when you open a new tab from an external program.

This is because Firefox tells the window manager that it wants to grab focus when these things happen, and some window managers move applications between desktops/workspaces when they grab focus.

There are two ways to deal with this. The best solution is to tell your window manager never to move a window to a new workspace just because it wants focus. In XFCE this is done by creating a file at ~/.config/xfce4/xfwm4/xfwm4rc and putting the line

activate_action=switch

in it (switch means to switch to that application's desktop/workspace when it grabs focus; instead of switch, you could put none, which means to do nothing when an application in another desktop grabs focus).

A quick way to add that line to that file is:

echo activate_action=none >> ~/.config/xfce4/xfwm4/xfwm4rc

Another solution that you could use if your window manager can't be reconfigured is to create a script to be used in place of firefox. On Debian:

cat /dev/tty > /usr/local/bin/iceweasel-open
#!/bin/sh

/usr/bin/iceweasel $@
wmctrl -r Iceweasel -t 0; wmctrl -a Iceweasel
^D
chmod a+x /usr/local/bin/iceweasel-open
ln -sf /usr/local/bin/iceweasel-open /etc/alternatives/x-www-browser 

mutt uses urlviewer, which uses x-www-browser, so this method will prevent mutt at least from bringing firefox to your desktop.

Keep bookmarks below 5000

If you have more than 5000 bookmarks, Firefox Sync can fail or even lose bookmarks. In fact, [1] says that even with a little less than 5000 there can be problems.

To see how many you have, Bookmarks-Show All Bookmarks->Import and Backup->Restore; the menu items in that submenu say how many bookmarks you have.

You may want to occasionally run https://addons.mozilla.org/en-US/firefox/addon/places-maintenance/ because sometimes your bookmarks can get silently corrupted.

Users report that Firefox bookmarks do get silently lost sometimes, so don't rely on them for anything too important (eg [2]).

When i went over 5000 bookmarks and then deleted some, it seems that they didn't get deleted on the server, and so when i installed Firefox onto a new Android, it failed to sync. The solution was to, on the desktop computer, uncheck Options->Sync->Bookmarks; then do a Tools->Sync Now on the desktop computer; apparently this will not only turn off bookmark syncing on the desktop, but also turn it off on every other client upon their next sync; and also delete the bookmarks from the server. Then i went to each Android client and did 'sync now' (Settings->(the account name on top)->Sync Now) and verified that their bookmark syncing had been automatically unchecked in their settings. Then i went back to the desktop computer and checked Options->Sync->Bookmarks and then did Tools->Sync Now. This caused the desktop computer to upload all of its bookmarks again (a fresh, initial sync). Then i went to each mobile client and did a Sync Now.

---

---

Preferences->Advanced->General Under "Accessibility", uncheck "Search for text when I start typing". Under "Browsing", uncheck "Check my spelling as I type".

---

--

compatible with multiprocess: adb, ublock origin betterprivacy disconnect expire history by days lastpass valence pagezipper video dl helper

incompatible with multiprocess: bibsonomy buttons export cookies imageblock pin it button save image in folder resurrect mozilla archive format send tab to device saveall! zotero

---

about:config: toolkit.cosmeticAnimations.enabled: false

---

Preferences->Privacy and Security->Tracking protection->always

---

open a new tab, click the settings wheel, turn off:

(that is, leave on only Search and Top Sites)

and turn on 'use two rows' for Top Sites.

---

about:config: dom.webnotifications.enabled: false

---

Preferences->Privacy and Security->Permissions, go into each of Location, Camera, Microphone, Notifications, and check 'Block new requests asking to access ...'

Consider checking Preferences->Privacy and Security->Prevent accessibility services from accessing your browser

---

---