How to install a specific desktop environment on Fedora 38

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
2,397
Reaction score
2,089
Credits
18,438
This is fairly basic, and Fedora old timers have known about this for a while.
But recently I was asked how to install a desktop on Fedora with no GUI already installed.
Simply use the appropriate command below ( don't forget the quotes ).

dnf group install -y "KDE (K Desktop Environment)"

dnf group install -y "LXDE Desktop"

dnf group install -y "Xfce Desktop"

dnf group install -y "LXQt Desktop"

dnf group install -y "Cinnamon Desktop"

dnf group install -y "Sugar Desktop Environment"
(also known as SOAS)

dnf group install -y "Deepin Desktop Environment"

dnf group install -y "Budgie Desktop"

dnf group install -y "Basic Desktop"

dnf group install -y "i3 desktop"

dnf group install -y "Sway Desktop"

dnf group install -y "Phosh Desktop"
( this is mostly for mobile/tablet devices )

dnf group install -y "GNOME Desktop Environment"

dnf group install -y "MATE Desktop"


You can install any of these desktops on Fedora Server, in fact you can have several different ones installed at the same time.
Also just because you downloaded the MATE version of Fedora Workstation, doesn't mean you can't install KDE on the same system.
Now I have installed 4 or 5 different desktops on the same computer, but be warned not all desktops are 100% compatible with
each other. Gnome in particular likes to own the desktop space. I've installed MATE, KDE, and Budgie with no problems.
But when I install Gnome, the computer doesn't like me to switch back to other desktops.

For some of these, it's a two step process. For example, after you install MATE or Budgie,
you will also want to install...

dnf group install -y "MATE Applications"

or..

dnf group install -y "Budgie Desktop Applications"

Now if you are doing this from the command line, you can test the install, simply by typing

startx

Some desktop complain about you starting them as root, so you may have to su to a different user.

OK, so how do I make the GUI automatically start up every time I reboot my computer?
Run this...

systemctl set-default graphical.target

and then reboot. The GUI will be there when the system boots up.
if you want to switch back to command line mode.

systemctl set-default multi-user.target

and then reboot.
 
Last edited:


Can you share how to remove the original desktop environment after you have installed the new one, if you figured how to do that. I recently moved from KDE to Plasma and had installed the KDE Plasma Spin. When I tried to remove KDE Plasma after installing Gnome it failed even after having removed the plasm-desktop restriction, so I ended up reinstalling to get rid of KDE Plasma. The other option is to install the server spin but that installer doesn't have btrfs as a filesystem option.
 
When I tried to remove KDE Plasma after installing Gnome it failed even after having removed the plasm-desktop restriction, so I ended up reinstalling to get rid of KDE Plasma. The other option is to install the server spin but that installer doesn't have btrfs as a filesystem option.

That's a good point. It does depend on which "spin" installer you use.
However, usually ( at least in case I have tried so far ) it doesn't matter which file system
I used for my base install, I can always install any desktop environment after the fact, even
if it doesn't support my file systems "out of the box" so to speak.

I guess I've never tried to install brtfs on a server. That would be a good challenge I think.
I have an idea, I'm going to test, hopefully sometime today.
But as for Gnome owning the desktop, I did give a warning above. I don't know how to get around that
particular one.

But I have been able to remove Xfce or Budgie from a MATE system. ( I mean while leaving MATE installed ).
I have found that for the "two piece" installs, it works best to remove them both at the same time.

dnf group remove -y "Budgie Desktop Applications" "Budgie"
 
In "/etc/dnf/protected.d" there are a bunch of files that are protected, for example.
Code:
cat /etc/dnf/protected.d/fedora-workstation.conf
NetworkManager
gnome-shell
Or in case of the KDE Spin it will container "plasma-desktop", you can delete it but then it the end the original spin desktop environment still doesn't get removed. I'm not planning on switching again anytime soon since I am quite happy with Gnome now. But it would be less of a hassle if they made it easier to switch around the different DE's without having to reinstall. I may play with it in a vm when I have more time. But since you started the topic I thought I would ask.
 
I do see btrfs as an option, at least on the server-netinst iso.
 
I do see btrfs as an option, at least on the server-netinst iso.
I now see that I might have grabbed the dvd last time, I will try the netinstall since I didn't see there was also an iso for that.
 
I recently moved from KDE to Plasma and had installed the KDE Plasma Spin. When I tried to remove KDE Plasma after installing Gnome it failed even after having removed the plasm-desktop restriction, so I ended up reinstalling to get rid of KDE Plasma. The other option is to install the server spin but that installer doesn't have btrfs as a filesystem option.

When trying to remove KDE Plasma, make sure you've removed the right packages and their dependencies. One way to do this is by using the following commands:

Code:
sudo apt-get purge kde-plasma-desktop kde-standard
sudo apt-get autoremove

These commands will remove the kde-plasma-desktop and kde-standard packages, as well as any orphaned packages that were installed as dependencies but are no longer needed.

Alternatively, you can try using the tasksel tool to remove KDE Plasma:
  1. First, install tasksel if it's not already installed:
Code:
sudo apt-get install tasksel
  1. Run tasksel with sudo:
Code:
sudo tasksel
  1. In the list of tasks, deselect the option for KDE Plasma by using the arrow keys to navigate and the spacebar to deselect the item. Press Enter to apply the changes and remove KDE Plasma.
After removing KDE Plasma, you might also want to remove any leftover configuration files from your home directory, like ~/.kde, ~/.config/plasma-*, etc. You can remove these directories with the rm command:

Code:
rm -rf ~/.kde ~/.config/plasma-*

If you still face issues with removing KDE Plasma after trying these steps, you may need to manually identify and remove packages and configuration files associated with KDE Plasma.

Regarding the server spin installer not having Btrfs as a filesystem option, you could install the server edition and then set up Btrfs manually after installation. Alternatively, you can use a different installer that supports Btrfs, such as the Calamares installer, if available for your distribution.

Always remember to backup your important data before making significant changes to your system, like removing or installing a desktop environment.
 
These commands will remove the kde-plasma-desktop and kde-standard packages, as well as any orphaned packages that were installed as dependencies but are no longer needed.
This doesn't work for Fedora, since certain desktop-environment packages are protected by dnf on the fedora spins.
 
This doesn't work for Fedora, since certain desktop-environment packages are protected by dnf on the fedora spins.
have you tired

Code:
sudo dnf group remove "KDE Plasma Workspaces"
sudo dnf autoremove
 
I now see that I might have grabbed the dvd last time, I will try the netinstall since I didn't see there was also an iso for that.
Looks like the server edition does except that it's hidden under a drop-down menu device type instead of being able to select it as filesystem.
 
have you tired

Code:
sudo dnf group remove "KDE Plasma Workspaces"
sudo dnf autoremove
Will try it in a vm but most likely not since that dnf protection is still in place.
 
Will try it in a vm but most likely not since that dnf protection is still in place.
You can bypassed it by using the --allowerasing flag. However, it's essential to use this flag with caution, as it can potentially remove critical system packages and cause instability.

Code:
sudo dnf remove @kde-desktop-environment --allowerasing
 
You can bypassed it by using the --allowerasing flag. However, it's essential to use this flag with caution, as it can potentially remove critical system packages and cause instability.

Code:
sudo dnf remove @kde-desktop-environment --allowerasing
I know of it's existence but never tried using it.
 
You can bypassed it by using the --allowerasing flag. However, it's essential to use this flag with caution, as it can potentially remove critical system packages and cause instability.

Code:
sudo dnf remove @kde-desktop-environment --allowerasing
Looks like I missed something last time for some reason. The --allowerasing doesn't remove the dnf locks only does resolves the dependencies that need to be removed when using it. After remove /etc/dnf/protected.d/plasma-desktop and then removing "@kde-desktop-environment" KDE Plasma was removed. I missed have missed something last time but good to know it is possible now in case I do want to use KDE Plasma again.
 
Identify the dnf protection configuration file for KDE Plasma, typically located at /etc/dnf/protected.d/plasma-desktop. To remove the protection, you can either delete the file or comment out the relevant lines inside the file.
To delete the file:

Code:
sudo rm /etc/dnf/protected.d/plasma-desktop

Or, to comment out the relevant lines, open the file with a text editor (e.g., nano):

Code:
sudo nano /etc/dnf/protected.d/plasma-desktop

Then, add a # at the beginning of the lines containing the protected package names, save the file, and exit the text editor.

Remove the KDE Plasma desktop environment:

Code:
sudo dnf remove @kde-desktop-environment

Optionally, remove any leftover KDE Plasma configuration files from your home directory, such as ~/.kde, ~/.config/plasma-*, etc. You can remove these directories with the rm command:
bash

Code:
rm -rf ~/.kde ~/.config/plasma-*

Remember to always backup your important data and consider creating a system snapshot before making significant changes to your system, like removing or installing a desktop environment.
 
Identify the dnf protection configuration file for KDE Plasma, typically located at /etc/dnf/protected.d/plasma-desktop. To remove the protection, you can either delete the file or comment out the relevant lines inside the file.
To delete the file:

Code:
sudo rm /etc/dnf/protected.d/plasma-desktop
Is that to add to the OP or for me? If the latter I already knew that since I was talking about it in my last reply?
 
Yes, I usually deal with beginners, although I can tell that you're not one based on the way you communicate. To avoid any confusion, I approach troubleshooting with the assumption that the person I'm assisting may be inexperienced. This ensures that we cover all necessary information and address potential issues effectively or I hope.
 
Can you share how to remove the original desktop environment after you have installed the new one, if you figured how to do that. I recently moved from KDE to Plasma and had installed the KDE Plasma Spin. When I tried to remove KDE Plasma after installing Gnome it failed even after having removed the plasm-desktop restriction, so I ended up reinstalling to get rid of KDE Plasma. The other option is to install the server spin but that installer doesn't have btrfs as a filesystem option.
Best way to uninstall a given desktop, when installed with Dnf, is to use 'sudo dnf history undo xx', where xx is the number of the install in dnf history ... this option only removes the added files ... a way better than 'sudo dnf remove xxx', since with latest some extra dependencies, also necessary for other DE's' will be removed.
 
Best way to uninstall a given desktop, when installed with Dnf, is to use 'sudo dnf history undo xx', where xx is the number of the install in dnf history ... this option only removes the added files ... a way better than 'sudo dnf remove xxx', since with latest some extra dependencies, also necessary for other DE's' will be removed.
I already figured it out. Your suggestion doesn't work if you installed a specific Fedora spin, for example if you installed Fedora KDE Plasma and then install Gnome since then you won't have it in your history. On top of that with Fedora there are protected packages of the installed DE which you have to disable first. After you have disabled the protection then you can remove the old DE running the following for example if your old DE was KDE Plasma.
Code:
dnf remove @kde-desktop-environment
 

Staff online


Top