Headless Manjaro before installing new Desktop Environment

I saw on the wiki of Manjaro that it is not recommended to install multiple desktop environment. But I’m not interested to install both of them. I just want one. My idea is to uninstall completely my actual desktop environment (Gnome) and then install KDE with his complete settings , preference and users.

My question here is, how to do it? Or is it a good solution? Is it possible at all?

Probably drop to TTY to do it.
So after boot, from login screen hit Ctrl+Alt+Fx
(where x is a numeral … F1 or F2 is often assigned to the graphical session - another such as F4 may be used for TTY)
Once there you can login and begin your process of removal and install.
Ex:

sudo pacman -Rns gnome gnome-extras
sudo pacman -Syu plasma
systemctl reboot

(again, just an example, please use whatever commands are pertinent for you)

Will the users be deleted?
And the installed apps and settings will be all deleted?

No, users will not be deleted along with packages.
If that is something you would like to do as well please let us know.

I tried to say more than once it was just an example … I dont know what packages you have installed.
But given the right arguments, yes the packages and their save files will be removed.
I can try and make a list I think would be roughly correct:

sudo pacman -Rns $(curl -s http://0x0.st/Hj1b.txt)

(check out the link first if you want to see the list)

I actually have a tool that could help: Mapare - manjaro package restore

Its what I used to make the list above - it sources the package lists from manjaros gitlab.

You can use it without downloading too … so to install KDE you can run

bash <(curl -s https://gitlab.com/cscs/mapare/-/raw/main/mapare) -i

And input KDE when prompted … it will then download and install the packages you would normally get from a manjaro kde ISO.
If you want to see what it would install first you can use the print function by adding a p:

bash <(curl -s https://gitlab.com/cscs/mapare/-/raw/main/mapare) -ip


Interesting thought though … maybe this query can be turned into a feature for mapare. It can already identify the file lists … so adding a removal function should be rather trivial.

3 Likes