Home of Rob

Fixing KWin

Ok, so recently I fiddled with my desktop settings in Kubuntu (I tried installing compiz), and then when I reverted back to the original state things had gone a bit strange.  Compiz is a windows manager for Linux that uses various 3d effects and flashy graphics.  It comes with Ubuntu (and looks very pretty) so I tried installing it on my Kubuntu installation.  Unfortunately my computer doesn't have the capabilities for it so I decided to revert to Kwin.

Kwin is the default window manager for KDE.  When I reverted back to this, something must have gone a bit wrong because the settings were now a bit warped.  The Alt-Tab function flicked between non-minimised windows, but never displayed any that were minimised.  It also didn't present me with a list of windows, but instead displayed the next window immediately.  The window focus also followed the mouse, so if the mouse moved off my console window, I'd immediately be typing into the window behind it!  Very irritating.

I found out how to fix it, though, and decided to write it down here in case it happens again.

Clearly, I needed to change the kwin settings.  I haven't been able to find a graphical interface for tweaking these, but I found out where they're stored.  By deleting the config files from my home directory, kwin reverted to the defaults (which is what I was using before):

~/.kde/share/config/ksmserverrc

~/.kde/share/config/kwinrc

~/.kde/share/config/session/*

The first file here stores information about sessions, the second holds kwin configuration information and the session folder stores information about previous kwin sessions.  I moved the first two files, and the content of the folder.  Just removing the kwinrc file should have been enough, but I wanted to make sure that things definitely went back to the way they were!

Looking inside the kwinrc file it was clear that there are options for the things that were causing me grief (AltTabStyle=CDE, FocusPolicy=FocusFollowsMouse), but I don't know what the other options are for these settings, and I haven't found a graphical (or command line) method for altering them (which would be safer for changing the settings - and hopefully present more options that I may wish to tweak).