Can SDDM be set to start a set Windows Manager?

I installed the latest ISO of Tumbleweed at the weekend. As I like to alternate between Plasma5 and KDE4 - I installed kdebase4-workspace and replaced the necessary Plasma5 files with those from the brilliant repo at:

http://download.opensuse.org/repositories/home:/wolfi323:/branches:/KDE:/Frameworks5/

All works fine and I have kept SDDM (as I think it looks nicer than KDM). My minor problem is that I use the auto-logon facility and have selected KDE4 as my default windows manager (using /etc/sysconfig/windowmanager). But when I re-start my computer it automatically logs into Plasma5. As a test I swopped SDDM for KDM and that starts KDE4 as expected.

Have I missed something?

SDDM should remember the last chosen session (but only globally, not per user like KDM), so logout and select “KDE Plasma Workspace” (and login), it should then log you into KDE4 on next boot I think.

If that doesn’t work (I haven’t really tried/used SDDM with Auto-Login yet, I don’t use it with KDM either, which still is my preferred DM…), try to manually set “Session=kde-plasma” in /etc/sddm.conf ([Autologin] section).
See “man sddm.conf”:

       [Autologin] section:

       User=  Name  of the user to automatically log in when the system starts
              first time.  Default value is empty.

       Session=
              Name of the session to automatically  log  in  when  the  system
              starts first time.  Default value is empty.

       Relogin=
              If  true  and User and Session are set automatic login will kick
              in again on session exit, otherwise it will work only the  first
              time.  Default value is false.

Alternatively, you can also configure that in systemsettings5’s SDDM config module (Startup and Shutdown->Login Screen (SDDM), or run “/opt/kf5/bin/kcmshell5 sddm”) on the “Advanced” tab.
For that config module, you need to have kcm_sddm installed though.

PS: Apparently it should be “Session=kde-plasma.desktop”, at least that’s what kcm_sddm writes…

And actually I think the default value should be taken from /etc/sysconfig/windowmanager. What did you exactly set there?
It should be:

DEFAULT_WM="kde-plasma"

PPS:

Actually it doesn’t.

I had a look at openSUSE’s sysconfig-support.patch (https://build.opensuse.org/package/view_file/KDE:Frameworks5/sddm/sysconfig-support.patch?expand=1), and it just “hardwires” the Auto-login default to “plasma5.desktop”.

Many thanks for your posts.

I will leave it as KDM then. Not really a hardship as when I want to use Plasma5 I just log-out of KDE4.

Maybe you misunderstood?
You can set the session that’s started on Auto-login in /etc/sddm.conf (or via kcm_sddm). It’s just the default that’s unconditionally set to Plasma5 and not taken from /etc/sysconfig/windowmanager.

Not really a hardship as when I want to use Plasma5 I just log-out of KDE4.

Well, you would have to do that anyway, also with SDDM, if you set Auto-login to KDE4 as you wanted it…
Or am I misunderstanding you now here?

Firstly sorry I was not very clear.

What I am trying to achieve is to use SDDM with auto-logon - loging into a wm other than plasma5 (kde4).

My sddm.cong file shows:

[Theme]Current=breeze
CursorTheme=breeze_cursors


[XDisplay]
ServerPath=/usr/bin/X
SessionCommand=/etc/X11/xdm/Xsession
DisplayCommand=/etc/X11/xdm/Xsetup
MinimumVT=7
[Autologin]
# Autologin user
User=garry

The relevant part of my windowmanager file is:

## Type:    string## Default:
## Path: Desktop
## Description: default mouse cursor theme
#
# Name of mouse cursor theme for X11. Possible themes can be found
# in /usr/share/icons/
#
X_MOUSE_CURSOR="DMZ"
## Path:    Desktop/Window manager
## Description:    
## Type:    string(gnome,kde4,kde,lxde,xfce,twm,icewm)
## Default:    kde4
## Config:      profiles,kde,susewm
#
# Here you can set the default window manager (kde, fvwm, ...)
# changes here require at least a re-login
DEFAULT_WM="kde4"


## Type:    yesno
## Default:    yes

What do I need to change?

Yes, that’s what I understood right from the beginning.

What do I need to change?

Your sddm.conf should look something like this (the added things are marked in red):

[Theme]
Current=breeze
CursorTheme=breeze_cursors

[XDisplay]
ServerPath=/usr/bin/X
SessionCommand=/etc/X11/xdm/Xsession
DisplayCommand=/etc/X11/xdm/Xsetup
MinimumVT=7

[Autologin]
# Autologin user
User=garry
Session=kde-plasma.desktop

Or use kcm_sddm to set that.

Thank you. The change works perfectly.