Archive for ◊ 2009 ◊

Ubuntu wifi cannot obtain ip address
Sunday, November 22nd, 2009 | Author:

After I upgraded to Ubuntu 9.04 I could no longer connect to secured wifi networks.
6 months later, I have found a fix! Here’s how I did it…

Open wicd, then
Preferences / Advanced Settings
Change WPA Supplicant Driver from ndiswrapper to wext.

I had to click on “Connect” to the wifi network 3 times before it connected – the first 2 times it connected then immediately disconnected.

Maybe the WPA Supplicant Driver was wrongly set because the upgrade to 9.04 replaced ndiswrapper with a better driver, but didn’t update this setting, but that’s pure speculation. Anyway, it now works!

Category: Ubuntu  | Leave a Comment
Ubuntu 9.10 Firefox 3.5 fonts
Wednesday, November 18th, 2009 | Author:

After upgrading to 9.10, the fonts in Firefox were too big and blurry. I fixed it as follows:

cd /etc/fonts/conf.d
sudo mv 10-hinting-slight.conf 10-hinting-slight.conf.original
sudo ln -s /etc/fonts/conf.available/10-hinting-medium.conf /etc/fonts/conf.d/.
sudo ln -s /etc/fonts/conf.available/10-sub-pixel-rgb.conf /etc/fonts/conf.d/.
sudo dpkg-reconfigure fontconfig

Restart Firefox.

Thanks to Carlo Hamalainen for providing the fix.

Category: Ubuntu  | Tags: , , , ,  | Leave a Comment
Ubuntu 9.10: Disable “shut down after 60 seconds”
Tuesday, November 17th, 2009 | Author:

In 9.04, Ubuntu introduced the ridiculous default of waiting 60 seconds after you clicked on “shut down” before actually doing it. Presumably in case you changed your mind. Yeah, really useful.
Upgrading to 9.10 re-introduced this “feature”, but it’s now even less obvious how to turn it off. Here’s how:

  1. Press Alt-F2
  2. In the Run Application window, type the following then click on Run:
    gconf-editor
  3. In the Configuration Editor window, go to Apps/indicator-session, check the suppress_logout_restart_shutdown checkbox, then close the window.

Nice.

Category: Ubuntu  | Tags: , ,  | Leave a Comment
Ubuntu 9.10 mounts cannot yet be mounted
Tuesday, November 17th, 2009 | Author:

I just upgraded from Ubuntu 9.04 to Ubuntu 9.10.
On day 1, startup worked just fine. But that was because I went to make a cup of tea while it was starting up.
On day 2, I got this message during startup:

One or more of the mounts listed in /etc/fstab cannnot yet be mounted:
/: waiting for /dev/disk/by-uuid-...(lots of letters and numbers here)
/tmp: waiting for (null)
/boot: waiting for /dev/disk/by-uuid-...(lots of letters and numbers here)
/data: waiting for /dev/disk/by-uuid-...(lots of letters and numbers here)
/windows: waiting for /dev/disk/by-uuid-...(lots of letters and numbers here)
Press ESC to go into a recovery shell

It was because I hadn’t made a cup of tea!
Seriously though, It’s not an error message, just a horribly worded message implying that ESC should be pressed, which it shouldn’t. Just by doing nothing and waiting (e.g. by going and making a cup of tea), Ubuntu eventually starts up completely OK.
Please Ubuntu, change this! My friend saw the message and now sees Ubuntu as less credible.

I’ll be posting more on Ubuntu 9.10, mostly whinges and fixes to problems, which is grossly unfair. I’m sure there are loads of great improvements too…

Category: Ubuntu  | Tags: , , , , ,  | Leave a Comment
Breadcrumbs in Drupal
Tuesday, April 28th, 2009 | Author:

To display the current page at the end of the breadcrumb trail, but not as a link:

  • Install the Menu Breadcrumb add-on.
  • In Administer / Site Configuration / Menu breadcrumb, check the option ‘Append page title to breadcrumb’

To NOT display ‘Home’ at the start of the breadcrumb trail:

  • edit themes//config.php
  • change the phptemplate_breadcrumb function to:

  • function phptemplate_breadcrumb($breadcrumb) {
    unset($breadcrumb[0]);
    array_unshift($breadcrumb, array_shift($breadcrumb) );

    return '<div class="breadcrumb">'. implode(' &raquo; ', $breadcrumb) .'</div>';
    }

Category: CMS  | Tags: , ,  | Leave a Comment
BBC iPlayer: live streaming audio on Firefox on Ubuntu
Wednesday, April 22nd, 2009 | Author:

Archive radio programmes were working but live radio wasn’t on Firefox 3.08 on Ubuntu 8.10. I fixed it as follows:

Close Firefox.
Remove the following packages:

  • totem-gstreamer
  • totem-mozilla

Install the following packages

  • mozilla-mplayer
  • totem-xine

Restart Firefox.

Category: Ubuntu  | Tags: , , , , ,  | Leave a Comment

If the Ruby on Rails mongrel server starts up in development mode but not in production mode, it could be because classes are only loaded when required in development mode, but they are all loaded up front in production mode. So if a class is missing, this will show up straight away in production mode.

As an example, I have an older version of rails running on the server (production mode) than on my laptop (development mode).
The older version of rails requires the application controller to be called
    app/controllers/application.rb
whereas the newer version requires it to be called
    app/controllers/application_controller.rb

In production mode on the server, mongrel was looking for application.rb and couldn’t find it, so fell over immediately. In development mode it started, but would have fallen over later.

How to export a mysql database as a sql file
Wednesday, April 22nd, 2009 | Author:

Run the command:
> mysqldump -u username -p databasename > filename.sql

Category: MySQL  | Tags:  | Leave a Comment
How to vertically align checkboxes in CSS
Tuesday, April 14th, 2009 | Author:

Putting this in the CSS makes checkboxes vertically aligned in Firefox.

input[type=checkbox] {
  vertical-align: middle;
  position: relative;
  /* bottom: 1px; */
}

I haven't tested other browsers yet, but presumably only IE6 might be a problem. And even then, it would only be a minor layout issue, so I'll leave it at that.

I got the answer here, where there is more detailed info about cross-browser solutions:
http://stackoverflow.com/questions/306252/how-to-align-checkboxes-and-their-labels-consistently-cross-browsers

Category: CSS  | Tags:  | Leave a Comment
Realplayer on Ubuntu 8.10
Monday, April 13th, 2009 | Author:

To use realplayer for, for example, the BBC iPlayer for radio:

  • Download the deb package
  • Install the deb package
    > sudo dpkg -i realplayer_11.0.0.4028-20080226_i386.deb
    (Use ‘sudo dpkg -i realplayer’ to remove it)
  • Create a link:
    > sudo ln -s /opt/real/Realplayer/realplayer /usr/bin/realplay
Category: Ubuntu  | Tags: ,  | Leave a Comment