I want to change default Desktop environment from GNome to KDE.

My asking is for CentOS 7, I was Trying with

How to install Desktop Environments on CentOS 7?

# echo "exec startkde" >> ~/.xinitrc
# startx

Efectively KDE Environments Starts

But, Restarting, Again I have Gnome.

I want Restarting starting with KDE.

Where I can change deafult Desktop Environment?

PD. Solution for CentOS 6.x doesn't work!

1 Answer 1


In CentOS 7, there is a file /etc/X11/xinit/Xclients in which the default desktop will be checked. It will look for a file /etc/sysconfig/desktop. Therefore, we can simply create this file (/etc/sysconfig/desktop) and put the content DESKTOP=KDE. For next login, the KDE desktop environment will be used automatically.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .