Making a clean switch from GNOME to KDE

I want to experiment and find a way how to cleanly switch from GNOME to KDE, without creating a new user profile etc.

Packages

To make this simple, I will use Atomic Desktops as base, so the packages change will just be a rpm-ostree rebase.

But the issues are in the mutable areas, and I want to clean them up as much as possible.

File Additions

KDE Plasma will install default configurations for all it’s apps, and also the fonts (currently Noto Sans) and icons (Breeze).

So nothing needs to be added manually, it will create them all from a template somewhere.

File Deletions

So now let’s find all things we need to remove to make this smooth.

I want to avoid GUI stuff like “remove all GNOME extensions” and instead do this via CLI, which can be scripted.

Logout

First you should logout of your GUI session to prevent from removing desktop components while in use.

gnome-session-quit --logout --no-prompt

Then exit to TTY, by using Ctrl+Alt+F2

Login with your username and password.

Extensions

Simply remove the entire directory

rm -rf ~/.local/share/gnome-shell

Icons

rm -rf ~/.icons #deprecated
rm -rf ~/.local/share/icons
rm -f ~/gtkrc-2.0

Fonts

rm -rf ~/.fonts #deprecated
rm -rf ~/.local/share/fonts

Flatpaks

Only removing unneeded apps. All the others are choice, and GNOME apps on KDE work fine.

flatpak remove --delete-data -y extensionmanager flatseal
flatpak remove --user --delete-data -y extensionmanager flatseal

Do you intend to clean up DE bits in $HOME, as well? Otherwise, you’ll have obsolete config there.

1 Like

Yes this is exactly the goal.

Do you know more?

I know this will be difficult :slight_smile:

In fact, this is one of the reasons why naming our os-tree-imaged based variants “atomic” is more true than naming them “immutable”. You have config and data in /etc and /var which typically stays put if you change or remove a package, but at least you can typically trace its origin. You also end up with config in each $HOME/.config (or, even worse, somewhere non-XDG-conformant). Tracking that will be difficult unless you manage it meticulously in git or such. Basically, you would have to distinguish between “desktop environment config” (possibly including DE specific apps) and “app config” (non DE-specific).

1 Like

You know we have something like git but for binaries…

I dont know if it could be used for the mutable directories.

I think non-XDG-conformant things get rarer, not more frequent. So tracking this should be possible.

I guess there are multiple tools to track filesystem changes?

Git could be used too. It doesnt want to clone to a nonempty dir poorly, but this could be worked around.

Git

sudo useradd gnome
sudo passwd gnome
su gnome


cd
git init ~

cat > .gitignore <<EOF
.tmp
.cachd
EOF

git add .
git commit -m 'first stage'

Then login to GNOME the first time, open all apps, do an upgrade etc.

git add .

git status

should work? Havent tried