What is the problem?

  • KDE does not respect other window manager/DE settings.

    Is there a way to safely run KDE alongside other window managers without having to reconfigure them every time after finishing my testing with KDE?


My user's main desktops are primarily xfce (4.6, 4.8, 4.10) and Unity.

  • I frequently test multiple Window Managers(fluxbox, enlightenment, unity, gnome, etc). Only KDE causes me problems when returning to another WM once I am done testing some KDE functionality.

What I have done to fix this?

When returning to a WM other than KDE, I find that I have to delete config(specifically *gtk files) files in order to return my other WM's to their default settings.

What answer am I looking for?

  • Are there any file permissions that I can set to prevent KDE from breaking my other WM settings?
  • Is there a way to determine what files in my home directory that KDE touches and modifies? That might help my narrow down my issue.
  • I am amenable to building a login script to correct anything that KDE has broken. For three users, this would be acceptable. This doesn't scale to 50 users.

What can I do to safely test KDE and return to my default window manager without having to continually restore my configuration?

Why is this important?

Here is a use-case that is causing me problems:

I have a user(think C-level exec) that likes to change back and forth between KDE and xfce(among other WMs). How can I configure their profile so they do not get KDE window decorations when they decide to move back to xfce?

As it stands, I have been unable to prevent an xfce session from being totally mangled after a user logged into a KDE session.

  • if nothing else, maybe run it in a VM? – Journeyman Geek Feb 11 '13 at 8:36
  • @Journeyman Geek Sure, but I want to know how I can get KDE to play nice with the rest of my WMs. Gnome, xfce, Unity, Enlightenment, etc all seem to respect each anothers configurations. – Kevin Bowen Feb 11 '13 at 8:43
  • Obviously, KDE has no business in changing configuration files of other desktops. Can you generate a list of the files it touches outside .kde and logs? If so, consider filing a bug against KDE – phihag Feb 11 '13 at 12:02
  • @phihag Part of my question was asking how to determine which files KDE had touched. – Kevin Bowen Feb 11 '13 at 12:05
  • 1
    @LeoR Wow. A 5 year old bug. Thanks for digging this up. This is somewhat similar, but different. I am looking for workarounds for this behavior. I will have to investigate later bug reports. Thanks. – Kevin Bowen Feb 14 '13 at 20:31

Here is a solution that I have found mitigate display/window decoration issues when switching between KDE and Xfce.

How do I find which files KDE has modified?

Finding the files that have changed in a home directory, within a specified time period, is fairly straightforward.

find ~ -maxdepth 5 -mmin 10 (searches for changes within the last 10 minutes)

However, the results are cluttered with a large number of dynamic files(various app caches, for example). So, I needed to exclude those from my results:

find ~/ -maxdepth 5 \( -path ~/.cache -o -path ~/.xchat2 -o -path ~/.local -o -path ~/Downloads -o -path ~/.config/deluge -o -path ~/.config/chromium -o -path ~/docs -o -path ~/.dropbox -o -path ~/Dropbox -o -path ~/.pulse -o -path ~/.dbus \) -prune -o -mmin -5

This results in a much more manageable list to identify the files KDE has modified(I don't doubt that there is a more elegant solution to get the same results).

What files need to be changed and what commands should be run?

Prior to exiting KDE, enter a terminal(Ctrl-Alt-t), and enter the following command:

rm ~/.gtkrc-2.0

This will remove KDE window decoration settings and its deletion will result in those settings not being applied to Xfce. However, once logged into Xfce, the WM will need to be reset with the following command:

xfwm4 --replace

Additionally, if any theme or font changes have been made while working in KDE, another file will need to be deleted prior to logging into Xfce. Otherwise, fonts in the web browser will have been modified.

Again, from the command line:

rm ~/.fonts.conf

How can I (partially) automate this?

I have automated part of this by editing /etc/lightdm/lightdm.conf and placing the following lines in the file:

    session-cleanup-script = home/<userdir>/clean_up_after_kde.sh 

The script contains the two rm commands from above. The xfwm --replace cannot run until the desktop environment has already started, so this is still run manually.

In order for the changes to take effect, lightdm needs to be restarted. Run the following:

sudo restart lightdm.

Your session will immediately restart after this command and drop you back to a login screen, so ensure that you have saved any work before restarting.

These commands will be run as part of the logout process now. Note that this script runs only after the user is completely logged out.

While this is still pretty kludgey, it is a smaller step to making it less so.

  • Why don't you just create a script that runs these if KDE isn't running? – Seth Feb 17 '13 at 18:49

Setting a separate /home partition could be the way to go. Basically you have 2 /home partitions (or folders, one dummy) and use the dummy for KDE.

  • Could you outline, here, the steps needed to accomplish this and easily maintain two separate /home directories? – Kevin Bowen Feb 21 '13 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.