Dual booting between Gnome and KDE resets Gnome icons and cursor

I have a working dual boot setup with Manjaro KDE and Manjaro Gnome. Whenever I boot the KDE system and boot into Gnome afterwards, Gnome will use a different mouse cursor and icon theme than what I’ve set up to use. The software tweaks will even show an empty entry for those fields. I’d then set them back to the element I want and that’ll survive until I start the KDE system again.

Both systems share the same home partition. Is there a way to prevent this from happening?

That’s why

Not if you share the home between installations …


Create a separate partition to hold the contents of your Documents, Pictures etc.

Move the folders to that partition and symlink them back into user home.

1 Like

In general it is a bad idea to share a home folder between 2 desktop environment. If I would need that, I would create 2 different user accounts and share data (not configs) between them. The reason is simply that both DEs share amount of configs and can bite each other as you see.

1 Like

What files or directories exactly are causing this or could cause other issues? For instance, I’d also have to share several directories from .local and from .config between the systems and it’s likely that these directories contain the ones causing this issue.

That is not necessary.

You can of course selectively copy configurations but a general share of .config and .local is likely what is causing your headaches - more specifically folders related to gtk.

I only use one environment so for me it is not an issue to symlink .config

I use these symlinks as a part of my setup - not because I use several environments but part of my restore to a working state after installation

lrwxrwxrwx  1 fh   fh           24 26 dec 09:46  .config -> /a/private/.home/.config
lrwxrwxrwx  1 fh   fh           26 26 dec 09:46  Documents -> /a/private/.home/Documents
lrwxrwxrwx  1 fh   fh           26 26 dec 09:46  Downloads -> /a/private/.home/Downloads
lrwxrwxrwx  1 fh   fh           27 26 dec 09:47  .gitconfig -> /a/private/.home/.gitconfig
lrwxrwxrwx  1 fh   fh           23 26 dec 09:47  .gnupg -> /a/private/.home/.gnupg
lrwxrwxrwx  1 fh   fh           30 26 dec 09:47  .makepkg.conf -> /a/private/.home/.makepkg.conf
lrwxrwxrwx  1 fh   fh           25 26 dec 09:46  .mozilla -> /a/private/.home/.mozilla
lrwxrwxrwx  1 fh   fh           22 26 dec 09:46  Music -> /a/private/.home/Music
lrwxrwxrwx  1 fh   fh           23 26 dec 09:47  .netrc -> /a/private/.home/.netrc
lrwxrwxrwx  1 fh   fh           25 26 dec 09:46  Pictures -> /a/private/.home/Pictures
lrwxrwxrwx  1 fh   fh           23 26 dec 09:46  Public -> /a/private/.home/Public
lrwxrwxrwx  1 fh   fh           21 26 dec 09:47  .ssh -> /a/private/.home/.ssh
lrwxrwxrwx  1 fh   fh           26 26 dec 09:46  Templates -> /a/private/.home/Templates
lrwxrwxrwx  1 fh   fh           29 26 dec 09:47  .transifexrc -> /a/private/.home/.transifexrc
lrwxrwxrwx  1 fh   fh           23 26 dec 09:46  Videos -> /a/private/.home/Videos
lrwxrwxrwx  1 fh   fh           13 26 dec 09:46 'VirtualBox VMs' -> /a/virtualbox
lrwxrwxrwx  1 fh   fh           24 26 dec 09:46  .virtualenvs -> /a/projects/.virtualenvs

I use a lot of apps that save their settings directly in $HOME like VSCode (saves to ~/.vscode) or Firefox. So my home directory would mainly contain symlinks. Also, I’d have to remember to check and create these symlinks for every new application that I install.

I’m finding tons of stuff in .local and .config that should be shared in such a setup like Steam, settings and states from software like game engines (Unreal, Unity), music players (strawberry), DAWs (Reaper).

It feels like this approach doesn’t fly for me. Is there a way to reverse this, like symlink the problematic files/directories into home during boot?

Why is KDE writing into folders related to gtk?

Gnome and Plasma are the two systems you should not mix.

The general advise is to not mix the two - due to theme issues.

You should search the forum - this has been discussed several times.

If you insist - learn to live with the issues you are getting.

Work around it - create a script which checks the de and sets the cursor theme accordingly.

1 Like

I’ve searched for multiple combinations around the terms KDE, Gnome, share, mix, same, home, partition and have no luck finding something that is relevant to the problem. Do you have anything more specific?

Do you know what files and directories specifically are causing these problems? Could it be ~/.config/dconf/user? If yes, why would KDE write into that file?

I feel like I am repeating myself - plasma and gnome conflicts … when it comes to theme.

Because of users complaining that theming is not consistent.

Thus KDE developers has a helper which Plasma uses to configure gtk based applications using a specified theme - usually the breeze gtk variant - this is done by writing to dconf and change the related gtk.ini files.

With GTK4 it is likely to go from tolerable to bad to worse - because Gnome is forcing a limit on theming.

That is how it is. The only way is by having separate homes for the user on each DE and then symlink relevant folders into those home folders.

There is a package kde-gtk-config which is part of this. The xsettingsd may also be a part of it.

You can likely remove them but in doing so you will loose the ability to control the theming for gtk applications with Plasma and you may only make it much worse than before.

I have fought many battles with theming between qt and gtk - never fully successful.

Have the two systems sharing the same .config is a recipe for disaster - live with it.

2 Likes

I solved both problems by creating a systemd script that symlinks from kde-specific and gnome-specific directories to the expected directory during startup. Since I still don’t know what specific files and directories are clashing between KDE and Gnome, I’ve checked the modification dates in my .config directory after logging into KDE twice. The list of directories is part of the script:

#!/bin/bash

# This script looks for a desktop environment (DE) specific directory in all home directories and creates/updates symlinks to the path where the DE expects them. If a real directory is present, nothing will be changed. This allows you to have a KDE specific dconf and a Gnome specific dconf residing in the same .config directory in a shared home partiton.

# Set the DE postfix to symlink with (either ".gnome" or ".kde" or another DE clash you want to avoid)
PREFERRED_POSTFIX=".kde"

# The directories to handle
declare -a DIRECTORIES=(
    ".config/xsettingsd"
    ".config/dconf"
    ".config/gtk-4.0"
    ".config/gtk-3.0"
)

# The directories to ignore
declare -a IGNORE_DIRS=(
    "/home/lost+found"
    "/home/shared"
)

# Given a user's home directory and a DE config directory, this function will look for the given directory postfixed with PREFERRED_POSTFIX and symlink to it.
handle_directories() {
    local USER_HOME="$1"
    local DIR="$2"

    FULL_DIR_PATH="${USER_HOME}/${DIR}"
    FULL_POSTFIX_PATH="${FULL_DIR_PATH}${PREFERRED_POSTFIX}"

    if [ -f "$FULL_DIR_PATH" ]; then
        echo "Error: $FULL_DIR_PATH is a file, not a directory. Skipping."
        return
    fi

    if [ -d "$FULL_DIR_PATH" ] && [ ! -L "$FULL_DIR_PATH" ]; then
        echo "Error: $FULL_DIR_PATH exists but is not a symlink. Skipping."
        return
    fi

    if [ ! -d "$FULL_POSTFIX_PATH" ]; then
        echo "Error: No valid configuration directory found for $FULL_DIR_PATH with the preferred postfix."
        return
    fi

    # Remove existing symlink if it exists
    [ -L "$FULL_DIR_PATH" ] && rm "$FULL_DIR_PATH"

    # Symlink DE specific settings directory to expected directory
    ln -s "$FULL_POSTFIX_PATH" "$FULL_DIR_PATH"
    echo "Symlink updated for $FULL_DIR_PATH to $FULL_POSTFIX_PATH"
}

# Update symlinks for all users in /home
for USER_DIR in /home/*; do
    # Remove trailing slash
    USER_HOME="${USER_DIR%/}"

    # Check if the user directory is in the ignore list
    ignore=false
    for IGNORE_DIR in "${IGNORE_DIRS[@]}"; do
        if [ "$USER_HOME" = "$IGNORE_DIR" ]; then
            #echo "Ignoring directory: $USER_HOME"
            ignore=true
            break
        fi
    done

    if [ "$ignore" = true ]; then
        continue
    fi

    # Update symlinks for all directories from array
    for DIR in "${DIRECTORIES[@]}"; do
        handle_directories "$USER_HOME" "$DIR"
    done
done

Anything else that was causing issues for you? I have had this setup now for roughly two years and apart from the cursor and icon theme issue, everything else worked fine.

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.