teh bigbro blog(tm)
Bigbro's foray into the scary world of blogging

Tue, 01 Jul 2008

Firefox 3 Offline Mode in Ubuntu

Since upgrading to Ubuntu Hardy Heron (8.04) I've noticed that Firefox on my laptop drops into 'Work Offline' mode every time I suspend and resume my laptop or change connectivity type. While offline mode is indeed useful, I'd much rather I had to manually select this mode, rather than have the hassle of having to repeatedly tell Firefox it's online. I use a combination of wired, wireless (802.11b/g/n) and 3G connectivity throughout my average day, so perhaps this affects me more than it would others.

It appears that Firefox 3 on Ubuntu queries Network Manager to see if it's online or offline, and sets its status according to this. A neat feature, but it appears to only indicate an offline state, forgetting to turn it back online again afterwards. The internet suggests that this might be due to a bug though it seems there's some debate as to whether it's a Network Manager bug or a Firefox bug.

In order to fix this, I specifically disallowed Firefox from conversing with Network Manager (over dbus), with the net result that Firefox always chooses it's default mode of being online.
Edit the /etc/dbus-1/system.d/NetworkManager.conf file and replace each instance of
<allow send_interface="org.freedesktop.NetworkManager"/>
with
<deny send_interface="org.freedesktop.NetworkManager"/>

You will have to restart dbus for this to take effect, and I noticed some slight strange effects until I rebooted. Firefox now appears to be firmly convinced it's always online, which was the aim; and probably not far from the truth on my laptop. Note that other applications that query Network Manager in a similar fashion, such as Pidgin will also assume they are online all the time, since they are also denied access to query Network Manager.

Thanks to Nikitas350 for his helpful post detailing this solution.

posted at: 10:39 | path: /technical | permanent link to this entry

Thu, 19 Jun 2008

Firefox 3 Launches in Dublin

After a 24 hour period of downloading, trying to set a world record for the most downloads in the world ever (or at least for a browser release in a 24 hour period) the firefox party in Dublin kicks off. There's badges galore, stickers and branded lanyards a-plenty, and even a respectable assortment of temporary tattoos with a firefox on them.

In mostly unrelated news, Reilly would like to formally proclaim her l33t awsumness!!!!111oneoneeleventy</aol> Reilly would also like to point out that Thom is 'hot' and has a nice ass. I see no donkeys in the proximity of Thom, so must assume that he left his odd-toes ungulate at home.

Congrats to the Firefox team for releasing another fine product, and thanks to the organisers and sponsors for making the Firefox launch a tremendous success.

posted at: 20:20 | path: /technical | permanent link to this entry

Mon, 12 May 2008

Still running blosxom...

In response to some upgrade nonsense re Wordpress earlier I would like to point out that I'm still running blosxom (slightly hacked version, though still with some of the original code... I think... probably...)

I guess the problem with Perl is that it's so easy to make software work the way you want it to :-)
posted at: 16:10 | path: /technical | permanent link to this entry

Thu, 01 May 2008

Ubuntu Hardy Upgrade

I upgraded one of my machines from Ubuntu Gutsy to Ubuntu Hardy Heron (8.04) the latest and greatest from the Shuttleworth camp. The upgrade manager tool reminded me that a newer release was available, and upgrading was literally as simple as clicking the provided button and answering a few questions along the way.

Of the (perhaps) five questions in total asked during the upgrade procedure, two questioned me about upgrading or keeping a configuration file that I had allegedly changed, though I'm pretty sure I never changed it. Diff'ing using the provided options in the upgrade menu allowed me to double check that there were no material changes and that an overwrite was permissible. The other questions were regarding configuration files I definitely had changed. While I couldn't find a way to accept some of the new changes and merge back in my changes, it was a simple job to make a note of the filenames and put my changes back in after the upgrade procedure.

While I've not tested extensively, it looks like everything functions after the upgrade, including wireless networking, X, etc. The one gotcha at the moment is that Firefox is upgraded to a version that is not yet supported by Foxmarks which means I can no longer synch bookmarks to/from that machine. I expect this will be rectified soon enough, and of course the bookmarks that were there previously are still there. The Foxmarks blog suggests that a version for Firefox 3 is in beta test, so I won't have to wait long.

All in all, given the not-so-large sample set of one single laptop analysed, I can say that my experience with Hardy has been good. ftp.heanet.ie has served out over a petabyte of data due to the upgrade being released, so I anticipate that we'll be seeing a lot of Ubuntu Hardy in the wild as of now.
posted at: 08:52 | path: /technical | permanent link to this entry

Tue, 29 Apr 2008

Google Reader

I've been looking for a method of centralising my RSS feeds for quite a while, and have found Thunderbird an excellent reader.

However, I use multiple machines and laptops and Thunderbird provides no method of sync'ing either the list of RSS feeds or which articles I've read between machines. Something like a special folder that can write to a designated IMAP server would do the job excellently, but it appears that Google have beaten the developers to the punch with Google Reader.

Firefox, my web browser of choice supports 'live bookmarks', which keep track of updates to a site, but I've been hearing good things about Google Reader so I thought I'd give it a whirl... I've not regretted it.

By creating a google account, (I phoned a friend of mine who works for Google and he's assured me that they will not at any point be stealing my soul, nor requiring my first-born for any purposes) I can now use Google reader to subscribe to all my RSS feeds. I can access them anywhere provided I have web access, and upon logging in I'm greeted with an up to date list of articles I've not yet read. Even better, I can download the last (up to) 2000 articles using Google Gears and read them even though I'm offline. Connecting to the internet once more and selecting 'online' mode synchronises the list of read/unread articles back to the server. It works perfectly on my eeePC so I'm happy with my new, ultra-mobile, globally accessible, RSS aggregator :-)

On a slightly related note, I use Foxmarks bookmark synchroniser to ensure that I have one, common set of firefox bookmarks on the multiple machines I use.

posted at: 22:15 | path: /technical | permanent link to this entry

Mon, 28 Apr 2008

eeePC with a larger screen

It looks like the larger screened version of the Asus eeePC is now becoming available. The specifications are online, but I've not seen any information on pricing yet, nor technical information on the expected life (predicted number of write cycles) of the new style SSD drives, which appear to use a combination of built in SSD and flash memory.

This definitely looks like a real option for those of us that want to work in the cramped confines of a train or plane. For their next trick, I hope they add in a 3G / GPRS modem and a GPS. Then I really wouldn't need to bring anything else around with me :)

posted at: 14:41 | path: /technical | permanent link to this entry

Fri, 18 Apr 2008

Making iPod video work on an eeePC

Since the eeePC has no CD/DVD drive, and I wanted to watch some DVDs I bought here, a friend helpfully encoded them for me on his MacBook Pro. Unfortunately, he chose the h264 video codec since his settings default to encoding for an iPod type device. This works very well on an iPod, but I got audio only output on the eeePC. Fortunately, mplayer has decent debugging (as does smplayer, which provides a menu to view the logs of mplayer) so I had a good idea about what the problem was. Mplayer on the eeePC does not come with the h264 video codec.

Digging about on some forums led me to the suggestion that I would need to pull an alternate version of mplayer to get the codec. Here, in brief, is exactly what I did, which now enables me to watch h264 encoded video without having to install Ubuntu on the eeePC.

  1. Open a terminal, using Ctrl + Alt + [T]
  2. Su to root, using sudo su - and enter your password.
  3. Add, using vim or your chosen editor, the following line to the end of your /etc/apt/sources.list deb http://http.us.debian.org/debian/ etch main non-free contrib
  4. Save the sources.list file and in the terminal, run aptitude update
  5. Once the update completes, run aptitude install mplayer=1.0~rc1-12etch2, which should install the Debian version of mplayer, which includes h264 support.
  6. You should now remove, or comment out the deb http://http.us.debian.org/debian/ etch main non-free contrib line from your sources.list file, to ensure that no other updates are accidentally pulled from the Debian repository. Many may not work on the Xandros distribution on your eeePC, and may cause it to break in unspeakable ways. You have been warned!
  7. h264 should now work for you - though I highly recommend running /usr/share/mplayer/scripts/binary_codecs.sh install which will install another ~10MB of various useful codecs for mplayer.
  8. Exit your root terminal session - root is not a plaything and you should not be using it for your normal day-to-day activities :)
Note: I have tested this on an 8GB eeePC, running the original Xandros distro that it came with, but this information is provided as is and at your own risk. While this works fine on my machine, there is no guarantee that this is or will be the case with any other current or future model of eeePC. You may find it difficult / impossible to get support for your eeePC software if you upgrade in this way, so do so at your own risk - and take a backup of all your important data beforehand.
posted at: 15:23 | path: /technical | permanent link to this entry

Wed, 26 Mar 2008

Definition of futility

Thanks to Niall O'Broin for providing me with a laugh. When it was suggested he ask his ISP for a statically assigned IP address, his response was the very telling:

"My ISP is $ISP - I might as well ask my cat. And I don't even have a cat."

posted at: 16:30 | path: /technical | permanent link to this entry

Sun, 16 Mar 2008

Problem with Suspend to Disk on Linux

I use Ubuntu as my prefered OS on my desktop and laptop (I currently don't have any Apple kit) but since I got my Dell D430, I've been having a strange problem whereby the laptop would go to sleep (standby) as configured, but if left for some (long?) period of time, upon being woken up it would almost immediately suspend to disk. While this worked almost perfectly, it was most annoying to have to wait for the laptop to recover from standby, go into suspend to disk, and then come back out of suspend to disk (writing and reading ~2GB of RAM to disk in the process) before it was usable. I'm an impatient person and when I open my laptop to do work, I want it ready to do work as fast as possible.

While I've not isolated why the laptop started doing this yet, I've managed to work around the problem by configuring the /etc/default/acpi-support to only allow standby, and not allow suspend to disk. The big con of this solution is that I can no longer suspend to disk, though my laptop is rarely out of use for long enough for this to be a problem. The biggest problem I expect to see is that I can't change battery without having external power, or rebooting - something I could previously do by suspending to disk.

My acpi-support looks as follows, in case someone else is seeing the same problem:

ACPI_SLEEP=true

# Following line commented out to disable suspend to disk...
# ACPI_HIBERNATE=true

ACPI_SLEEP_MODE=mem

# Added usbserial to try and make the 3G modem work reliably between standby/restart cycles...
MODULES="usbserial"

# Added mysql to the services to stop and start between standby/restart cycles...
STOP_SERVICES="mysql"

# All other options are left at the default values for Ubuntu.
# Example taken from Ubuntu 7.10 (Gutsy) and running on a Dell D430 laptop.

Hopefully this will help someone else seeing the same problems I am. I've not managed to find anyone else seeing the same behaviour, so if you've come across it - and particularly if you have a better solution than the one detailed above - please drop me a mail at blog-at-signal2noise.ie.
posted at: 17:33 | path: /technical | permanent link to this entry

Sun, 10 Feb 2008

eeePC

Glen brought both an OLPC (One Laptop Per Child) laptop and an eeePC to the ILUG (Irish Linux User Group) PotD (Pint of the Day) last night. I really like the eeePC and will be taking a look at the old bank balance to see if I can afford one. Even though the keyboard is small, it's still possible to type at a reasonable rate, and the three issues that I have interest in are being worked on: a larger screen (without increasing the form factor size of the overall unit), longer battery life, and a larger internal capacity (the 8GB model is supposedly due out in March some time.)

All in all, a good time was had by everyone at The Long Stone, and I've no doubt the next PotD (Pint of the Day) will be announced shortly.

posted at: 15:38 | path: /technical | permanent link to this entry

Wed, 06 Feb 2008

Subversion Comparisons

I've recently started moving years worth of material from CVS version control to Subversion (svn). I very much like the idea that I can set up and share a repository securely over SSH, using svn+ssh:// type URLs. I also really like the idea that it keeps track of local changesets - ideal for someone like myself who tends to work on a laptop on trains and buses, away from useful internet connectivity. Until recently though, I hadn't stumbled upon two commands that are incredibly useful to me, for comparing a local checkout against what's last been committed on the server.

svn status [filename]
This gives the status of a local checked out file, as against when it was originally checked out to that local machine. No connection to the SVN server required.

svn status -u [filename]
This compares the status of a local checked out file, as against the currently committed version in the repository. svn status -uv gives more information on committed revision numbers. This requires a connection to the SVN server.

svn diff [filename]
This compares the local files against the revision at which they were locally checked out. No connection to the SVN server is required. While this is useful while working locally, I often want to diff files against the latest version in the respository - particularly when I know someone else might be editing and committing the same file ... or more likely it's me editing and committing the same file from a different computer.

svn diff -r COMMITTED [filename]
svn diff -r HEAD [filename]
This compares the local files against the last committed version / the head node in the respository. It requires a connection to the SVN server.


posted at: 10:12 | path: /technical | permanent link to this entry

Thu, 31 Jan 2008

Windows TXT files in WordPad...

...appear to add in a load of extra cruft, which Blosxom merrily renders into HTML. Sorry! :( I should know by now that WYSIWYG is a fallacy.
posted at: 11:02 | path: /technical | permanent link to this entry

Mon, 28 Jan 2008

New Toy

I've splashed out on a siny new laptop, and after much deliberation, went with a Dell D430 ultraportable. The screen is 12.1" but boasts an impressive 1280x800 resolution, and it appears to support Linux (Ubuntu) reasonably well. Sound, video, trackpad, 802.11g wireless and bluetooth all appear to work without problems, though strangely enough, the 'Wifi' LED on the front panel doesn't light under Linux to tell me it's enabled.

The only issue I've hit thus far has been the 3G/HSDPA modem installed, which appears to be a 'Novotel' rather than the well supported Hauwei E220. Hopefully I'll have some time to poke at this in the coming weeks and see if I can make it work. Updates (if any) will be posted here.
posted at: 00:27 | path: /technical | permanent link to this entry

Mon, 26 Nov 2007

ILUG Talk : Free Maps! : The video of the talk

Steve Coast spoke about the Open Streetmap project in the HEAnet offices last week. Thanks to the efforts of Kevin Dermody the video of the event is now available.


Videos of previous ILUG talks are also available - many thanks to Kev and Justin for their camera and post-processing work.

posted at: 12:42 | path: /technical | permanent link to this entry

Fri, 23 Nov 2007

Mirroring open Streetmap

HEAnet are now mirroring the Open Streetmap data set.
So, if you're in Ireland you might want to consider grabbing your copy of the data from here.

Thanks to Christian and BrianMc for making this happen.
posted at: 16:10 | path: /technical | permanent link to this entry

Free Maps! : Steve Coast presents Open Streetmap

The board room in HEAnet was more packed than it's ever been for an ILUG talk. Chairs were commandeered from the office at large to accomodate the crowd of people gathered to hear Steve Coast talk about a his Open Streetmap project.

Details of how the project started (by noticing that GPS traces of couriers around London could be used to derive a crude map) and where it's going to (getting close to complete coverage of the UK by the end of 2009, possibly sooner) were all detailed and beautifully illustrated with the aid of snapshots from the map. To demonstrate how easy it was to contribute to this map, Steve added a local pub with just a few clicks of the mouse.

Huge thanks to Steve for giving the presentation, and indeed to everyone who made the effort to come and listen to him. There was a video recording made, which will be made available in the very near future. Thanks also to HEAnet for generously hosting the event and to Kev Dermody for his unfailing camera and recording skills.

Finally, please remember the Dublin OSM Mapping Party tomorrow and Sunday starting from the ICS in Dublin, from 11:00am until late.
posted at: 16:06 | path: /technical | permanent link to this entry

Fri, 09 Nov 2007

galway LUG Installfest

Galway LUG is organising a multi-distro installfest from 1000-1200 on Saturday 17th of November, in the DERI building (opposite the Westwood Hotel), Newcastle Road, Galway. We will have people available to help with Ubuntu, Debian, Mandriva and RedHat (minimum). There will be demo systems with various software preinstalled, and with luck, plenty of install CD/DVDs.

Tell your friends!

With thanks to Andrew Gallagher for bringing the event to my attention.
posted at: 11:16 | path: /technical | permanent link to this entry

Thu, 08 Nov 2007

Mail over IPv6

Due to an ACL preventing me from using one of my mail servers (port 25 outbound blocked except to internal mail relays... thanks Windows viruses!) I decided to test delivery of mail over IPv6. It worked. Yay! I now have IPv6 mail relaying capability and from a few brief tests, it appears that many network that block port 25 for IPv4 do not have an equivalent block for IPv6.

If anyone notices any strangeness from mail.signal2noise.co.uk due to the addition of an AAAA record, do please let me know.
posted at: 19:03 | path: /technical | permanent link to this entry

Wed, 07 Nov 2007

Setting up TLS and SMTP Auth with Postfix and CACert

For those of us who roam around the internet, getting a connection here, there and everywhere, trying to find mailservers that are willing to relay outgoing mail for us can be a challenge. While DHCP will give us an IP address, nameservers and a default gateway, there's no traditional model I'm aware of for provising mail relays. Of course, there's a solution to this problem - use your own mail server.

Using your own mail server means that you must configure it to relay mail from lots of possible IP addresses - but only if it's you that's trying to relay. I won't go into the details as to why it's a bad idea to have an open mail relay facing the internet - I'm going to assume you know. Fortunately, it's actually not that difficult to authenticate with your mail server at SMTP time (when you're sending a mail) and ensure that only you, or your valid users, get to use the server.

Step #1: Configure TLS
For this you'll need a server certificate. I've chosen to use CACert as my root signer. You can do the same by signing up for a free account with them - something I'd actively encourage you to do.

  1. I'm assuming Debian Etch but these instructions should work with little or no change across a wide variety of systems.
  2. On Debian, download the Class 1 CACert root certificate in PEM format and place it in /etc/ssl/certs/CACert-class1-root.pem.
  3. Run /usr/lib/ssl/misc/CA.pl -newreq-nodes to generate a certificate request for your server. Answer the questions asked, making sure to insert the server's DNS name as the Common Name (eg, YOUR name) section. In my case, it's for one of my mail servers, so I put
    Common Name (eg, YOUR name) []:mail.signal2noise.co.uk.
  4. You should now have two files, one called newkey.pem (this is your private key. Keep it a secret.) and the other called newreq.pem. (This is the certificate request you need to send to CACert.) I always rename the newkey.pem file to servername-privatekey.pem.
  5. Log into CACert and select the menu item on the right for Server Certificates. Select New to create a new server certificate.
  6. Make sure the option to Sign by class 1 root certificate is selected and paste the contents of the newreq.pem file into the text area titled "Paste your CSR below..."
  7. Click the Submit button and after a short pause, it will display the generated public key for your server. This is essentially the certificate request 'signed' by the CACert root cert, which means that anyone who trusts the CACert root cert will now trust your server cert as well. Paste this output into a file called servername-publickey.pem
  8. Finally, for convenience, let's put the public and private keys together, so that in future we only have one file with everything the server needs.
    cat servername-privatekey.pem servername-publickey.pem > servername-keys.pem
  9. Put the servername-keys.pem file in the /etc/ssl/certs/ directory along with the CACert-class1-root.pem cert from above. We now have all the keys we need. If you have other users on your system, make sure that the servername-key.pem file is not world readable. chmod 0640 servername-key.pem should do the job nicely.
  10. Now we have to configure postfix to use the key files and activate TLS. Insert the following in your /etc/postfix/main.cf file:
    ## TLS
    smtp_use_tls = yes
    smtpd_use_tls = yes
    ## Only show AUTH options if TLS is being used.
    smtpd_tls_auth_only = yes
    ## Log the hostname of a remote SMTP server that offers STARTTLS
    smtp_tls_note_starttls_offer = yes
    ## Location of PEM files
    smtpd_tls_key_file = /etc/ssl/certs/servername-key.pem
    smtpd_tls_cert_file = /etc/ssl/certs/servername-key.pem
    smtpd_tls_CAfile = /etc/ssl/certs/CACert-class1-root.pem
    smtpd_tls_CApath = /etc/ssl/certs
    ## Increase this for more verbose logging
    smtpd_tls_loglevel = 1
    ## Add a TLS header
    smtpd_tls_received_header = yes

    tls_random_source = dev:/dev/urandom
  11. Reload postfix so that it parses the updated config file - and you should find that TLS is now enabled on your mailserver. You can verify this by telnetting to port 25 in the usual fashion, and upon greeting it with EHLO your.server.name it should now respond with 250-STARTTLS as one of the options.


Step #2: Configure SASL Authentication
Now you have TLS configured, you'll have end-to-end encryption of traffic over the wire. This means that any communications you have with the mailserver are securely hidden from view of anyone who might be looking at packets on the network. Not only does this mean they cannot see the text of mails sent (for this hop only! The next hop towards it's destination may well be unencrypted!) but they cannot see any usernames or passwords sent over the wire. This paves the way for providing a method of authenticating users who want to send mail using your server as a relay.
  1. Install the SASL2 modules for auth:
    apt-get install libsasl sasl2-bin libsasl2-modules
  2. The sasl2-bin package will install a file called /etc/default/saslauthd. You will need to edit this file to configure saslauthd to start automatically at boot time.
    START=yes
    MECHANISMS="pam"
    OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"
    Other options can be left at their defaults. The OPTIONS stanza configures the runtime files appear in a location accessible by postfix, running in a chroot jail. Without this, postfix will be unable to communicate with saslauthd.
  3. Create the directory specified in the configuration above and chown it to be owned by postfix:sasl
    mkdir -p /var/spool/postfix/var/run/saslauthd
    chown -R postfix:sasl /var/spool/postfix/var/run/saslauthd
  4. I also move the sasldb2 file so that it's accessible by postfix, and configure sasl to be added to the postfix group:
    adduser postfix sasl
    mv /etc/sasldb2 /var/spool/postfix/etc/
    ln -s /var/spool/postfix/etc/sasldb2 /etc/sasldb2
    chown postfix:sasl /var/spool/postfix/etc/sasldb2
  5. Configure postfix to use SASL to check password authentication. You'll need to create a file called /etc/postfix/sasl/smtpd.conf with the following contents:
    pwcheck_method: saslauthd
  6. Add the configuration to the postfix main.cf file to allow postfix to use SASL Auth for sending mail:
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_local_domain =
    broken_sasl_auth_clients = yes
  7. Make sure that the SASL Auth daemon is started:
    /etc/init.d/saslauthd start
  8. Restart postfix to ensure that all settings are taken up. This isn't strictly necessary, but it's always a good idea when changes to config files are involved:
    /etc/init.d/postfix restart

You should now find that you're able to send e-mail by configuring Thunderbird or your e-mail client of choice to send mail via your mail server, port 25, using TLS and Auth. You should be asked for a login username and password when you attempt to send mail. These must match your UNIX username and login on the mail server for the configuration detailed to work.

Next tech article will be an explanation of how to bypass this problem entirely by using an IPv6 tunnel from SixXS.
posted at: 01:54 | path: /technical | permanent link to this entry

Sat, 03 Nov 2007

Mike Culver

Last night, I had the pleasure of meeting with Mike Culver, of amazon.com who gave a tremendous presentation about their Amazon Web Services offerings, including the Elastic Compute (EC2 / EC3) technology. Compared to the 180 people Mike spoke with a couple of evening ago, the ten or so dedicated people who turned up to hear him at the Irish Computer Society offices in Dublin was a small crowd - but a more intimate discussion ensued as a result. Since a few people already had experience with EC3/S3, we bucked the trend and started asking questions of Mike before he even had a chance to start his talk.

For me, the most interesting services offered were the Elastic Computation service (EC3) and the storage service (S3.) The EC3 and S3 business model is what differentiates it from the more traditional model of having to burn cash up front to allow for reserve capacity for growth. With the S3 and EC3 systems, you can call down more storage and spin up another virtual server instance on demand - and you only pay for what you use! Of course, since all the machines are Xen instances, and are created by Amazon's back end on demand, you can scale back down as efficiently and cost effectively as you scale up. Currently, if you have one instance running all the time for a whole month, it costs about $72, plus bandwidth charges. If you only use it for an hour, you get charged ~10c.

Unfortunately, due to having to catch a 3am flight the next morning, this talk did not culminate in the traditional ILUG jaunt to the local pub. We'll have to invite Mike over again some time so he can experience the more esoteric post-talk question and answer session, where the questions often become more and more interesting, although less and less relevant, as the evening proceeds.

Huge thanks to Mike for speaking, to Niall O'Broin and Paul O'Malley for organising the event, and to the ICS for generously provising a venue.

Finally, don't forget the ILUG AGM 2007 tomorrow (well, later today by now...) Sat 3rd Nov, 2007, 3pm in the ICS building.
posted at: 00:37 | path: /technical | permanent link to this entry


copyright © 2005-2008, Gareth Eason