Changing Desktop Environment end's in complete mess


since I am not fully happy with the Gnome 40 Desktop Environment, I tried to install KDE Plasma, which I have used until around 2 Years ago. First thing was yust to test, if I want to go back or not.

So I installed it with:

sudo dnf -y group install "KDE Plasma Workspaces"

So far, everything looked good, I haven’t really checked the Output, just done a reboot and on the login I choosed “Plasma (Wayland)”.
First was, that my Nextcloudclient wanted a new authorization and opened my browser (firefox), then I noticed, that there was no desktop. There were running apps (firefox), and Ctrl+Alt+T opened the terminal, but e.g. Super+D brought me to a black Screen, nothing to see. Alt+Tab broght me back to firefox. So something was working there, but not everything.

Retried it with “Plasma (Xorg)”, but it was all the same.

After a reboot, I logged in with Gnome and rerun the above command. There it shows missing Pakets, which seemed to be outdated in the Group.

Keine Übereinstimmung für Gruppenpaket "k3b-extras-freeworld"
Keine Übereinstimmung für Gruppenpaket "xorg-x11-drv-armsoc"
Keine Übereinstimmung für Gruppenpaket "plasma-workspace-xorg"

At this Point I thought, I will try this again on another day, when there is more time for troubleshooting. To clean up I run the following command:

sudo dnf -y group remove "KDE Plasma Workspaces"

And here the hell started. It not only removed what was installed prevously but also several core elements like network-manager, audio librarys and so on. After a reboot, there was no Internetconnection and even Firefox was removed.
So I reinstalled the “KDE Plasma Workspace”, rebooted, and then had to reinstall Firefox (don’t have checked deeply, if something else is missing and if everything works like audio, but a browser was the core element for troubleshooting via research).

After this, I have some questions, which I hope, you could answer:

  1. What went wrong on installing KDE?
  2. Why does removing the previously installed package nearly ruins my complete setup (seems clear, that the KDE groups references everything needed and removing the group also deletes everything what would have been installed, if it not already was there, but there should be a kind of safetynet I think)?
  3. How can I install KDE safely and
  4. How can I remove all the KDE stuff, if I come to the point, that I stay at gnome and don’t want all the stuff on my disk (and don’t want to update all the kde-packages day by day, because I’m not needing them)?

You can undo specific DNF transactions to restore original state of the system:

A few things:

  • Installing a new DE in any distro isn’t usually a simple plug and play operation.
  • When switching DEs part of the problem is you have all the settings from your old DE in your home directory which can sometimes cause problems. They are usually resolvable but if you aren’t comfortable working through minor issues it may be better to create a new user account.
  • Uninstalling a DE is much harder than installing a DE. The reason is exactly what you found. The DEs share packages. When you uninstall group, it removes the packages in that group.
  • When you noticed it removed too many packages when you were trying to switch to back gnome, I think it would have been better to install the gnome group, instead of the kde group to repair it.

That being said, I have had tremendously good luck with switching DEs on Fedora in the past. The trick for me has been to use the dnf swap command. This lets you switch one package/group with another. The advantage of using this method is that it properly deals with the situation of shared packages between the groups. Of course, there will still be some minor cleanup needed. Here is what I usually use:

sudo dnf swap @gnome-desktop @kde-desktop

That removes gnome and installs kde in a single transaction.

You could probably switch the entire desktop environments with: This doesn’t work easily, see the below post for more info and an alternative.

sudo dnf swap @workstation-product-environment @kde-desktop-environment

I haven’t tested that latter command myself. Although, it sounds like a fun experiment and I am going to try it in a VM now. :nerd_face: EDIT: I tried it, see below.

That being said, before you start again I would do as @vgaetera suggested and roll your system back to a known state before trying again.

Alternatively, you could just reinstall using the KDE version of Fedora.

1 Like

You can also check before removing with:
dnf group info "KDE Plasma Workspaces"

As mentioned from @dalto , installing in a VM would be much saver.
As alternative you can also use the live image to do tests … booting from a live.iso in a VM lets you use both environments at the same time.

To fix it, might be that you compare the desktop packages , sort them and check with uniq -d for duplicates:

$ sort desktop | uniq -d
   Common NetworkManager Submodules
   Firefox Web Browser
   Guest Desktop Agents
   Hardware Support
 Mandatory Groups:
   Printing Support

quite a lot in common !

Last but not least, do not use the parameter -y when using dnf

OK, so now I have tested it. It isn’t easy to get working because dnf can’t resolve the dependencies.

However, this worked fairly easily:

sudo dnf swap @gnome-desktop @kde-desktop-environment

A few notes:

  • gnome-shell is protected so if you want to remove it you need to rm the related file in /etc/dnf/protected.d before running dnf.
  • The swap command left a few things behind so I cleaned them up with sudo dnf "*gnome*" "*gdm*". Be careful to review the list of what that will remove if you want to keep any gnome-related software
  • Don’t forget to enable sddm - sudo systemctl enable sddm.service --force
  • All my testing was done against a clean install. Since every system is different, you could get different results depending on the state of your particular system.
  • kde-desktop-environment and "KDE Plasma Workspaces" are the same thing. I just find it easier to deal with the version without spaces and mixed case letters.

Thanks for your help so far.
What I wanted was, to have the chance to choose at the loginscreen, if I want to use Gnome or KDE.
I used KDE for some years before changing to gnome, so in general, I know the DE and just wanted to have the ability to test myself, if I want back to KDE, since Gnome 40 has make some changes, I simply don’t like. But there was a reason to change from KDE to Gnome, so I not just wanted to change back.

At this point, I simply want to clean up my system as it was, before I messed it up. At a last chance, I could reinstall the system, home is a seperated partition, so the only thing would be to reinstall what is needed and uninstall, what is not needed. But this would be a task for the end of the month, because of planned holidays.

What I did to this point after your hints:

  1. I tried to undo the dnf transactions, but this failed because of some missing packets. I think this is, because while I was working at a restart there where several automatic updates and maybe they messed it up, I don’t know.

  2. I uninstalled the KDE-Group, rebootet and then installed 2 other Groups (Internet was working via Ethernet after uninstall luckily):

  • Fedora Workstation
  • Fedora Betriebssystem

At this point, everything looks fine except 2 Points:

  1. The not so important one: There are some Apps reinstalled, I need to remove again like Cheese, Boxen, …
  2. At Login, I just have to choices left, where there where 3 before: “Gnome” and “Gnome Classic”. “Gnome with Xorg” is missing.

Point 2 is not so nice, because I normally use Wayland, but for PCSX2 (Playstation 2 Emulator) I needed the Xorg-Version, because the nvidia drivers didn’t work properly for this app under Wayland (so under Wayland emulation fails).
Would be very nice, if somebody has an idea about that.

For the KDE-Test I will do some research, if I can change what I don’t like with Gnome 40 via extensions (which sometimes simply are turned of after booting, didn’t found a pattern, when this happens), for example to bring back my dock on the desktop.
And then in a few weeks I will see, if I reinstall the system with KDE or Gnome.