How to change default window manager?

General support questions
Slonobassik
Posts: 1
Joined: 2013/09/22 18:40:12
Contact:

How to change default window manager?

Post by Slonobassik » 2013/09/22 19:00:18

How to change default window manager from GNOME to KDE?

tigalch
QA Team
Posts: 522
Joined: 2012/06/23 17:28:41
Location: Austria

Re: How to change default window manager?

Post by tigalch » 2013/09/23 17:42:35

Hello and welcome to the fora.

yum groupinstall 'KDE Desktop'
should do the trick

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

How to change default window manager?

Post by TrevorH » 2013/09/23 18:08:31

I seem to remember there's also an /etc/sysconfig/desktop file that needs the preferred window manager specified if more than one is installed.

centkfoster
Posts: 4
Joined: 2013/11/03 22:43:43

Re: How to change default window manager?

Post by centkfoster » 2013/11/03 22:50:01

There is something broken in 6.4 as to getting KDE to run. I did use the livedvd install if that makes a difference - but I'm seeing posts all over about this issue so I'm not sure it it matters that I used the livedvd.

The gdm login screen no longer has a 'Session' option to select KDE as the desktop.

Normally I could edit the /etc/sysconfig/desktop file and that would do the trick. Not now. I've even read of others that once they get kdm as the login screen then it will no longer accept their password - it keeps returning to the login screen. That happened to me also.

Using startkde would give a message that it couldn't open up DISPLAY - I then set export=DISPLAY=:0.0 and ran startkde but no dice.

To make it work - and this is just a hack - I set the runlevel in /etc/inittab to 3:

x:3:respawn:/etc/X11/prefdm -nodaemon

Next I created ~/.xinitrc with only one line:
startkde

Next reboot - or kill your X session completely. Then:

startx

This as I said is a hack - but at least I got KDE going. And no - I am not a CentOS newby by any means - something is broke or changed.

ken
Posts: 1
Joined: 2013/12/23 05:21:08

Re: How to change default window manager?

Post by ken » 2013/12/23 05:32:13

What I did was to edit /etc/X11/prefdm.

Look for the following near the top of the file:

# Run preferred X display manager
quit_arg=
preferred=


Change to

# Run preferred X display manager
quit_arg=
preferred=/usr/bin/preferred display manager

This will change the window manager the login screen uses at least. Beyond that, if multiple desktop managers are installed, you will have to select from the the session dropdown to enter the appropriate one after login.

Most likely, unless there is a fix, you will have to do this again after a version upgrade.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to change default window manager?

Post by TrevorH » 2013/12/23 08:18:29

If you read the code that follows that you would see that it proceeds to read /etc/sysconfig/desktop and set preferred to whatever DISPLAYMANAGER= is set to. So the supported and non-breaking method of doing this is to edit the config file /etc/syconfig/desktop and set DISPLAYMANAGER= to what you want to run
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

bigal
Posts: 80
Joined: 2009/10/16 19:51:26

Re: How to change default window manager?

Post by bigal » 2014/02/27 08:02:02

Thank you ken » 2013/12/23

I made a backup of the origianl file first though
ken wrote:What I did was to edit /etc/X11/prefdm.

Look for the following near the top of the file:

# Run preferred X display manager
quit_arg=
preferred=


Change to

# Run preferred X display manager
quit_arg=
preferred=/usr/bin/preferred display manager
What bothered me a bit was that, after a reboot, when my login screen appeard there still were not any options available. They did not appear until I selected my username. Quite reasonable when you thing about it. There is an added bonus to this that has not been mentioned. You now get an additional option, and that is to change the default language. In my case that was good as the default from the installation was English (US) whereas I use English (UK)

Excellent.

Alan

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to change default window manager?

Post by TrevorH » 2014/02/27 08:10:18

Still the wrong solution. Restore your backup and edit /etc/sysconfig/desktop and add a line to it if it isn't there that says

Code: Select all

DISPLAYMANAGER=/usr/bin/gdm
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

bigal
Posts: 80
Joined: 2009/10/16 19:51:26

Re: How to change default window manager?

Post by bigal » 2014/02/27 12:18:35

Wrong or not at least it worked (for me any way).

Although the other solution worked I will change it as you suggest as you know far more about these things than I; coding is still mostly a mystery to me - at the moment. What little I do know is that I think it is possible to add your line in the incorrct place in the coding. I know that sometimes placing of code can be important. So, before I go ahead can you confirm exactly where I should add your line please.

Alan

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to change default window manager?

Post by TrevorH » 2014/02/27 15:47:12

The reason it is wrong is that the file you modified will be replaced if ever there is an update to the package that owns it. The file I mentioned is known by rpm/yum as being a configuration file so they will not replace it if an update comes along, they will create a /etc/sysconfig/desktop.rpmnew file and it's then your responsibility to look at it and work out if there are changes that should be integrated into your copy. Usually there won't be. The file you modifed reads the /etc/sysconfig/desktop file and uses that to work out if DESKTOP is already set and if it is then it just uses what you put there and skips the part of the code you had to change.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply