When I first started using Linux, I selected Kubuntu as my distribution of choice. Kubuntu is a derivative of Ubuntu, only using the KDE desktop environment instead of GNOME, the default for Ubuntu. Kubuntu (at that point it was using KDE version 3.5 or so), chose Konqueror as its default web browser and file manager. I had no problem with Konqueror as a file manager, but as a web browser, it wasn’t my first choice. It was fine, but had some drawbacks. For one, there were quite a few websites that didn’t know how to react to Konqueror, and would claim the need for a browser upgrade. Gmail was one of those websites. Visit Gmail today in Konqueror and you’ll see a notice informing you that you are using a basic version of Gmail, and to upgrade your browser for the full experience.
Part of the problem was how Konqueror displayed web pages. It didn’t display them poorly, in fact its HTML rendering engine – KHTML – was adopted by Apple, and now exists in a highly modified form as WebKit. It just didn’t do things in the exact way some websites required, so I always felt – when using Konqueror – like a second class citizen. Over the years, there has been talk of Konqueror switching to WebKit as its default HTML renderer, but the move has not materialized. However, thanks to KPart technology (which allows different types of viewers to be embedded inside another program), it is possible to use Konqueror with WebKit.
In Ubuntu, simply type the following into a Terminal:
sudo apt-get install kpart-webkit
That should bring in a package called kpart-webkit as well as libwebkit1 (both of which are required). After downloading and installing, you’re not ready yet. That would be too easy. We now need to tell KDE in what circumstances you want to use WebKit instead of KHTML.
To get to the preferences area for this, you have a couple options. First is to open Konqueror and go to the Preferences window. To get there, choose the Settings menu, then the Configure Konqueror option. Once the window opens, choose the “file associations” option under File Management. In the small sidebar that has now appeared (check out the screenshot to see what it looks like), click on the little caret beside the “text” option. In a second, a large list should appear, showing different types of text documents. The one we want in order to get Konqueror to use WebKit is “html,” so find that in the list.
Once you’ve clicked on it you should see two new tabs. The one we want is the “Embedding” tab. Click that tab and in the lower part of the tab you should see at least two options in the “Services Preference Order.” On my system there are three: WebKit (kwebkitpart), KHTML (khtml), and Embedded Advanced Editor (katepart). In order to get Konqueror to view HTML (web pages) using WebKit, we need to make sure that WebKit is listed first. To do this, just click on it then use the Move Up option to the right until it is above every other option. Now, just click the Apply button, and you’re set.
You can also accomplish this a bit more quickly by using the Terminal. To get to the same preference window we used before (only now it’s already to set to edit the text/html preferences instead of us having to find it), type the following into a Terminal:
Once there, we only have to click the Embedded tab and move WebKit (webkitpart) to the top of the list. Click apply and you’re done!
And that’s all there is to it. From now on, Konqueror will use WebKit as its HTML layout and rendering engine. You’ll be more compatible with web standards (including a higher score on the Acid 3 test), as well as faster. What’s not to like about that?