The Good Life... a weblog about life, technology, and the Opera Web browser

All Posts

Summer Movies 2009

It is once again time to present my Summer movie picks. Iron Man, Wall-E, and The Dark Knight ended up being my favorite Summer 2008 movies. This year, I'm rooting for Up, Transformers: Revenge of the Fallen, Harry Potter and the Half Blood Prince, and Post Grad. Note that I've expanded my definition of Summer in include some April and September movies.

See in the Theater:

Wait for the DVD:

Not much is thrilling me this year, but there's a lot of stuff that looks interesting at least.

Our First Week in California

It's been just about a week since we arrived in California. We're temporarily staying in a very lovely one bedroom apartment a few blocks away from Apple's campus in Cupertino while we look for our own place. Since I was in town, I decided to work in Opera's Mountain View office on Monday. About halfway through the morning, a couple of the folks in the office said, "Do you feel that? it's an earthquake" and the floor vibrated for a couple of seconds. 'Twas my first earthquake, a magnitude 4.3 quake centered a bit east of San Jose. During the quake, I just sat there a bit too stunned to react. Other folks in the office kept doing what they were doing, unperturbed by the tremor. Immediately afterward, I called Rebekah expecting her to be a bit flustered, but instead she said, "what earthquake?" Opera's office is on the third floor of a small office building, which may have contributed to my ability to feel it. I probably wouldn't have known it was an earthquake unless someone else mentioned it. It kind of felt like someone was walking by my desk causing the floor to bounce a bit. It really was no big deal.

On Tuesday, all the folks in the Mountain View office went to the CTIA Wireless trade show in Las Vegas, so I fittingly spent my last day working from home. I ended up having a lot more to do than I thought I would, so I worked for around thirteen hours before signing off the Opera Software VPN for the last time. There were a lot of things I still wanted to do, but I'll have to leave those things up to someone else. Unfortunately, at the time I left, there was no one taking over my responsibilities.

Wednesday was spent doing errands and getting acquainted with a local park. On Thursday, we decided to explore a bit. Sara Ellen had a hankering to go to the beach and play in the sand, so we piled in the car and headed to a beach in Santa Cruz. I neglected to bring a windbreaker to block the wind coming in off the Pacific, so I shivered as Sara Ellen dug in the sand. That lasted for about thirty minutes. We peeled Sara Ellen off the beach and drove north along the coastal highway from Santa Cruz toward Half Moon Bay.

As we drove north, I was surprised both by the beauty of the area around us and the amount of coastal farming. We pulled off the road a couple of times just to enjoy the view. At Pescadero, we headed east to make our way back to Cupertino. As we rounded a bend, I caught a glimpse of a peculiar-looking group of trees next to some small homes. As I looked around, I was greeted by the largest trees I had ever seen: we were in the middle of a stand of redwoods! The forest around us was the kind of forest I've always dreamed of: tall trees with high branches and small fern undergrowth. It was my ideal type of forest and absolutely beautiful.

On Friday, we were able to pick up some of our stuff (most importantly my Wii and Apple Airport Extreme wireless router) from the storage facility where the rest of our stuff will be until we find our own place. Afterward, we visited a couple of apartments we found on Craigslist, but nothing really appealed to us. Saturday was spent enjoying Super Mario Galaxy and Starcraft (a wonderful gift from Allan). Both games are relatively old, but were received just before our move. After a lull, I'm getting back into gaming a bit. Since my last trip to Norway, I purchased Defense Grid: The Awakening (which wouldn't run on my PC and shows no text whatsoever in Parallels) and now Super Mario Galaxy and Starcraft. I've always been curious about Starcraft and enjoyed watching others play it, but had never tried it myself. So far, it's meeting my expectations.

So intrigued was I by the redwoods we saw on Thursday that I started researching local parks and found the Muir Woods National Monument about an hour and a half away. This morning, we left a little after breakfast and journeyed north toward Muir Woods. On the way, we stopped in Sausalito for a yummy lunch at a placed called the Sausalito Taco Shop. Parking at Muir Woods was a bit of a challenge, but our distant roadside parking spot was worth it for the wonderful fresh air and towering trees of Muir Woods. We only spent about an hour in the park for various reasons, but the trees were awesome and just being there was invigorating. Next, I'd like to visit some giant sequoia groves.

In our travels, our GPS has been invaluable. It hasn't prevented us from getting lost, but it's been a very nice replacement for paper maps and printed directions. However, our TomTom GPS has some interesting quirks in its pronunciation programming. For instance, San Francisco is "San Franvisca", San Jose is "San Hoset", De Anza is "De Antha", and Cupertino is "Cupertina". At least it's consistent, so once we've learned its pronunciations, we'll be fine.

During my free time, I've been researching pending purchases, such as a car, a printer, and a monitor. We left our sickly Mercury Sable in Virginia (both of the front shock mounts were cracked and the driver-side shock had nearly bored a hole through the hood), so it's time to purchase my first new car. I'm strongly considering a hybrid, but more research is necessary. The monitor (a Dell 20" widescreen LCD) and printer (Canon MP620) I've been using belong to Opera, so I'll be procuring replacements. I've settled on getting the same printer, but haven't quite decided on a monitor. I'm currently considering the Dell 2408WFP, a 24" widescreen LCD, and an Apple 24" Cinema Display. I hope to try out the latter in the office this coming week.

I keep expecting major earthquakes to strike. Everywhere I drive, I imagine the effects of a massive earthquake and try to imagine how I'd react. As I walk downstairs to our parking garage, I consider my options should a quake strike. It's a bit annoying actually, and I hope it will pass soon. I'm considering taking an earthquake preparedness class at the local library to ease my mind a bit.

And now I'm off to prepare for my first day at Apple tomorrow. Toodles.

Fruitful New Endeavors

And now for something almost completely different. Yesterday, March 31st, was my last day as an Opera Software employee. It's been a great six years and it saddens me that I won't be working with the great folks at Opera any longer. Opera Software truly employees some of the best and brightest developers and QA in the world and I was extremely lucky to be a part of such a talented team of individuals so early in my professional life.

Opera makes great software and deserves much more respect than it gets in the USA. The company has many obstacles to overcome in order to increase their desktop market share in the USA and I hope that they rise to the challenge. I will be watching and contributing as I can to the effort and I encourage all Opera fans to do the same.

What's next for me? On Sunday, my wife, daughter, and I arrived in Cupertino, CA where I'll be working for a certain consumer-oriented hardware and software maker. How do you like them Apples?

Running Multiple Versions of Opera on OS X

Unlike its brethren on Windows and UNIX/Linux, it has not been possible to specify the profile directory for Opera on OS X, making it difficult to maintain multiple installations. This is particularly problematic if snapshots are not set to use the correct profile directories (which happens from time to time) or when trying to migrate from a snapshot to a final release. Discussed below are two ways to circumvent these problems.

The PrefsSuffix File

To force snapshots to use a different profile for snapshots, a single file is added to the Opera.app package: PrefsSuffix (with no file extension). This file should be located in the Opera.app/Contents/Resources/ directory and contains a string to append to the default profile directories. For instance, the Opera 10.0 snapshots' PrefsSuffix file contains "10" (sans quotes), which makes the profile directory ~/Library/Preferences/Opera Preferences 10/ instead of the default ~/Library/Preferences/Opera Preferences/. The PrefsSuffix is also appended to the default Application Support and Cache directories, making Opera use a completely unique profile.

Here's a step-by-step method for using a PrefsSuffix file:

  1. Create a text file named "PrefsSuffix" with no extension.
  2. Add the desired profile directories suffix in the text file. For instance, if you want Opera to use "Opera Preferences Peregrine Beta" for preferences, you'll put "Peregrine Beta" (sans quotes) in the text file.
  3. Right-click on the Opera.app and choose "Show Package Contents".
  4. Navigate to Contents/Resources/ and copy the "PrefsSuffix" file there.
  5. Optionally rename Opera.app.

The PrefsSuffix can contain alphanumeric characters (A-Za-z), spaces (" "), and/or dashes ("-").

It's important to remember to update the PrefsSuffix file any time the Opera.app package is changed, such as when installing a new snapshot or when auto-updating. If the PrefsSuffix file is missing, the default profile directories will be used.

All paths in Opera's preferences files must be updated before a profile can be copied from the default location to a new directory for use with a PrefsSuffix.

Setting the PrefsSuffix from the Command-Line

Since it's not always easy to remember to update the PrefsSuffix file, there's another method to set the PrefsSuffix from the command-line. Opera can be run from the command-line with the "-pd" switch followed by a string to append to the default profile directory locations. For instance, if Opera.app is in /Applications/, you would type "/Applications/Opera.app/Contents/MacOS/Opera -pd 10" to use the ~/Library/Preferences/Opera Preferences 10/ preferences directory. If the desired PrefsSuffix contains whitespace, the string should be quoted (e.g. '/Applications/Opera.app/Contents/MacOS/Opera -pd "Peregrine Beta"'.

Running Opera from the command-line using "-pd" will not override a PrefsSuffix file in Opera.app.

Tips and Tricks

Using the PrefsSuffix file, it's easy to have multiple versions of Opera running side-by-side. For instance, a user could have "Opera Kestrel.app" with a PrefsSuffix file containing "Kestrel" and "Opera Snapshot.app" with a PrefsSuffix containing "Snapshot" to keep the latest stable and snapshot versions separated. Using QuickSilver, you can easily run each version of Opera simultaneously.

Since running a snapshot without a PrefsSuffix can have unintended consequences, it's a good idea to always use a PrefsSuffix file with Opera. Thus, if an unstable build inadvertently doesn't use a PrefsSuffix, it can't cause problems with a users' primary Opera installation.

Web Mail Integration in Opera 10.0

Screenshot of E-mail Client Selection dialogThe Opera 10.0 snapshot released today includes a new feature that allows users to click on mailto links and have them open in web mail providers, such as Gmail, Yahoo! Mail, and Windows Live Hotmail. This is particularly useful for individuals that primarily use web mail instead of a standalone e-mail client.

In a clean install, clicking a mailto link will trigger the e-mail client selection dialog, which allows users to choose between using Opera Mail, the system default mailer, or various web mail providers. When you select a web mail provider (and check the "Do not show this dialog again" checkbox), all mailto links will open in the specified web mail provider and automatically fill in parts of the compose window. For instance, the maillto link above will put "Test Mail" in the compose window subject. Users can change their settings in Preferences > Advanced > Programs by editing the "mailto" handler.

The web mail providers currently supported are Gmail, Yahoo! Mail, and Windows Live Hotmail. Yahoo! Mail and Windows Live Hotmail will not work very well if you aren't running a recent browser.js, as neither official supports Opera. Furthermore, Yahoo! Mail currently only opens the welcome page, but doesn't open a compose window.

This feature works via a list of web mail providers in the webmailproviders.ini file in the "defaults" sub-directory of the Opera program directory. On Windows, for instance, the file will be in "C:\Program Files\Opera\defaults\" if you install Opera in "C:\Program Files\Opera\". On OS X, the file is in the Opera.app package in the "Contents/Resources/defaults/" directory. Opera will need to be restarted to pick up new/changed entries in the file. Web mail providers are defined via the following format:

[Gmail]
ID=1
URL=https://mail.google.com/mail/?extsrc=mailto&url=%s
ICON=http://mail.google.com/favicon.ico
  • The provider name shown in the UI is enclosed in square brackets.
  • ID is a unique integer identifier for each entry in the file.
  • URL is the web mail provider's mailto handler URL. "%s" will be replaced with the clicked mailto URL. Currently, data and javascript URLs are allowed.
  • Icon is a link to a favicon representing the web mail provider.

Some web mail providers do not have a mailto handler URL, but can prefill compose windows by specifying each parameter separately, e.g. "http://mail.google.com/mail/?view=cm&fs=1&to=%t&su=%s&body=%m&cc=%c&bcc=%b" where %t represents the message recipient, %s the message subject, %m the message body, %c CC'd recipients, and %b BCC'd recipients. The current implementation does not natively support this style of URL, but it is possible to get around this limitation using a javascript or data URL to process the clicked mailto URL into separate parameters. For instance, the following entry could be added to webmailproviders.ini to make Opera work with Opera Web Mail (special thanks to Michael A. Puls II for providing this URL):

[Operamail.com]
ID=4
URL=javascript:(function(uri)%7B%0D%0Afunction%20decode(s)%7Btry%7Breturn%20decodeURIComponent(s).replace(%2F%5Cr%5Cn%7C%5Cr%7C%5Cn%2Fg%2C%22%5Cr%5Cn%22)%3B%7Dcatch(e)%7Breturn%20%22Opera%20percent-decode%20error%22%3B%7D%7D%0D%0Afunction%20encode(s)%7Btry%7Breturn%20encodeURIComponent(s)%3B%7Dcatch(e)%7Breturn%20%22Opera%2520percent-encode%2520error%22%3B%7D%7D%0D%0Afunction%20escapeInvalidHH(s)%7Breturn%20s.replace(%2F%25(%3F!%5B0-9A-F%5D%7B2%7D)%2Fgi%2Cfunction()%7Breturn%20%22%2525%22%3B%7D)%3B%7D%0D%0Afunction%20escapeUnsafeHH(s)%7Breturn%20s.replace(%2F%2500%7C%2501%7C%2502%7C%2503%7C%2504%7C%2505%7C%2506%7C%2507%7C%2508%7C%250B%7C%250C%7C%250E%7C%250F%7C%2510%7C%2511%7C%2512%7C%2513%7C%2514%7C%2515%7C%2516%7C%2517%7C%2518%7C%2519%7C%251A%7C%251B%7C%251C%7C%251D%7C%251E%7C%251F%2Fgi%2Cfunction(match)%7Breturn%20encode(match)%3B%7D)%3B%7D%0D%0Afunction%20filterSingleLine(s)%7Breturn%20s.replace(%2F%5Cr%7C%5Cn%2Fg%2C%22%22)%3B%7D%0D%0Afunction%20MailtoURIParser(s)%7Bthis.parse(escapeUnsafeHH(escapeInvalidHH(%22to%3D%22%2Buri.substr(7).replace(%2F%5C%3F%2F%2C%22%26%22))))%3B%7D%0D%0AMailtoURIParser.prototype%3D%7Bparse%3Afunction(dataset)%7Bthis.to%3Dthis.subject%3Dthis.body%3Dthis.cc%3Dthis.bcc%3D%22%22%3Bvar%20ref%3Dthis%3Bdataset.replace(%2F(%5B%5E%3D%26%5D%2B)%3D(%5B%5E%26%5D*)%2Fg%2Cfunction(match%2Chname%2Chvalue)%7Bhname%3Ddecode(hname).toLowerCase()%3Bif(hname%3D%3D%22to%22)%7Bif(hvalue!%3D%22%22)%7Bif(ref.to!%3D%22%22)%7Bref.to%2B%3D%22%252C%2520%22%3B%7Dref.to%2B%3Dhvalue%3B%7D%7Delse%20if(hname%3D%3D%22cc%22)%7Bif(hvalue!%3D%22%22)%7Bif(ref.cc!%3D%22%22)%7Bref.cc%2B%3D%22%252C%2520%22%3B%7Dref.cc%2B%3Dhvalue%3B%7D%7Delse%20if(hname%3D%3D%22bcc%22)%7Bif(hvalue!%3D%22%22)%7Bif(ref.bcc!%3D%22%22)%7Bref.bcc%2B%3D%22%252C%2520%22%3B%7Dref.bcc%2B%3Dhvalue%3B%7D%7Delse%20if(hname%3D%3D%22subject%22)%7Bref.subject%3Dhvalue%3B%7Delse%20if(hname%3D%3D%22body%22)%7Bif(!(hvalue%3D%3D%22%22%26%26ref.body%3D%3D%22%22))%7Bif(ref.body!%3D%22%22)%7Bref.body%2B%3D%22%250D%250A%22%3B%7Dref.body%2B%3Dhvalue%3B%7D%7D%7D)%3Bthis.to%3Dencode(filterSingleLine(decode(this.to)))%3Bthis.subject%3Dencode(filterSingleLine(decode(this.subject)))%3Bthis.body%3Dencode(decode(this.body))%3Bthis.cc%3Dencode(filterSingleLine(decode(this.cc)))%3Bthis.bcc%3Dencode(filterSingleLine(decode(this.bcc)))%3B%7D%2Cformat%3Afunction(s)%7Bvar%20ref%3Dthis%3Breturn%20s.replace(%2F(%25%25)%7C(%25T)%7C(%25S)%7C(%25M)%7C(%25C)%7C(%25B)%7C(%25w)%2Fg%2Cfunction(match%2Ca%2Cb%2Cc%2Cd%2Ce%2Cf%2Cg)%7Bif(a)return%20%22%25%22%3Bif(b)return%20ref.to%3Bif(c)return%20ref.subject%3Bif(d)return%20ref.body%3Bif(e)return%20ref.cc%3Bif(f)return%20ref.bcc%3Bif(g)return%20encode(%22mailto%3A%22%2Bref.to%2B%22%3Fsubject%3D%22%2Bref.subject%2B%22%26body%3D%22%2Bref.body%2B%22%26cc%3D%22%2Bref.cc%2B%22%26bcc%3D%22%2Bref.bcc)%3B%7D)%3B%7D%7D%3B%0D%0Aif(uri.search(%2Fmailto%3A%2Fi)!%3D0)%7Bthrow%20%22Not%20a%20MailtoURI%22%3B%7D%0D%0Avar%20parser%3Dnew%20MailtoURIParser(uri)%3B%0D%0Avar%20compose%3Dparser.format(%22http%3A%2F%2Fmymail.operamail.com%2Fscripts%2Fmail%2FOutblaze.mail%3Fcompose%3D1%26did%3D1%26a%3D1%26to%3D%25T%26subject%3D%25S%26body%3D%25M%26cc%3D%25C%26bcc%3D%25B%22)%3B%0D%0Avar%20a%3Ddocument.createElementNS(%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%2C%22a%22)%3Ba.href%3Dcompose%3Ba.click()%3B%0D%0A%7D)(%22%s%22)%3B
ICON=http://www.opera.com/favicon.ico

This feature is a work in progress and we hope to work out all of the kinks with web mail providers before the final release of Opera 10.0.

Update (2009-01-13 2:25pm ET): The initial operamail.com URL was wrong and has now been updated.