Firefox and virtual desktops
Thursday, November 16th, 2006One thing I like about Konqueror is its ability to recognize virtual desktops (load a link in the current desktop’s Konqueror if it exists, otherwise open a new window on the current desktop). Unfortunately, Firefox doesn’t have this ability natively, so I’ve created a wrapper.
Scenario:
kontact (mail app) on Desktop 1. Surfing for a new car on Desktop 3 . New mail comes in, switch to D1, it has a link, I click. Natively, firefox opens the link in my D3 window, ruining my task-oriented desktops (and making me switch to D3 just to see the opened link). What I would have liked is a new window of firefox to be opened in D1, at which point I can decide to move it to another desktop (extremely quickly with my bound keyboard shortcuts), or if it’s a quick task, do it on D1 and be done with it.
This depends on wmctrl (debian/ubuntu: sudo apt-get install wmctrl).
Put this file somewhere (I chose /usr/local/bin/firefox-wrapper.sh) and tell your WM to have it as the default web browser (for KDE: kcmshell defaultapplication).