Gentoo and KDE4

Everyone wanting to upgrade to KDE4 with Gentoo should be adviced not to trust the official guide completely. It’s a good start but incomplete and misleading. You should have a look at it nevertheless:

http://www.gentoo.org/proj/en/desktop/kde/kde4-guide.xml

You should know the following facts before getting yourself into trouble:

  • You need KDE 3.5.10 (unstable) prior to KDE 4 if you plan to use both along each other. Some applications of KDE 3.5.10 will break nevertheless, at least if you install without kdeprefix (see below). You will be blocked otherwise.
  • You don’t need an unstable portage 2.2 for EABI 2. Well, you kind of need it nevertheless. portage 2.1.6.* IS portage 2.2 but with all new features (except EABI 2) disabled. If you have enough time, know Python and want to help the portage developers please do it, you know where you find them. If you run a more experimental system (you are unmasking KDE 4, right?), you could unmask 2.2 nevertheless and help Gentoo by testing and submitting bug reports.
  • You need to unmask lots and lots of packages. You can use this file and NOT the file you get there (both are linked in the KDE4 guide but the last one is for kde-testing overlay only). Unfortunately you will need to unmask even more. You can use unmasker, a nice tiny tool that does all that nasty unmasking stuff for you while you can do better things. Following the comments you will end up with a directory /etc/portage.keywords/ and some files in it. Emerge will use all of them. Have a look at the generated file(s) and modify/comment/delete any lines you don’t like. There will be some (e.g. SVN versions).
  • Before starting that huge 250 ebuild session (twice that size if you need KDE 3.5.10), make sure you have kdeprefix in your USE flags! The guide says it would not be necessary to use it but trust me: it is if you want to save yourself some headaches.
  • Having compiled all ebuilds and noticing random crashes and disfunctionality? Start dbus and hald first – you need them in KDE4 or you get weird problems. (that’s not in the guide either 🙁 )
  • Using unstable xorg 1.5 and have no keyboard anymore? Or are you just wondering why you should use 1.5? See this short thread.
  • You use NVidia drivers and see flickering red or black checkerboards covering your videos? Well, guess you are using Amarok. It took almost a year to find that out. Just exit Amarok or open and close the playlist and control window a few times, the flickering will disappear. BTW that also happened with Compiz Fusion and KDE 3.5.
  • Having stability problems? Make sure you use nvidia-drivers 180.27 or 180.29 for the time being, do NOT use 180.37 for now.
  • Your icons disappeared? Check for the Inherits=hicolor setting to be correct (find the icon set configs and possible options for Inherits using locate index.theme), also check for deprecated icons (folder icons etc.) and switch them. Maybe it also helps to upgrade to QT 4.5 and of course x.org 1.5 if you didn’t do that already; this could also fix some weird stuff going nuts in your system tray. Still missing icons? Bad luck I guess. The Oxygen icon set still seems incomplete and Inherits doesn’t seem to work in all cases, so you may try switching to some other icons instead. (Although this is 4.2, isn’t it? But what did other distributions do to fix it if it’s really incomplete/broken?)

These won’t be the only problems you come across, and I wrote some of them from memory because I upgraded about a month ago. Maybe it’s not sufficient what I wrote but it should save you at least 5 hours of work (or even more) figuring everything out yourself.

Good luck!