Instructions to install & configure Opera 10 or 11 in Ubuntu.

Introduction

Opera is a browser developed by the company "Opera Software ASA"/Oslo. It is non-free software, since only binaries are made available (License). With the development of the version Opera Next, started in 2013 (versions >= 15), large changes have been made to the software: it will be based on the Webkit rendering engine (of Google's Chromium), and Opera Mail will not be part of the browser any more, but a separate program (Opera Mail). The Linux version development has stopped. As of 2013/December there is no recent version for Linux (stalled at v12.16), although a Linux version has been announced to follow (news via Opera desktop blog, latest version via Download Opera for Linux).

Installation

There are two basic types of installations, static and shared:

Static version: Opera has the Qt library built in. It is a larger download, and it does not use antialiased fonts on menus or the file chooser, and uses aliasing in the browser window and most other interface elements.

Shared version: Opera uses the Qt installation on your system. It integrates with the system, using whatever antialiasing setting you have for other Qt applications.

The shared version is probably better, as some of the resources it uses (e.g., RAM for the Qt libraries) can be reused by other applications. Try the other one if you run into installation or operational problems.

Install via repository (recommended)

See this official documentation for information about adding repositories (it is easy). Install opera for the shared version or opera-static for static version. The reason it's recommended is that when you update the rest of your packages (e.g. sudo apt-get update && sudo apt-get upgrade), Opera will be updated too without having to tend to Opera specifically.

There is a generic Opera repository available at http://deb.opera.com (with full description of how to add it). The Canonical repository for Opera no longer works.

deb http://deb.opera.com/opera/ stable non-free

The line above will make sure you get all final public releases. By default the sources repository is also added (which does not exist for Opera) so remove that. Add the following line if you want to get the newer alpha and beta releases instead.

deb http://deb.opera.com/opera-beta/ stable non-free

It is advisable that you add the Opera GPG key.

wget -qO - http://deb.opera.com/archive.key | sudo apt-key add -

(If you get "The following packages cannot be authenticated" warnings, you'll also need this:)

sudo apt-get install debian-archive-keyring

Install via the shell

sudo apt-get update
sudo apt-get install opera

or click Opera

Install after downloading deb package manually

Go to Opera Download Site, choose your package, and pick a download mirror. This site does not offer a choice between Shared Qt and Static Qt, so if you have a preference, use this directory (be sure to choose a .deb package). Save the file to somewhere you can find it, like the Desktop or your home directory. Then locate the .deb package and double click on it to start the Gdebi .deb installer.

If you get messages about unmet dependencies type:

sudo apt-get -f install

apt will then install the missing packages.

64-bit

Official package (recommended)

A 64 bit Linux version is available, you should get it automatically either from the repositories or from Opera

64-bit Flash

You can get the 64-bit Flash plugin from http://labs.adobe.com/downloads/flashplayer10.html. It's a tarball that just contains the .so file. Copy the .so to /usr/lib/opera/plugins/, and make sure that that directory is in Opera's plugin path (it should be by default). Flash 10.0.32.18 is known to work with Opera 10.00. You can test it at http://www.adobe.com/products/flashplayer/.

32 bit plugins

To get 32bit plugins working in the 64bit Opera (There are other places to get better guides, but here is a quick run through.)

You will want some compatibility-layers:

sudo aptitude install ia32-libs
  • To get Flash 9, get the "flashplugin-nonfree" package from packages.ubuntu.com, for i386.
  • Flash 10 is already available as 64-bit, but it does not work for me with Opera (5.09.2009).
  • To get Adobe Reader, see the AcrobatHowTo article for detailed instructions specific to your Ubuntu release.

Install each package with the following dpkg command (adapt the package names).

sudo dpkg -i --force-architecture package.deb

The spellchecker will not work with the standard instructions. It appears that the 64-bit dictionary works well with the 32-bit library, thus you only need to manually install the 32-bit library. You must install aspell and a dictionary (such as aspell-en) as the instructions say. A 64-bit version of libaspell will be installed as a dependency.

sudo aptitude install aspell aspell-en

Then you need a 32-bit version of the library libaspell. Get the libaspell package for i386 from packages.ubuntu.com. Then extract it to some directory, such as ~/Desktop, with the following command:

dpkg -x libaspell*.deb ~/Desktop

Now copy the .so file to /usr/lib32 (you need the symlink too):

sudo cp ~/Desktop/usr/lib/libaspell* /usr/lib32/

Restart Opera and you should have a working spell checker.

Making it more compatible with GNOME

Opera will now be accessible from Applications-->Internet-->Opera.

To get Opera to work better with GNOME, we're going to make sure it uses gnome-open for file-handling. Open a Terminal and type:

mkdir ~/.opera
cat >> ~/.opera/filehandler.ini

Select the following text and paste it into your terminal by pressing Shift+Ins:

Opera Preferences version 2.0
; Do not edit this file while Opera is running
; This file is stored in UTF-8 encoding
[Settings]
Default File Handler=gnome-open ,1
Default Directory Handler=gnome-open ,1

Then press Ctrl+d.

You will probably want to change the font types in Opera to fit those in Gnome. To do so, hit Alt-P in Opera, click the "Advanced" tab and then select the "Fonts" item on the left-hand side. For each GUI element, you can select a new type face.

Additionally, fonts in Opera look different from in regular Gnome applications. If you use Gnome, fonts in Opera may be fuzzy. This is because Qt, Opera's backend technology, doesn't recognize yet Gnome's font settings. To solve this problem, you can create a file called .fonts.conf in your home directory:

gedit .fonts.conf &

Paste this snippet:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
        <match target="font">
                <edit name="rgba" mode="assign">
                        <const>rgb</const>
                </edit>
        </match>
        <match target="font">
                <edit name="rgba" mode="assign">
                        <const>rgb</const>
                </edit>
                <edit name="hinting" mode="assign">
                        <bool>true</bool>
                </edit>
                <edit name="hintstyle" mode="assign">
                        <const>hintslight</const>
                </edit>
        </match>
</fontconfig>

Save it. Restart Opera, your fonts should look better.

The separation bar between the tool bar and the location bar is rather thick in Gnome. To reduce clutter, you can hide the tool bar hitting Alt-F11. If needed, you can toggle the tool bar hitting Alt-F11 repeatedly.

Skins for Opera

Press SHIFT+F12 and browse the available skins, pick any you like. Changing, adding, and removing them is very easy, and new ones are created very often. Below are some skins that might suit you.

The main page for Opera skins is http://my.opera.com/community/customize/skins/

If you use Ubuntu's DarkRoom skin (a dark brown skin), you can closely adapt Opera's native skin to match your desktop skin color. To do so, hit Shift-F12 in Opera, keep the "Opera Standard" skin, and under "Color scheme", select "Gold".

GNOME Skins for Opera

You may preview the skins linked below:

In Opera, select "Download" to install the skin.

KDE Skin for Opera

You may preview the skins linked below:

In Opera, select "Download" to install the skin.

Integration with Gaim/Pidgin

In Tools->Preferences->Advanced->Programs, add a new protocol you want to add(eg. ymsgr for Yahoo) and select "Open with other application" and enter /usr/bin/gaim-url-handler(gaim) or /usr/bin/purple-url-handler(pidgin).

Protocol integration with KDE

In the Tools->Preferences->Advanced->Programs, add a new protocol you want to add(eg. ymsgr for Yahoo) and select "Open with other application". Then, if you want to use the default program you set in KDE, just set the handler to "kfmclient exec".

Setting Opera as default browser in GNOME

To set Opera as the system default browser and mailreader, follow these steps:

  • Go to System -> Preferences -> Preferred Applications

  • Under the Web Browser tab select "Opera" and select "Open link in new tab"
  • Under the Mail Reader tab select "Custom" and, in the Command box, enter:

opera -newmail "%s"

Troubleshooting

Very slow to start loading pages

On some systems, Opera can be very slow to start loading pages. It may even time out. Fortunately, disabling IPv6 or DHCP can solve the problem.

Install Java

If you start Opera from the console you may see the following error message if java doesn't work correctly:

ERROR: ld.so: object 'libjvm.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libawt.so' from LD_PRELOAD cannot be preloaded: ignored.

To fix this, correct the Java path under Tools -> Preferences -> Advanced Tab -> Content -> Java options. It should look similar to this:

/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/lib/i386/

Your actual java runtime version could be different from this one. Changes will not take effect until the browser is restarted. Use http://www.java.com/en/download/help/testvm.xml to test your Java Virtual Machine (JVM). You need to have Java installed for this. See Java to find out how to do that.

General Plugin Problems

In order for Opera to see a plugin, the plugin must be in Opera's plugin path. You can add directories to the plugin path with Tools -> Preferences -> Advanced -> Content -> Plugin Options. Add the desired directories and click Find Plugins. You may have to restart Opera to enable the plugin.

Some common plugin .so files:

Shockwave Flash

libflashplayer.so

Acroread

nppdf.so

Gecko MediaPlayer

gecko-mediaplayer.so

Opera's Linux Plugin Page.

Flash problems

Just use the latest version of flash RestrictedFormats/Flash.

This should just work by now (May 2008). If not and problems persist even when using the most recent version of flash, and the plugin appears to be recognized (it shows up in the opera:plugins "webpage"), editing the opera startup script might help:

gksudo gedit /usr/bin/opera

Find the place where it says

# Workarounds for the "preloaded libXt" problem.

and add the lines:

# Flash workaround.
LD_PRELOAD="libflashplayer.so:${LD_PRELOAD}"
export LD_PRELOAD

just above that line. If you aren't using libflashplayer.so, insert the name of the plugin you are using instead.

Acroread Plugin Problems

The acroread plugin did work by default in Opera 8.x. It works for recent versions so you probably do not need the following:

  • You must edit the Opera startup script for it to work. Use your favorite editor to open the opera startup script:

gksudo gedit /usr/bin/opera

Replace the lines

OPERA_LD_PRELOAD="${LD_PRELOAD}"
export OPERA_LD_PRELOAD

with

LD_PRELOAD="libXm.so.2:${LD_PRELOAD}"
export LD_PRELOAD
OPERA_LD_PRELOAD="${LD_PRELOAD}"
export OPERA_LD_PRELOAD

Start Opera and open a pdf. When it asks you what to do, click the Change button next to the Opens With. A file type association dialog should popup; choose the plugin option at the bottom (nppdf.so should be an option).

Opera Segmentation Fault and Java crash with static version problem

If your Opera browser started to segfault, or you are using the static version and having problems with java, do the following:

1. Edit the ~/.opera/pluginpath.ini, and change the lines to this

[Paths]
/usr/lib/opera/plugins=1
/usr/lib/mozilla/plugins=0
/usr/lib/netscape/plugins-libc6=0

2. Create a symlink from /usr/lib/mozilla/plugins/libflashplayer.so to /usr/lib/opera/plugins/libflashplayer.so

3. Check your ~/.opera/javapath.txt, when using blackdown java, it should be /usr/lib/j2se/1.4/jre/lib/i386

Solution from rwf, based on this forum thread.

Video plugins

Install gecko-mediaplayer and most videos should just work.

Install Weekly Build

These are development unstable version, use on your own risk!

  • Download weekly build from http://my.opera.com/desktopteam/ and follow instructions for installing snapshot release (see above).

  • To locate libxpcom.so on your system and softlink it to /usr/lib

sudo ln -s /usr/lib/mozilla-firefox/libxpcom.so /usr/lib/libxpcom.so

Credits

Credits for the GNOME skin: mneptok

Based on this Ubuntu Forum thread.


CategoryInstallation

OperaBrowser (last edited 2014-01-12 15:54:34 by 2-launchpad-joe-philipps-us)