Update: My guide here is quickly becoming outdated. See what Ben has to say in the comment section.

I really love Opera. It was one of the pieces of software I felt bad about leaving behind during my switch to Linux. Unfortunately on Linux it ran much slower and looked awful, me being a Gnome/GTK kind of guy, and Opera using Qt3.

Well, Opera seems to have gotten some speed boosts lately, plus there’s this project called qgtkstyle which makes Qt4 applications look like GTK applications. I figured out how to combine all this to make Opera integrate pretty well with the visual style I’m using. Here’s how I pulled it off.

Install checkinstall.

$ sudo apt-get install checkinstall

Install qgtkstyle.

See this guide for any details on packages you may need to compile the source.

$ mkdir qgtkstyle-0.1~custom
$ cd qgtkstyle-0.1~custom
$ svn co svn://labs.trolltech.com/svn/styles/gtkstyle .
$ qmake && make
$ sudo checkinstall make install

Install Opera 9.60 Beta (Snapshot 2436).

The only apparent version of Opera that uses shared libraries, rather than statically-linked versions is available here. Download this version. It’s a beta of 9.60 (9.62 being the most current version as of this writing), but I haven’t really had any problems with it

Some visual improvements.

Start Opera. The titlebar should look like a GTK toolbar. Go to Tools->Appearance->Skin, change the color scheme to “System color scheme”. You can try changing the skin to “Qt Native”, but I think it looks awful, so I’m sticking with Opera’s standard theme. Finally, go to Tools->Preferences->Web Pages, and change the normal font to a more reasonable size (14 looks pretty nice on my computer). Do the same for the monospace font, and you’re done!

This is ultimately a hack, just out there for the impatient like me. Hopefully the Opera people will figure out whatever problem is causing them not to used shared libraries with Qt, and hopefully they’ll do it around the time next version of Qt arrives that includes qgtkstyle, making all of this obsolete.

3 Responses to “Setting up a GTK-styled Opera for Ubuntu”

  1. Cesar B. aka the Mover Says:

    I’ve heard some goody things about this blog. Remember to balance the pics with the text tho 🙂 but over all very nice post, keep up the good work, Cheers!

  2. Ben Says:

    Ok, update –
    Opera/10.00 (X11; Linux i686 ; U; en) Presto/2.2.0

    Opera just got faster, it blows through Acid3 test with 100% score!

    Very slight bugs – if you open ‘Appearance’ and close it again, you have to restart (one bar just gets stuck). Apart from that, it’s amazing.

    On my gnome desktop, I noticed fonts from 9.62 onwards weren’t the same as firefox (not so smooth, not sharp either – just badly rendered) so go to opera:config and click ‘show all’ type fonts in the search box, and then disable ‘Enable Core X Fonts’ checkbox – check the other two, exit and restart. Test it by opening http://linuxoutlaws.com/podcast/ in Firefox and Opera – they should now both look great.

    Next, about the theme – I find the best theme to be 2bizkit_leopard_for_opera_9_5-1_2

    Combine this with an enhancement – go to http://operawiki.info/CustomButtons#menu and click to add the ‘Toggle the Menu & Personal bar on/off AND dropdown the main menu (with ‘Notes’ image)’

    Drag this to the LEFT side of your TABS BAR.
    If you click on this button, it makes the bookmarks AND the top ‘file/edit’ menu bar hidden – so all you see is the button (click the little arrow to get a drop down file/edit/etc menu, or click button to restore them for use) – now it’s fairly compact. You have your tabs and addressbar. You should enable the startbar for any other drag n drop buttons (I use linux, so I use ‘inMoz’ and ‘inFF’ to open pages in Seamonkey and in Firefox – still the best browser for grabbing video using downloadhelper).

    So now the fonts are lovely, appearance isn’t ugly (though still not strictly gnome or KDE) and Opera is once again a best friend to keep alongside Firefox.

    Choice is the target here, keep a range of browsers, try not to choose only one.

    Happy browsing.

  3. Max Says:

    Very nice Ben! Thanks for the tips.

Leave a Reply