Getting Opera Mobile to run properly on UbuntuPosted: April 9, 2011
Update: I don’t know if these instructions still work. You probably should consider this page outdated.
Am I insane? You decide. Anyway, I just managed to get Opera Mobile to run properly on my Ubuntu machine, and I thought maybe someone wants to do this too. So here I am, posting a guide once again.
And yes, I am posting this from Opera Mobile.
First off, you’ll need the .deb package, which works on Ubuntu and presumably Debian. Get it from Opera’s website (yes, it’s actually hosted by Opera themselves). Install it, take it for a spin and prepare to tweak it. Fortunately, the
operamobile binary has some really neat command line options ready for you to use.
You’ll need to change the menu shortcut and, if you wish, the .desktop file. Install your DE’s menu editor (
alacarte for GNOME), find the Opera Mobile entry and edit the command to look like this:
operamobile -geometry 420x640
The parameter passed to -geometry is, as you might have realized, the size the window will take. Feel free to change this to whatever suits you; I used 420×640 because that way it actually looks good on my desktop (I only have a 1366×768 laptop display at my disposal).
The .desktop file sits comfortably in /usr/share/applications. Editing it wasn’t really necessary for me, since I use Docky to launch my apps (yes, I know, Mono alert, but I stopped caring a while ago) and it takes the parameters from the menu entry. I recommend you don’t edit it, but who am I to stop you?
Next, if you want to make Opera Mobile your default browser (I did), you’ll need to make a couple of changes. First, configure it to be the default browser for http links. With GNOME 2, you can do that by going to System -> Preferred Applications, selecting “Custom” from the web browser drop-down list, and using the following command:
operamobile -geometry 420x640 -url "%s"
If you want to open local html files with it (like I did), things get tricky. You’ll first need to write a small shell script and put it in, say ~/Scripts or ~/.scripts, or even ~/.ridiculouslylongfoldername.
# simple script to make opera mobile open a file
operamobile -geometry 420x640 -url "file://$1"
I called the script “operamfile”, and put it in ~/Scripts, so change the command below if you put it somewhere else/gave it another name.
Then, in GNOME 2 at least, you have to locate an .html file, right-click it, go to Open With -> Other Application…, expand “Use a custom command”, type in
~/Scripts/operamfile, check “Remember this application” and hit Open. Voila! You have successfully opened a local .html file using Opera Mobile. Feel free to give yourself a cookie.
Now, of course, there must be some negative things about Opera Mobile, since it is a mobile browser after all:
- Multi-tabbed browsing is possible, but extremely inconvenient. I recommend you use multiple windows instead of tabs.
- Full HTML5 support? CSS 3D effects? Flash? Silverlight? Don’t even ask about these.
- No AdBlock. You can obviously use a hosts file though.
- # and * can only be typed using the on-screen keyboard. (actually, I just realised * can be typed using the numpad)
- Speaking of the on-screen keyboard, it’s damn annoying. Make it disappear with F6.
- No right click support, you have to click and hold the left mouse button.
- No scroll wheel support!
But fear not, there are some really cool things about it too!
- Pages properly scale to the window size! This is the main reason I love it, actually, because now I only need a small part of the screen to view webpages, and I can have other big windows open (say, an IDE) without covering them. I know of no desktop browser that does this so well.
- Fast and light. Beats the hell out of Firefox, IMO.
- Flicking through pages is awesome!
- Most sites work perfectly with it. Including the WordPress admin interface.
- You can browse with your arrow keys without any problem.
- The mobile version of LastPass works really great with it. Just put the bookmarklet on your fast dial page, in the bottom-right position, and you can hit * and 9 on your numpad to quickly insert passwords.
- Downloading and uploading files works perfectly!
As always, drop a comment if I helped!