Main menu:

Site search

Categories

Archive

Upgrading to Firefox 3

I’ve been using Firefox 3 for a while now - I’ve used the portable version on Windows, and Firefox 3 is the default browser on Fedora 9 and Ubuntu 8.04. RC2 was released a few days ago so I think it’s time to take the plunge and upgrade.

Foxmarks appears to work fine with the beta versions used by Fedora and Ubuntu, and I’ve been using a FF3-compatible version with Firefox 2 for a while.

There are a few things that have irritated me so far with FF3:

  • Folders on the Bookmarks Toolbar have an arrow next to them:

    Bookmark folder arrows in Firefox 3

    This makes the toolbar much wider than it needs to be, so some of my folders drop off the right hand side. Fortunately, the arrows can easily be turned off.
  • Bookmark separators can’t have names any more. It doesn’t look like this will be fixed in the near future, according to this bug.

Other than that, FF3 seems great. Gmail is noticeably quicker, and I like the AwesomeBar!

Chainloading from one grub to another

If you install two (or more) Linux distributions on one machine, then by default they both install grub to the master boot record (MBR). The second distribution’s grub menu therefore overwrites the first.

For example, on my laptop, I have Windows on /dev/sda2, Fedora 8 on /dev/sda5 and Debian 4.0 (etch) on /dev/sda7. Having installed them in that order, I ended up with Debian’s grub menu, allowing me to boot into Debian or Windows.

It’s tempting to copy all the Fedora grub entries into Debian’s grub menu file to regain access to Fedora, but if the Fedora kernel gets updated, you have to manually update the Debian grub menu file to include the new Fedora entries. Fortunately, there is a better way: have two grub installations, and allow them to chainload each other.

Read more »

Booting the Fedora installer with PXE

Launching the Fedora installer over the network, as well as having a local mirror of the Fedora repository, means you don’t need to burn a CD or DVD. It’s a convenient way of trying out a new distro.

I’ve done this for Fedora 8. I have a local Fedora repository on my Fedora 7 gateway. You need a working DHCP server, which I won’t cover here. To get the network boot working I did this:

  1. install tftp-server. Ensure it’s enabled (chkconfig tftp-server on).
  2. install syslinux. Copy /usr/lib/syslinux/pxelinux.0 into /tftpboot.
  3. create the directory /tftpboot/fedora8 and copy the contents of Fedora/i386/os/images/pxeboot into it.
  4. create the directory /tftpboot/pxelinux.cfg and put this default file in that directory.
  5. add the following options to your dhcpd.conf (change 111.222.333.444 to your server’s IP address):
    next-server 111.222.333.444;
    filename "pxelinux.0";
    

If you boot the client machine, it should automatically boot the Fedora installer.

Building pssh using Cygwin

This is how I build pssh on Windows XP, using Cygwin and prc-tools.

Read more »

Pre-queue content-filter connection overload

Ever since updating my gateway to Fedora 7, I’ve been getting messages like this in my daily Logwatch:

84   *Warning: Pre-queue content-filter connection overload

Worrying that I might be losing mail, I looked at the logwatch script for postfix in /usr/share/logwatch/scripts/services/postfix, and discovered that this message refers to lost connections from clients whose IP addresses are unknown - in other words, entries in the postfix log that look like this:

Aug 24 19:44:17 gateway postfix/smtpd[29089]: lost connection after CONNECT from unknown[unknown]

This happens when postfix doesn’t know the IP address of the client, probably because the client is “disconnecting” before the connection to postfix is properly established.

Slow NFS mount in Ubuntu 6.10 (Edgy Eft)

NFS mounts were taking ages using Ubuntu. The server was OK (I’d used it from other Linux clients without any problems).

I noticed this in the logs:

May 22 20:32:37 penguin kernel: [17181317.116000] portmap: server localhost not responding, timed out
May 22 20:32:37 penguin kernel: [17181317.116000] RPC: failed to contact portmap (errno -5).
May 22 20:33:12 penguin kernel: [17181352.116000] portmap: server localhost not responding, timed out
May 22 20:33:12 penguin kernel: [17181352.116000] RPC: failed to contact portmap (errno -5).
May 22 20:33:47 penguin kernel: [17181387.116000] portmap: server localhost not responding, timed out
May 22 20:33:47 penguin kernel: [17181387.116000] RPC: failed to contact portmap (errno -5).

So the obvious solution…

sudo apt-get install portmap

Now NFS mounts take a fraction of a second.

Making the brightness keys work on a VAIO VGN-FE31H

After installing Windows XP on the VGN-FE31H, the screen brightness keys (Fn-F5 and Fn-F6) no longer work. To make them work again you need to install some of the utilities that ship with the laptop, which are also available in the FE3_Utilities.zip download from the Sony web site.

Read more »

Passing reference data to the success view

When using Spring’s SimpleFormController, the default behaviour is to pass reference data to the form view, but not to the success view. However it’s very easy to override this behaviour, and access the reference data from the success view as well.

To do this, override the 4-argument onSubmit method like this:

protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
    ModelAndView mav = onSubmit(command, errors);
    Map refData = referenceData(request, command, errors);
    mav.getModel().putAll(refData);
    return mav;
}

If you’ve only implemented the 1-argument referenceData method, don’t worry; the default 3-argument referenceData just delegates to the 1-argument method, so your implementation will be called.

If you’re interested, you can see the code for SimpleFormController.

Case insensitive constraint names in MySQL

By default, MySQL takes advantage of case-sensitive filenames on Linux, with lower_case_file_system = OFF and lower_case_table_names = 0 (i.e. the filesystem is case-sensitive, therefore database names are case sensitive; and table names aren’t forced to lower case). In this situation it’s possible to have two different databases whose names differ only in case - for example, Photos and photos - although this should probably be avoided wherever possible!

The FOREIGN KEY Constraints” section of the MySQL manual has this to say about constraint names:

If the CONSTRAINT symbol clause is given, the symbol value must be unique in the database. If the clause is not given, InnoDB creates the name automatically.

This isn’t completely accurate. Internally, InnoDB stores foreign key constraint names as case-insensitive, with the database name prepended. So although onedatabase.b_ibfk_1 is treated as different to anotherdatabase.b_ibfk_1, Photos.b_ibfk_1 and photos.b_ibfk_1 are treated as the same.

So if database names that only differ in case are to be avoided, why might this be a problem? Well, if you want to follow the advice in the MySQL manual, and use lower_case_table_names = 1, you need to change all database names to lower case before using the new setting.

Read more »

Building MySQL from source

After the introduction of the MySQL Enterprise Server, and the subsequent source-only release of Community Server 5.0.33, there was concern that MySQL would no longer provide official binary builds of the free Community Server. Fortunately, these concerns have now been addressed, but we will have to wait longer for binary releases.

In the meantime, you can either find an unofficial build, or build MySQL yourself. I decided to try and build it myself using the free edition of Visual C++.

Read more »