Quick way to switch from KDE to GNOME or viceversa

by on September 7, 2006 · 18 comments· LAST UPDATED November 9, 2007

in , ,

This tip is submitted by reader Zacharie:

switchdesk is the command to switch from KDE to GNOME or viceversa. This command provides a simple method of choosing between the various desktop environments available under Fedora Core, Cent OS and Red Hat Enterprise Linux.

If X Windows is running, switchdesk will bring up a dialog box which allows the user to choose between the available desktops installed on the system.

Task: To switch from GNOME to KDE, use the command

$ switchdesk kde

Task: To switch from KDE to GNOME, use the command

$ switchdesk gnome

Please note that file ~/.Xclients, ~/.Xclients-default stores the currently selected desktop.

A note about other distros/BSD

switchdesk is RedHat and friends only command. If you are using different Linux distribution or FreeBSD, open ~/.xinitrc file and type full path to your desktop manager. For example, to use xfce4 desktop:
$ vi .xinitrc
Append following line (your path may be different use, which command to get exact path):

Save and close the file. Enjoy new desktop.

While login you will see option for different desktops (provided that all of them are installed). Usually this is located below Username / password box or lower left button. Just select appropriate desktop (KDE/XFC4 etc).

Load KDE while running Gnome

You can load KDE while running Gnome desktop (thanks to sweta for pointing it out):
Just open your gnome terminal and type the command:
$ startkde &

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 18 comments… read them below or add one }

1 n00b September 7, 2006 at 11:03 pm

excellent tip. I am using fedora core 5 and switch desk is good for swithing desktops


2 ubuntus September 8, 2006 at 8:48 pm

any way this can be used on any of the UBUNTU variants?


3 Alejandro September 9, 2006 at 12:11 am

great tip…but it’s “X Window” isn’t it?


4 Homericious September 9, 2006 at 4:00 am

Foul! Doesn’t work! Command isn’t found and can’t be installed via “apt-get”. Not a standard X command!


5 nick September 10, 2006 at 7:34 pm

I’d like to see Gnome and KDE Running at the same time using XGL – imagine ctrl and the desktop swizzles round in all its XGL glory with a different desktops on different faces of the cube. That would be really sweet!


6 delfick September 12, 2006 at 10:38 am

once using the startkde command, how do I close kde and return to gnome?

also it doesn’t close gnome, as i can still see and use the gnome-panel

also, would it even be possible to have kde on one face of the cube, and gnome on the other?


7 Skyler Sully February 28, 2007 at 5:17 am

Well, I know this is a little late and wrong, but the answer to quitting kde after you start it with the startkde command is:

> kdeinit_shutdown


8 charl January 13, 2009 at 8:26 pm

you didnt answer all the questions and problems, I also dont have the switchdesk command on my system


9 jec January 22, 2009 at 8:50 am

Thanks! worked perfectly!


10 John Doe January 24, 2009 at 5:47 pm

The problem I have is that Fedora 10 is telling me:
bash: switchdesk: command not found


11 2pac February 1, 2009 at 2:34 pm

John Doe: as root, run: yum install switchdesk
Press “Y” when you get asked to install packages…

Then you will have switchdesk :)


12 Mukul April 24, 2009 at 12:39 pm

How to know through command line which GUI i m in linux ..

Like If i am using KDE, it should say it


13 zouhei December 2, 2009 at 3:58 pm

thank you so much for this article , it helped me a lot in my school work


14 Jake January 6, 2011 at 6:59 pm

@ Homericious

Same thing happening over here.


15 jitender April 27, 2011 at 9:59 am

i have redhat5. how can i install vlc player


16 Gonz August 30, 2011 at 4:11 pm

i can’t quit kde using de command kdeinit_shutdown. it says: Warning: connect() failed: : No such file or directory
Error: Can’t contact kdeinit!

what should i do?


17 pravin wanjal January 10, 2012 at 11:01 am

really its nice…


18 pravin wanjal January 10, 2012 at 11:02 am

the command switchdesk gnome didnt worked correctly what should i do?


Leave a Comment

Tagged as: , , , , , , , , ,

Previous post:

Next post: