First steps with Firefox and Thunderbird

From LXF Wiki

Table of contents

First steps with Firefox and Thunderbird

The world is starting to realise what a great web browser Firefox is. But, as Andy Channelle discovers, this is a piece of software that can be extended to provide an even richer PC experience

The original version of Firefox was codenamed Pescadero and was released to the public on 23 September 2002. Two years and two name changes later, the project has seen the release of Firefox 1.0 (cutely codenamed Phoenix), a browser regarded as ‘best of breed’ by many organisations. Firefox has many strengths to recommend it, not least the speed of rendering, its cross-platform architecture, and the commitment to providing a stripped browsing experience that concentrates solely on making web surfing a simple pleasure once more. However, this is not enough for some people, and Firefox’s (and the Mozilla suite’s) customisation capabilities have inspired hackers to put together a number of extra tools that can be installed into the software to increase functionality.

XXXX.png (http://www.linuxformat.co.uk/images/wiki/XXXX.png)
Add bookmarks without going through convoluted dialog boxes


Now you may say that there’s no point in having a clean, spartan browser if you’re going to then clutter it up with various add-ons, but that would be missing the point. With this ‘plugin’ approach, a user will never again have to switch off all the tools the developers thought would be cute; instead they can bolt on the ones that will be personally useful. And there are many. Fortunately, the latest version of Firefox sports a decent update facility that can be used to automatically notify the user when an application, extension or theme update is available, so managing the application is less time consuming.

What are the strengths of Firefox? The first, and most obvious refinement is tabbed browsing, whereby links can be opened up in a different tab within the same window. This prevents windows popping up all over the place on your desktop. And while we’re at it, there’s also the great popup blocker which prevents adverts hi-jacking the screen. You can open a new tab by hitting <Ctrl + T> and popup blocking can be configured by going to ‘Edit > Preferences > Web features’ and then selecting the ‘Block Popup Windows’ check box. Some sites need to use popups for legitimate reasons: for these, simply hit the ‘Allowed sites’ button and enter the address. There are other ways a website can affect the actual browser viewing it – hitting the button marked ‘Advanced’ next to the‘Enable Javascript’ option will allow you to prevent many of these Finally, there’s an important section in this dialogue which will have an immediate bearing on this issue’s tutorial.

XXXX.png (http://www.linuxformat.co.uk/images/wiki/XXXX.png)
Look for this icon for some RSS magic.

To counter the prospect that, with the growing popularity of Firefox, marketeers would begin offering their wares - spyware, adware, malware etc - via the Mozilla project’s excellent XPI (Cross-Platform Installer) technology, the browser ships by default with the ‘Allow websites to install software’ option turned off. It would not be wise to turn this on globally, but you can do it for specific sites. Hit the ‘Allowed Sites’ button and then enter the following.

update.mozilla.org

This is the site where ‘official’ Firefox extensions are stored and you’ll want to install from here. It would also be useful to add mozdev.org to the list as well. Extensions can be small, large, or could even constitute a completely new application, but we have grouped them into two different classifications: those that add something to the basic browsing experience, and others that extend the Firefox user interface into other areas of the desktop. Once they are installed, extensions will not normally be available until the application has been closed down (including the download manager if it’s open) and restarted, and then they normally reside in the ‘Tools’ menu.

Build a better bookmark

The value of Firefox’s XPI is that you can probably coax the browser into working the way your want to, rather than the way the Mozilla developers want you to. I have found, for instance, the omission of a button to add a bookmark to a specific folder to be a problem, especially when switching from Konqueror (where this ‘add here’ button exists) to Firefox. The solution is Daniel Lindkvists’ Add Bookmark Here extension (http://gorgias.de/mfe/). This just adds the appropriate entry under the bookmarks menu (and all sub-menus) which saves going through the Internet Explorer-style dialogue box. This is the first extension I add to any Firefox installation.

If you frequently use Firefox on more than one computer, Bookmark Synchronizer (http://cgi29.plala.or.jp~mozzarel/) can sync Firefox’s bookmarks to an XML file on an FTP server. The user simply supplies the correct FTP address and login information and synchronization becomes virtually a one-click process. DeskCut (http://deskcut.mozdev.org/) is an extension that replicates Internet Explorer’s ability to create a shortcut to a website on the desktop. The project, created by Evan Eveland, uses the ‘desktop-entry’ specification, which itself is part of the freedesktop.org initiative, to provide the option for both GNOME and KDE desktops (it works in Windows as well) and in the options has a ‘set DeskCut destination’ option which makes it possible to bookmark files to a central location and then access them from any machine on a network - a handy side-effect.

If you are still keen on the idea of the bookmarks dialogue, but have issues with its design, OpenBook (http://www.chuonthis.com/extensions/) adds a selection of configuration options. At the time of writing OpenBook fails to install with post 0.9 due, apparently, to a small error in the install.rdf file. It is possible to install it with a little work, but an update should be available as you read this. And just when you thought all the magic had flown out of the world, the latest version of Firefox has added an alchemical combination of Rich Site Summary (RSS) and bookmark technology to create Live Bookmarks.

XXXX.png (http://www.linuxformat.co.uk/images/wiki/XXXX.png)
Headlines at a glance in the bookmarks menu

These are simply the contents of a dynamic RSS feed displayed as a bookmark, so instead of having to open up a separate reader or even a new Firefox window it is possible to look under the Live Bookmarks entry and jump straight to a story. To use this, look out for the RSS icon in the bottom-right corner of a browser window. Left-click the icon and select ‘Subscribe to [site name] rss’. This will launch the standard Bookmarks window so you can select the location for the sub-menu. Now when you open that menu the latest stories will be displayed for your pleasure. Select one and be instantly transported to the relevant site!

Of course if you want a regular style RSS reader integrated within the browser, then Sage (http://sage.mozdev.org/) will be of interest. Again this integrates into the bookmark system, but instead of popping up under a menu it works in the sidebar and the main window, and it also works with ATOM feeds. Once Firefox has been shut down and restarted, Sage will appear not in the ‘Tools’ menu where you might expect, but in ‘View > Sidebar > Sage’. Select this and the browser window will split vertically with Sage nested in the sidebar on the left of the screen. If the installation has gone to plan, it should also be possible to add a Sage icon to the toolbar by doing ‘View > Toolbars > Customize’ and drag out the appropriate icon. Click on any feed in the sidebar and the main window will change to display the headlines and a summary of the stories from that feed. You can add a feed by right clicking on a link to the RSS or ATOM feed page and bookmarking it like an ordinary page. The difference is that you save the bookmark into the folder marked Sage feeds, and it will appear in the sidebar.

Get a new look

XXXX.png (http://www.linuxformat.co.uk/images/wiki/XXXX.png)
Sage provides a standard looking RSS reader

Themes are one thing, but it is also possible to change the way Firefox looks on a more fundamental level. Cutemenus, for example, will simply add icons to the elements of Firefox’s user interface that don’t already have one. It’s a small thing, but may be useful for more graphically minded users. The latest version promises better stability and there’s some advice on the web page (http://cute.mozdev.org/) on substituting your own 16 x 16 pixel PNG images for the standard ones and also removing icons from unavailable menu entries, which is a more intuitive way of doing things than just greying entries out. This extension really comes into its own on the context-sensitive menu.

XXXX.png (http://www.linuxformat.co.uk/images/wiki/XXXX.png)
Adding a thesaurus or encyclopaedia to the menu is a doddle.

One of the most famous Firefox extensions which has a subtle dig at the ever-changing name of the application is Firesomething (http://www.cosmicat.com/). It doesn’t really serve much of a purpose beyond being funny (and confusing tech support people who have no idea what Firepanda is), but then neither did Half Man Half Biscuit. Cosmic Cat is also home to the Titlebar Tweaks which allows you to change the position of the Mozilla branding and website address in the title bar or, more useful for brand managers, to insert custom text strings into there. Finally at this site, you will also find the Status Bar Clock that - surprise! - puts a clock into the status bar of the browser window. It can also be configured to include the date in a number of different formats. If you have a better use for Firefox’s status bar (see below), but still want to see the time in the browser frame, TimeKeeper by Omar Khan puts a small time display in the bottom-right corner of every web page you view. It’s not extensive and doesn’t have any options to speak of but it is pervasive and, ultimately, slightly useful. Sometimes it is not how you see the browser, but how other websites see it that counts. And for those moments, Firefox supports changing the user agent string; that is, the information about both operating system and browser software that is passed onto a website by the browser. Theoretically, this is so the site can serve up the most appropriate pages. However, some web designers think it’s the height of good taste to specify IE only on their pages (the insecure fools!), so we need a way to get around it. Firefox’s user agent string thing is buried in a menu, but fortunately Chris Pederick (www.chrispederick.com/work/Firefox/useragentswitcher/) has created a toolbar option which allows this setting to be changed on the fly. So if you visit a site that needs, for instance, Internet Explorer on Windows, it is easy to fool it into thinking that’s exactly what you’re running. It isn’t guaranteed to work however. The real IE includes ‘extensions’ to web standards that are not supported by Firefox.

XXXX.png (http://www.linuxformat.co.uk/images/wiki/XXXX.png)
FoxyTunes is happy on any vacant Firefox toolbar.

My absolute favourite extension is FoxyTunes (http://www.iosart.com/foxytunes/Firefox/) which very simply and effectively adds controls for almost any media player to the status bar at the bottom of Firefox. The latest version adds support for JuK 2.0, amaroK, and Rythmbox (in addition to any Windows media player you’d care to mention) and retains the ability to control XMMS, Noatun and the Beep media player. For such a small application, there’s plenty going on; FoxyTunes can be minimised to a tiny arrow or expanded to include transport controls, volume and track details. It can also be dragged from the status bar into any other available toolbar on the browser.

Change everything

Not every Firefox extension has to be bolted on to the main browser. In fact, the XUL language and the inherent flexibility in the Mozilla codebase means that talented developers can do some pretty amazing things in a small footprint. Take FireFTP for instance, a fully featured FTP client launched from within Firefox that does its work in just 51k of code. While it lacks a site bookmarking facility, FireFTP does support drag-and-drop uploading and downloading, passive connections and remembered passwords. In fact, if you only occasionally use FTP this is ideal, and makes more sense in terms of performance and resources than a fully featured client such as gFTP or Kbear. Weighing in at just over 1MB is the Mozilla Calendar which has been in development for longer than Firefox itself. This extension is accessed, like FireFTP, through the ‘Tools’ menu and works from within any Mozilla based application, so it could be launched just as readily from Mozilla Browser or Thunderbird. Compared to the established calendar applications it is a little light on features, but it can handle iCal data, multiple calendars and standard to-do lists. Where Mozilla Calendar scores over many other applications is in the alarm stakes. Not only can you set it up to ‘ping’ when an appointment becomes due, but it will also send a message to any specified email address, which means that if the user has the application running on a broadban- connected desktop while ‘on the road’ with a laptop or Blackberry-type device, appointments will be sent straight to their inbox. And as with other Mozilla projects, this is cross-platform, so the same data can be made available to dual-booters regardless of which partition they’re using.

In recognition of the idea that people occasionally prefer discreet applications rather than monolithic suites, the Sunbird project has dragged the Mozilla Calendar out of the environment and created a standalone application. It’s still at the early stages of development, but already looks cosmetically better than the Mozilla calendar. Both of these projects can be accessed via the Mozilla website at the main site: www.mozilla.org/projects/calendar/.

XXXX.png (http://www.linuxformat.co.uk/images/wiki/XXXX.png)
Mozilla Calendar features a handy email reminder option.

Finding things

XXXX.png (http://www.linuxformat.co.uk/images/wiki/XXXX.png)
Googlebar for Firefox is as comprehensive as a toolbar could be.

One of the earliest examples of cool XUL programming was the Googlebar project (http://googlebar.mozdev.org/) which attempted to bring the features available to Internet Explorer users via Google’s official toolbar to Mozilla and Firefox users. However, in its long development, Googlebar has become something of a search powerhouse, and has come to be integrated into the browser to such an extent that after a few minutes use, you’ll wonder how you ever got along without it. Once installed, the toolbar sits at the top of the screen. In addition to the search string box (for doing regular searches) there are links to the extra Google services such as Site search, Blogger search, the tech specific searches (BSD, Linux, Mac and Microsoft) as well as the University search. On installation the University Search list will be unpopulated so you will need to select ‘Update list...’ before attempting searches through here. On the far right of the bar there is a drop down list for quick access to the various Google sites, including Gmail.

Moreover, it is possible to highlight a word on a page, right-click to launch the context sensitive menu and then either run a basic search on the word or send it to any one of the locations available in the main toolbar. If you spend any time Googling, this is an essential download, and once the company gets around to building its desktop search tool for Linux and Firefox, it will become an even more vital tool.

One other thing missing from the Googlebar is an option to notify users if mail arrives in their Gmail inboxes (which may be something to do with the potential for these things to violate the service’s terms and conditions). However, if you can’t live without a Gmail notifier, Doron Rosenberg (http://nexgenmedia.net/extensions/) has written one. The real problem with this extension, though, isn’t that it might get you kicked off of the Gmail service, but that it could give access to your mail password to any other extension installed on the system, which makes it an unacceptable risk for most users.

For users of a more literary bent, the excellent DictionarySearch extension provides quick links to definitions at www.dictionary.com. Like Googlebar, this is a very mature product which does its job quickly and smartly. Simply highlight a word whilst browsing, right-click and select ‘Dictionary search for [selected word]’. Surprisingly, for such a small application, there are some options that can be configured, and one which - surprisingly - has been left out: a thesaurus. Go into Tools > Extensions, select ‘Dictionary Search’ and hit the ‘Options’ button. You’ll notice there is space for four entries. In the second section, add the following text.

                            
Text: Thesaurus Search for “$”                                     
Access key: T                                                      
URL: http://thesaurus.reference.com/search?q=$                         

Now when you highlight and right-click a word, there will be another option on the menu for searching a thesaurus. It is also possible (and great) to add support for a Wikipedia search. Add the following entry.

Text: Search Wikipedia for “$”
Access key: W
URL: http://en.wikipedia.org/wiki/Special:Search?search=$&go=Go&sourceid=Mozilla-search

If this dictionary search seems a little long-winded, Kwon Jung Hyuk has come up with an extension called FastDic (xguru.xcool.net:1360/xpi/FastDic/) which allows users to search for any word on a web page by holding down either <Shift>, <Ctrl> or <Alt>. The clever bit is that each key will comb through a different dictionary for a definition. Again, a quick trip to the applet’s options allows quite extensive customisation, including setting your own search sources or using preset sites including Dictionary.com, Google or Wikipedia. I found FastDic to be a little unstable, so would recommend sticking with the standard dictionary search for the moment.

Mailto: issues

XXXX.png (http://www.linuxformat.co.uk/images/wiki/XXXX.png)
I wonder why Firefox can’t be configured to use the environment’s default mail application?

There is a problem with Firefox and its handling of the mailto: protocol. That is, if you click on an email address in a website that has a real email address linked to it, Firefox just doesn’t know what to do with it. Fortunately in distributions where Firefox is the main browser, such as Fedora, this has been sorted out. GNOME users too have it fairly easy, as in the GNOME Control Centre there is an entry for preferred mail application. Setting this to Thunderbird, Evolution or whatever will ensure that the information gets passed on to Firefox. For everyone else, a little light hacking is in order. Well, at the moment. There is an extension for Mozilla called Mozex, which makes adding a mailto: ‘handler’ simply a case of adding a path. Mozex is very useful. It is also not yet been ported to Firefox 1.0. To resolve this you will need to go into /home/username and adjust Konqueror to show hidden files. Within this directory there is a hidden folder called ‘.mozilla’ (the ‘.’ prefix ensures this is hidden during normal use. Inside here there should be able to open ‘Firefox/longnumber.default/prefs.js’. Open this in a text editor. Be careful with this file as it is the Javascript code which defines the various attributes and options of the browser. Take your time, however, to have a good look through because the text we are about to enter follows the pattern set here.

At the bottom of the file, you will need to add the following: user_pref(“network.protocol-handler.app.mailto”, “//opt/kde3/bin/kmail”); Make sure you do this without Firefox running as the file gets rewritten on closure and your entry will just be wiped, whether you have saved it or not. The last part needs to be the full path to your mail application. Save the file, exit and then fire up Firefox. Now when you click on an email link, your client of choice should pop up ready for action with the address already waiting in the ‘To:’ field. Of course, once you have done this you may want to tackle other ‘network.protocol-handlers’ such as FTP, IRC or News. Note that once you’ve set this up and opened then closed Firefox, ‘prefs.js’ gets reordered by the application, so your efforts at coding will be re-integrated into the file.

And finally, LinkPreview (http://patsis.edula.com) by Harry Patsis serves up a thumbnail image of a linked page when the mouse hovers over the link. It uses the Alexa.com thumbnail database to do its work and, in our tests, was able to offer a small preview of 8 out of 10 web sites. Just make sure that if you’re using it that you go in to ‘Edit > Preferences > Web Features’ and ensure the tick box labelled [Load images] ‘for the originating website only’ is not checked. Smart.

If you’ve followed all the suggestions here, you may find that Firefox doesn’t load as swiftly as it once did. That’s why they cut this stuff out of the main application! Live with them for a while, then if you find you’re not using one often enough to justify its inclusion, navigate to ‘Tools > Extensions’ and get rid of it!