Slightly rewritten previous KDE hack to be more accurate.