Running multiple instances of Chrome on Mac/Linux

Edit 2013/02/24 – This post is seriously out-of-date now. Chrome has built-in multi-profile support that’s much easier to use than these scripts. Use that instead!

Sometimes it’s handy to be able to have multiple browser instances open at once. For instance, Google’s Multiple Login only allows me to have 3 accounts signed in at once, which isn’t enough for me to have all the personal accounts I want to check plus my work account. Even if it could, I like to keep my personal and work search and browsing histories separate, so that it’s easier for me to find something I vaguely remember seeing recently.

When doing web development, it’s often handy to have one browser signed into the site as an admin, another signed in as a regular user, and one not signed in. Chrome’s “Incognito Window” feature can help with one of these, but you can’t have two Incognito windows at the same time (at least, not on Mac/Linux – I hear tell that the Windows version may have supported multiple incognito sessions at some point, but I don’t know if that’s still the case)


I’ve created a little script. I call it chrome and it lives in ~/bin on all my machines. It detects the platform and calls the appropriate binary.

More importantly, it takes one (optional) parameter, which it uses to figure out which profile to run.

I usually start my day by running this script twice: once as chrome work and once as chrome personal. The order is significant, as clicking on urls in other applications will result in them being opened in the first profile that ran. So, while I’m at work I want most things to open in the work profile; if I’m not working I want a different default behaviour.

If you don’t pass a parameter, the script will invoke the default profile – the one that gets used if you don’t specify a profile at all.

I’ve put the script on github for your amusement and pleasure (and hardcore forking action).

Deprecating your phone number made easy

18 months ago, I ended up with an Optus account – I was on a 12 month contract in order to receive an iPhone. For various reasons, I decided not to port the number I’d been using for almost a decade to Optus, but keep it active on another carrier instead. As of a few weeks ago, I’ve now migrated away from Optus, and I want to switch back to my original number. I want to keep the number I’d been using on Optus active for a while, but I don’t want to be answering it – I just want people who use it to be notified about my new number.

This is made easier by the fact that the SIM lives in my Nexus One (given to me by my employer as a Christmas gift last year, but this post, as always, is entirely my own opinion), which runs Android 2.2. Unlike on an iPhone, this means I can have all sorts of applications always running in the background – and those apps can take access the SMS database, respond to incoming SMSes, and sending outbound SMS.

I tried a few apps, but ended up settling on Ultimate SMS. This app allows me to set an auto-response sent in reply to any incoming SMS (‘James does not use this number any more; he can be reached on 0407123456 instead). This app also forwards a copy of the inbound SMS on to my new number – so I usually get it, and respond to it, while the person who messaged me is still reading my auto-reply.

One last special feature from Telstra makes this twice as useful: SMSes sent from their Message2Text service show the original caller’s number as the origin of the SMS. This means that if anyone calls me and leaves a message, they still get an SMS in response notifying them of my new number. Even better, Ultimate SMS includes the original number when it forwards that SMS to me – so even if their call was from a number that can’t receive SMS, I still get their message on the phone I do carry, and I know what number the message came from.

Update: Between drafting this and posting it, my Nexus One went missing. I’m now doing the same thing on my G1 running Android 1.6.

Free voicemail transcription on Telstra Prepaid (and postpaid too!)

In the last few months of being with Optus, I trialled a service they offer which transcribes voicemails to text and sends and SMS. I loved this feature – even when it’s not entirely accurate, the transcription is enough that I can figure out who the message is from, what it’s about, and how urgent it is that I call back. In a lot of cases it’s just someone passing on some information and there’s no need to call back at all.

When I ported my first mobile service to Telstra prepaid, I was delighted to find that I was getting this service for free. I had seen Voice2Text mentioned on Telstra’s site and assumed that this was the service I was getting.

A few weeks later I ported my second service to Telstra prepaid – but on this service, regular voicemail was in effect. I sent Telstra’s Twitter team a message asking how to activate this:

I have voice2text on my first prepaid account (0407123456); I’d like it on my second prepaid phone (0403654321) as well.

Unfortunately the team were only able to tell me that Voice2Text wasn’t active on my first service, and they guessed that ‘It may only be available for Post-Paid accounts‘. They suggested I call the standard support number just in case they were wrong.

All of this was a shock coming from Optus, where the team who run the @Optus account are knowledgeable about their product range and proactive about solving problems – their response would have been to call me and ask for more information to find out what I was actually seeing on my phone; they never wasted my time with guesses about what services might be offered, they would make sure they had all the information to hand before they called me – and they would never tell me that a service I’m receiving doesn’t exist.

(disclaimer: I worked at Optus 3ish years ago, my old team worked some of the backed that the @Optus team use – but as far as I know this had no bearing on the service I received from the team. Please don’t confuse my love of the @Optus team with an endorsement for the company overall – I had terrible coverage issues which they were unable/unwilling to address, which is why I’m now a bitter ex-customer of theirs. It’s a shame that such quality customer service couldn’t be backed by a network that has a semblance of coverage and the ability to make and receive the occasional phone call. But I digress…)

Today, a friend pointed me at a different Telstra service called variously ‘Call Back Notification’ or ‘Message2Text’. This service offers people leaving me a voicemail ‘the option to leave a short 10 second message that is converted to text and sent to you as an SMS‘. Sound familiar? This is identical to Voice2Text – except for the 10-second time limit, and the fact that it’s completely free and available even on prepaid.

To activate this, you need to disable the Messagebank service on your account. The Telstra site says that thai requires a call to their call center; but I can confirm that dialing ##002# turned off MessageBank (and thus turned on Message2Text) for me. I’m not entirely sure how to turn MessageBank back on – but as I don’t intend to use it, I don’t care.

Your iPhone will be happier on Telstra Prepaid

Update: It turns out that the $49 for 2Gb was way too much – my actual usage is less than 700Mb a month.

Instead of the complicated shenanigans below, I now just add $40 of credit once a month, and convert $39 that to 750Mb of data. This means I’m paying just over $480/year, down from $708 on Optus.


I’ve recently switched my iPhone from an Optus post-paid plan to Telstra prepaid. The primary motivation for the switch was coverage – I work only 500m from my home, and Optus coverage in the area ranges from poor to non-existent – but it turns out that Telstra’s pre-paid plans are better value (for my needs) than Optus’ post-paid contracts anyway.

On Optus, I was paying $59/month every month. This gave me 500Mb of data, of which I used around 300Mb/month on average. I was also making around 80 minutes of calls per month and sending around 120 SMS/MMS – I could have used around 4 times as much without exceeding my cap. In short, Optus were giving me lots of unneeded credit to spend on calls/SMS/MMS, but not as much data as I would have liked.

By contrast, I’m now paying $12.50/week to Telstra for a service that has ridiculous amounts of calls and SMS – even more than then the ridiculously high Optus cap, which I never managed to get close to using. Importantly, it also has 4 times as much data as the Optus plan did – and even better, the coverage and network quality is so much better than on Optus that there’s some chance I might use a good chunk of that data!

Telstra’s pre-paid service options are broad though, and it took me a while to figure out exactly what I wanted (even after I had help from workmates who’d made the same transition earlier). Largely this is because adding data onto the account is a separate step from recharging the rest of the account – but also it’s not clear when various things expire. This post is my attempt at making it easier for other people to negotiate the maze of Telstra’s prepaid options.

In order to end up with this, I have to:

  1. Apply a $60 recharge to one of the prepaid plans – specifically, I choose the “Talk & Text+” plan as it’s the closest match to my needs. After applying the recharges, this gives me 300 minutes of calls and 600 SMS to use – as well as $60 credit. This credit can be used once I’d run out of free things – or it can be used for things that aren’t covered by the free calls, such as calling Telstra’s prepaid service number (Yes, that’s right: when I was activating my iPad sim, Telstra charged me $0.25 for the privilege of having them set up another source of income for them – calling Telstra for help from a Telstra service is not a free call)
  2. Yes, I know I said I was paying $50/month and I’ve just started by paying $60 all at once.
  3. So at this point, I have $60 of credit, and I have insane amounts of free calls/sms, but I don’t have any data to use. To get the data, I have to buy a PlusPack – paying for it out of that $60 credit currently in the account. In my case, I choose the $49 pack, which gives 2Gb of data.
  4. At this point, I have: 300 minutes of calls, 600 SMS, 2Gb of data, and an extra $11 credit sitting on my account. All four balances expire in 30 days time. I’ve paid $1 more than I would have paid on Optus

28 days later, those balances are about to expire, so I go through much the same process:

  1. Pay $60 to add $60 credit to the account. This extends the life of the previous $11 so that it expires on the same day as the new $60 – so I have a total of $71, expiring in 30 days.
  2. Because I’ve chose the “Talk and Text+” plan, this adds another 300 minutes and 600 sms to those balances – and as with the main credit balance, the life of the existing credits gets bumped to the new expiry date, 30 days from today.
  3. Convert another $49 of credit into another 2Gb data pack. This does *not* extend the life of the previous data pack. However, the new data pack won’t be touched just yet, as you still have an existing pack active – you need to exhaust the old pack first. If you’re dedicated to getting the best possible value from Telstra you could do your best to suck up the rest of the 2Gb by the time the data pack expires – or you could just let it expire at the end of the day.
  4. At this point, you have 600 minutes (minus whatever you used during the month – so in my case, around 500 minutes) and 1200 SMS (minus whatever you used during the month – again, in my case, that’s about 1100 left), 2Gb of data (plus whatever is left in last month’s data pack – after my first month, that was a tad over a Gb left), and $22 of credit – all expiring 30 days from today.

28 days later, it’s time to renew again – but this time, only a $30 recharge is needed. Added to the existing $22, that’s still $3 more than is needed to top everything up by the usual amounts. This only adds an extra 100 minutes of calls and 200 SMS to the balance – but that’s going to leave me with around 400 minutes of unused talk time and 1100 SMSes at the end of the 28 days

28 days after that, I’ll have spent $150 in 12 weeks (compared with $177 I would have spent on Optus in the same period); I’m left with a large balance of free minutes/SMSes in case my usage ever increases (on the Optus plan, any of the freebies you didn’t use within the month just vanished), and if I try hard I might have used at least half of the data provided. After a full year, I’ll have paid $637 to Telstra, instead of $708 to Optus. If you recharge every 30 days instead, that would be just $600 (and a tidgy bit more for the extra 5 days).

Sheesh. 900+ words to explain the gymnastics I have to go through in order to save $100/year? If it wasn’t for the fact that this also gives me access to a mobile phone network that actually works, it wouldn’t be worth it!

PS: I believe my $59 plan was an older version; I believe the current plans give you 700Mb of data for the same price. Optus never bothered to suggest I move onto the better-value plan – and as far as I know the only way to do that would have been to sign another 12 month contract, which I wouldn’t be willing to do until they can provide coverage around the area where I live/work. Even so, more data (750Mb) can be had for just $39/month on Telstra prepaid – much better value.

openwrt, dnsmasq, linuxigd, and Back To My Mac

Simple task: set up my wrt-54g (running openwrt) with miniupnpdlinuxigd so that “Back To My Mac” works[1].

miniupnpdlinuxigd: trivial. Click a few buttons to enable it, done. I tried miniupnpd first; but althought it initially looked good, I couldn’t get it to work consistently.

However, that’s when I start getting the MobileMe prefpane telling me that BTMM couldn’t start because “Your DNS server isn’t responding”. A little bit of searching on Google finds me pages like this one, which baldly state that “Back to My Mac isn’t compatible with dnsmasq.”

Well, dear internets, I’m here to tell you that you are wrong. BTMM is perfectly compatible with dnsmasq. Sure,openwrt’s default settings don’t work, but that doesn’t make the two incompatible.

It did take me a while to figure out what was going on. The clue also came from Apple’s forums, which told me to do this:

betelgeuse:~ james$ echo "show State:/Network/BackToMyMac" | scutil

<dictionary> { : <dictionary> {

    ExternalAddress :

    StatusMessage : GetZoneData failed:

    AutoTunnelExternalPort : 4500

    StatusCode : -65554

    LLQExternalPort : 5353

    RouterAddress :

    LastNATMapResultCode : 0



The vital clue was the StatusMessage, which tells you exactly which DNS lookup failed. The important thing is that the hostname starts with an underscore.

Take a look at the dnsmasq man page, specifically the filterwin2k option. Once upon a time, SRV records (and records with underscores) really were a sign that you had win2k machines on your network. Once upon a time, “triggering dial-on-demand links” was actually something to be worried about. Those times are long past.

I turned this option off (vi /etc/dnsmasq.conf, add a # at the start of that line to comment the option out, save the file, and run /etc/init.d/S65dnsmasq to restart the service). As expected BTMM now works fine. Well, as fine as you could expect.

[1] I’m ideologically opposed to all things UPnP, and BTMM in particular. What’s the point of having a firewall if you’re going to allow everything inside to poke so many holes in it it may as well not be there? There’s nothing BTMM can give me that a small firewall hole (to allow SSH on a non-standard port) + ssh portforwarding can’t give me in a more controlled way – and without shelling out $$$ to Uncle Steve, too. Nevertheless…

Strong passcodes for your iPhone

Also – how to make it self-destruct in <10 invalid passcode attempts.

Shtep One: Download the iPhone Configuration Utility from Apple

Shtep Two: Futz with the Stuffz


Not shown: there’s an option at the bottom where you can stipulate self-wipe after as little as 5 incorrect passphrase attempts.

Shtep 3: Upload config as per instructions in the “Installing Configuration Profiles” section of the Deployment Guide.


Ways to make me unsubscribe from your feed #1

I’ve noticed a trend where a lot of feeds are including large blocky ads at the bottom of each feed item. I can live with that; a little ugly, but I can skip them easily.

Today I saw something new:


That’s right: two complete posts consisting of nothing more than the same ad.

Scrolling down shows me that the very next item is exactly the same add from “The Fail Blog”, another site operated by the same company.

Ads with content I can stand. Ads without content?  *unsubscribe*

For all your expert travel advice


Dear SQ, redux

Not much time to write. Busy watching great Aussie movie I’d never heard of till you reccomended it, on the crystal clear big wide screen.

All is forgiven.

PS phone is charging off the USB port, a nice touch. Pic related, droid included for scale.

Dear SQ, please don’t force me to listen to my favorite music.

Dear Singapore Airlines,

I love you. Really I do. Out of all two international airlines I’ve flown, your by far the best. I’m only flying cattle class, in your planes cattle can only be a reference to those Japanese cows that live a hand-fed, daily massaged life.

It’s the little things you do so well that make the difference: the hot towel immediately on takeoff, recognising that just getting to the airport can be a hard day. The frequent – it feels like every ten minutes, but is probably more like once an hour – offers of a juice or water. I don’t do booze on flights, but the couple beside me do, and your staff have kept them supplied with beer and Baileys until they stopped whining (the couple, not the staff – as far as I can tell, bringing a constant stream of booze for this couple fulfilled the childhood dreams of the staff, judging by the looks on their faces)

I do apologise – turns out they weren’t sated, just resting – but once again the hostess bringing the booze seem thrilled to be of service. It’s little things like that that make me return every weekend to my favorite local cafe, and will keep me returning to your airline.

You get the big things right too – last time I flew SQ, I had the absolute pleasure of riding in an A380 from SIN to SYD. Being first to fly that plane, something you’re rightfully proud of, is just a small demonstration of your comittment to remaining one of the world’s leading airlines.

Right now I’m treating myself to a runthrough of my Living End albums on my iPod. This is a real treat – their early work remains some of my favourite music of all time, and I don’t get to listen to it often enough.

As nice as this is, it’s not what I had in mind when I boarded your aircraft. You see, you’re famous for your entairnment system, and again, rightly so. The games leave a bit to be desired, but your movie and TV selection is second to none. It’s not just the number of programs – it’s the variety! Hollywood, Bollywood, European and Chinese – you have a vast range of programming from all over the world. The first thing I did on boading the plane was to peruse your entertainment guide and plan my next 8 hours of relaxation.

So why am I listening to my own music? Because your entairnment system has failed me. It’s been off for over half the flight. It was off for over 90 minutes at the start of the flight. Eventually it came up, but minus the Video On Demand. Even so, I managed to watch some of Gomorrah on broadcast channel 13 – but before the movie ended, the system rebooted again.

After a considerable time with no entertainment the system came back. This time I decided to go for something shorter, so I started on some of the TV documentaries. I managed a show about gardens in India, and most of another show, before the system crashed entirely. Still about 2 hours from Singapore, and my only entertainment is provided by the music I provided my self, and writing you this rant.

I’m not going to pretend this means I won’t be back: an SQ flight with no entertainment still beats most carriers. I just want to let you know that flight SQ232 today was almost the perfect flight – it was only your entertainment system that let you down.

I look forward to flying SQ again soon – my next three segments are already booked, the last one once again on your A380, the first mere minutes after I get off this flight – and look forward on particular to being reminded just how good your system can be when it’s working.