Launching Links in Opera from Command Line

I’m an Opera user but I use a number of applications from the command line, and often I want to launch links from those applications into my web browser. I’ve just switched over to reading my feeds using canto (web applications are becoming decreasingly accessible these days, although I’m saving that rant for another day) which is a console-based application. This, like many other applications, allows you to specify a URL handler to use when you want to visit links.

To launch a link into a new tab in an existing Opera window, I simply used this:
opera --remote 'openURL(<url>, new-page)'

Where the <url> is the address to access; the same trick works in other programs too. For example I use irssi for IRC, with the openURL plugin, and this can do the same trick. To launch the link I simply set the http handler like this:
/set openurl_app_http opera --remote 'openURL($1, new-page)'

Since I have to look these settings up every time I want them, I thought I’d blog them for next time – and of course for anyone else who finds this useful between now and then!

My Three Favourite Opera Features

I’m an Opera user, and one of the reasons I am is that I can control my browser entirely from the keyboard. I think everyone uses browser keyboard shortcuts, and in a lot of ways Opera has similar functionality to other browsers, but it also has keyboard spatial navigation, meaning I can jump to the next element in whichever direction I choose. Opera also has per-site preferences, which actually make the web usable for me.

Continue reading