Quanta plus under KDE 4

Summary
Updated 10 July 2012

When it comes to professional web developing, Quanta Plus has some irreplaceable features that make it a great choice for developers that don't stick only on php-ish based web sites. But Quanta, at the time of writing, is not yet ported to KDE 4, and the road to get it there seems long. That's why lot of developers still stick to KDE 3.5. This guide will attempt to help you make Quanta Plus work under KDE 4. At the time the article has been updated to work under KDE 4.8.

Preparations
Updated 24 May 2011

Being that KDE3 is no longer in portage, you need first to retrieve their ebuilds. There are wise people maintaining these, and fortunately Gentoo folks provide us with a nice tool to keep in touch with non official sources, namely Layman. Follow the instruction in the Layman article on how to install and configure layman before proceeding.

Now you need to add the kde-sunset overlay:

Emerge required Packages
Updated 10 Jul 2012

There are a few dependencies that will be pulled in during your emerges. Once, the not kde-sunset packages had to be emerged first, now that's no more a problem

But there is one thing you should emerge from your current kde 4, and it's kate. I don't have any explanation for that, but couldn't get quanta to work well without it. So there you go.

Another useful plus you may wont to emerge is htmltidy

Being Quanta based on kde-3.5, you need qt-3, kdelibs-3.5 and all related packages, but they work in a different environment, so before you start set some environments variables.

export KDEDIR="/usr/kde/3.5" export KDEDIRS="/usr/kde/3.5" export QTDIR="/usr/qt/3" export QTDIRS="/usr/qt/3" export XDG_CONFIG_DIRS="/usr/kde/3.5/etc/xdg" export PATH="/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin:$PATH"

Now you need to emerge almost everything to get a KDE 3 session working. Don't worry about KDE3/KDE4 conflicts, the two versions are perfectly slotted. But there are other problems we have to consider.

- Latest (unstable?) version of kdelibs 3.5 is needed: add ACCEPT_KEYWORDS="~amd64" (or whatever is your platform) to emerge the right one;

- Recent versions of portage find old ebuilds kinda corrupted: add FEATURES="parse-eapi-ebuild-head";

- We need avahi with qt3 support or qt libraries will not compile: add USE="avahi qt3";

- Compiling kde-libs with cups support does fail: try with USE="-cups".

Here you go, with one command:

Quanta is part of the kdewebdev package, so just emerge it all to have a suitable IDE with all its tools.

Getting Quanta Plus to work
Updated 24 May 2011

To get Quanta working, launch it through the following script (remember to make it executable).

There you go.

Adding a Desktop Icon
Updated 24 May 2011

Maybe you will want to add a shortcut with a Quanta icon to your Desktop, oops, sorry, to your Folder View... Lets do it the KDE way.

On the Folder view (or any folder), right click mouse -> Link to Applications

Fill with whatever you want, just be sure to fill in the Application tab with Command: full/path/to/quanta-startup.sh and Working Path: /usr/kde/3.5/

Change icon in the general tab to point to: /usr/kde/3.5/share/icons/hicolor/48x48/apps/quanta.png

And link it on your kickbar or desktop or wherever you want. That's it.

The annoying part
Updated 11 feb 2010

It seems that this part is no more necessary for kde version 4.3.3 or higher. I'll leave it here for who still has the problem.

It has been reported from a lot of KDE 4 users (i found it myself) that non-native KDE 4 applications (firefox and others), but even konsole and yakuake, don't behave correctly with a non US keyboard (default), no matter what you try. That's bad because starting Quanta from a KDE 4 environment makes Alt-Gr (Right Alt) not work at all! So if you incur into this bug and have an Italian layout, for example, your level 3 chars like @, {, }, ~, # will not show up. That's posted in kde bugzilla and we all hope the kde guys will soon find a solution.

BUT there is a workaround, and because i am a good guy i will quickly add it here. Open your System Setting, Regional and Language, Keyboard Layout. Enable keyboard layout, add USA as first layout (this is very important!) and your keyboard as second layout, Italy in my case. The command should look like this setxkbmap -model pc105 -layout us,it -variant , Don't touch the Advanced Tab (in my case nothing is flagged).

Apply, choose your layout from the system tray, and you will get everything to work. The annoying part is that layout order matters! You can't swap your layouts to have your keyboard as default, so everytime you log in you have to select the right one.