How I use Firefox's remote control
I'm quite familiar with Firefox's weird remote control because I've been exploiting it for years in my peculiar environment (enough years that when I started doing it, I was using Netscape Navigator instead). As you might guess, the overall goal of my environment is to keep the browser running all the time, because back in the days when I started doing this the browser started even more slowly than it does now.
To stay running, Firefox needs to have a window open, so I keep an iconified Firefox window parked off in the corner of my virtual screens. I talk to it with a number of tools, primarily:
- a shell script that reads the current X selection and passes it to Firefox if it's a URL. If there's nothing in the selection, it just opens a new window on my start page.
- a related program that reads the X selection and fires it off to Firefox
as a Google search.
- a TK program that opens up a text box for entering URLs; it also accepts keywords at the start to do Google searches and call up Python module documentation.
I wrote the last program because I got tired of opening up a terminal window just to type the equivalent of 'firefox <URL>' and figured I'd rather do it directly. All of these programs are wired up to menu entries on two of my core window manager menus, to the point where one chorded mouse click on the root opens up a new Firefox window.
I have Firefox (and these programs) set to open everything in new windows instead of using tabs. You could probably do this with tabs, but since which window Firefox will add the new tab to is a bit unpredictable I think you'd want to have only one Firefox window. I'm a 'one window, one purpose' person, so I actively like having lots of separate Firefox windows.
While current Gnome and KDE terminal programs can do this without my Rube Goldberg system, that's only in terminal windows. I've found it really useful to have an environment where any selected URL can be sent to my browser, regardless of what program I'm selecting it in.
(And the ability to make Google queries from any selection is quite handy.)
Comments on this page:Written on 13 April 2008.