Opera for Linux features

As with everything else on linux, getting Opera's features to work perfectly sometimes requires a few adjustments to be done by hand.

Running versions older than 9.20

If you have installed the libX11 security patch for CVE-2007-1667, Opera versions earlier than 9.20 will crash on startup. This makes it difficult to test earlier versions of Opera. If you need to test in earlier versions of Opera, change the "DefaultDepth" option to 16 in your /etc/X11/xorg.conf file.

Enabling flash or other plugins

Plugins got some big improvements in Opera 9. In general, they now just work, as the dependency on Motif has been removed, and the new plugin API has been included. If you are having trouble with plugins, and you are using an earlier version of Opera, the first thing to try is to install Opera 9, and see if that solves your problem.

Check that plugins are enabled

The next thing to do is check that plugins are enabled:
'Tools - Quick preferences - Enable plug-ins'
Note, java has its own preference:
'Tools - Quick preferences - Enable Java' (if it can be enabled)

Check if the website is just being stupid

'Tools - Quick preferences - Edit site preferences - Network - Identify as Mozilla' - then reload the page.
(In Opera 8, use 'Tools - Quick preferences - Identify as Mozilla 5.0'.)
Why? Well, because Opera uses the Netscape plugin architecture, and some poorly written plugin detector scripts think that anything except Mozilla (AKA Netscape) should use VBscript and ActiveX, just like Internet Explorer. Since by default, Opera 8 and earlier identifies as Internet Explorer, this only makes matters worse. Starting in Opera 9, Opera now identifies as itself by default.

'Tools - Quick preferences - Enable JavaScript' - then reload the page.
Why? Because many sites use JavaScript to detect if the browser supports the required plugin, even though HTML actually provides two alternatives - object and embed, complete with fallbacks, meaning that script it is not necessary at all. Most page authors are not aware of this (or do not care).

It is also possible that the site could be asking for a plugin that is not available on Linux or is only available for the ActiveX architecture. If this is the case, there is not much that you can do (except sending them an email politely asking that they produce a Netscape/Linux compatible plugin). Thankfully, virtually all of the popular plugins are available for the Netscape architecture on Linux including those for Flash/Shockwave, Real Media, Quicktime (MPlayer), Java, MPEG, VRML, PDF, etc.

Check that the plugin uses the right API

Most current plugins work with both the old and the new plugin APIs. However, there are a few that will only work with the new API. The most obvious example is the mplayer-plugin. Opera 9 supports both APIs. Earlier versions only support the old API. So if you are trying to use a plugin that needs the new API (or you don't know what API it needs), and you have not done so already, upgrade to Opera 9.

Check that the plugins are installed

Now, make sure that the plugins are installed properly. Download the plugin installers from the relevant sites (like Adobe (Macromedia)). Follow their instructions and ensure that you install the plugin for all possible browsers, not just Opera. This is because Opera actually looks in the plugin directories of the other browsers, and may find an earlier version in one of them and use that instead. Typically this means installing into the plugins subdirectories of:
/usr/lib/netscape
/usr/lib/mozilla
/opt/mozilla/lib
/usr/lib/opera
/usr/lib/browser-plugins
You may need to change those depending on your installation. I note that with my RedHat 7.2 + Gnome install, Opera and Mozilla refused to load the Flash Player 7 plugin, although the Flash Player 6 plugin worked fine. You can check what plugins have been loaded by looking in:
'Tools - Preferences - Content - Plug-in options'

Now, tell Opera to look in those directories. In 'Tools - Preferences - Content - Plug-in options', click 'Change path...' and put in the directories that you installed the plugin(s) into earlier. Put the most important/commonly updated ones first, so that if a plugin installer only installs into some of the available plugin directories, Opera will use the right ones. Typically, this would be:
/usr/lib/opera/plugins
/usr/lib/mozilla/plugins
/usr/lib/netscape/plugins
Again, you may need to change those depending on your installation.

Once again, Java is separate. It uses a different installer that makes Java globally available. Opera can usually find Java for you, but sometimes you need to find the location of libjava.so on your computer, and use:
'Tools - Preferences - Content - Java options - Java path'
to select it, validate the path, and restart Opera (see Opera's documentation for more information). This stores the path in /home/username/.opera/javapath.txt. If you want to enable this globally, so that you do not have to set it for each user individually, make sure Opera is not running then add the relevant path line to /usr/bin/opera just under the 'for SUNJAVA in \' line. It should look something like the following (you will need to re-do this with every Opera and Java upgrade):

j2re1.5.2_01 \

Check the MIME type is registered in Opera

For some plugins, you may find that you need to add the MIME types and file extensions for that plugin:
'Tools - Preferences - Downloads'
If it is not listed, click 'Add...' to add in the relevant file extensions, MIME types and select the plugins. If the plugins are not listed then it is probably because of the next point (you may also want to try the 'Determine action by ...' options).

In Opera 8, check that Motif is installed and actually working properly

If Flash or other plugins still do not work for you in Opera 8 on Linux, it is probably because you need to install Motif (this is what allows plugins to interface with Opera). Motif can be fairly difficult to get working. Some distributions (such as Ubuntu) never seem to get it right, and it is quite possible that you will never get it working properly. Opera 9 no longer relies on Motif. If you have still not upgraded to Opera 9, do so now. It is far more easy than getting Motif working.

If you are determined to continue using Opera 8, you can continue following these instructions, but note that I will no longer maintain these instructions, and if they do not work, you are on your own. Opera Software had documented how to install Motif (and I had contributed tho those instructions), but since Opera 9 no longer needs it, their installation instructions will probably be removed soon. I have copied their instructions here on how to install Motif.

Anything else

Once again, I remind you that Opera 9 no longer relies on the troublesome Motif, and supports the new API. If you have not done so already, upgrade to Opera 9.

That's all. Run Opera and it should just work. If it doesn't, try the opera.linux newsgroup.

Enabling smooth fonts

Smooth fonts are also known as antialiased fonts (or ClearType on Windows).

With some Linux installs, Opera just seems to have smooth fonts. With others, the fonts seem really ugly and pixelated. Most modern Linux installs will have smooth fonts by default. Some also seem to be able to pick fonts that look good even without antialiasing specifically enabled. However, a few will fail, and it may not be possible to find fonts that look good. Well, I prefer to use the operating system's smooth fonts capability, since it is already there.

Opera Software produced some instructions for how to enable smooth fonts. Firstly QT 2.3.2 minimum needs to be installed, then the following command needs to be run at the command line before running Opera (or put in each user's .bashrc file)
export QT_XFT=true
This failed to work for me. Many people had also mentioned putting this line in Opera6.ini
Enable Core Fonts=0
However, this also failed for me. This turned out to be a mistake, because the correct line is:
Enable Core X Fonts=0

Using both the QT_XFT variable and the Enable Core X Fonts option made smooth fonts work. Woohoo! BUT, I don't want to have to set this up for each individual user, as that means each time a new user is added, this needs to be done again.

Get on with it!

So, lets do things globally. As root user, install QT 2.3.2 or above if you do not have it already.

Make sure Opera is not running. Now add the following line to /usr/bin/opera just under the #!/bin/bash line (you will need to re-do this with every Opera upgrade):

export QT_XFT=true

Now, insert the following line at the bottom of /etc/opera6rc

Enable Core X Fonts=0

Starting Opera

You can now run Opera using the 'opera' command as any user you choose. If you do not have smooth fonts, or if Opera does not start at all, then undo the changes you just made. Sorry, but I can't help you any more. I tried my best. You can try playing with the fonts that Opera is using (File/Tools - Preferences - Fonts). Please let me know if you manage to get it working some other way.

If it works, enjoy.

When I used this, I found that Opera picked a very bad font for all monospace fonts. It used 'Nimbus Mono 1 [Urw]'. Every time this font was used, it looked like there were extra spaces between every letter:
'L i k e   t h i s' instead of 'Like this'
I changed every occurence of this font in 'Tools - Preferences - Fonts' to 'Courier [Adobe]' and it worked perfectly. You could use any monospace font you want.

Back to Opera resources | Back to How To Create