This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Launch SDDM login screen on kdestart

Tags: None
(comma "," separated)
nboskov
Registered Member
Posts
7
Karma
0

Launch SDDM login screen on kdestart

Wed Jun 20, 2018 11:41 am
I'm an Arch Linux user who tries to set up login screen on bootup.

My current installation starts KDE using startkde at the end of .xinitrc. However, it just starts the splash screen and immediately shows the session. It does not require the one who booted the system to type in the password. Nevertheless, it does so when system wakes up from the suspend state. Everything I found on the Arch Wiki is https://wiki.archlinux.org/index.php/SDDM#Autologin and it doesn't help much since addition of the
Code: Select all
/usr/bin/qdbus-qt4 org.kde.screensaver /ScreenSaver SetActive true &
at the end of .xinit, just after startkde, doesn't change anything.

Intuitively, how to start SDDM login screen immediately after the splash screen on bootup?
airdrik
Registered Member
Posts
1854
Karma
5
OS
Reviewing the linked SDDM issue, it looks like perhaps the instruction should be to put: export DESKTOP_LOCKED=yes in your ~/.profile

That is assuming you want it to automatically start your session when you first boot up, but still require you to log in (in which case you would enter your password into the plasma lockscreen instead of into SDDM, though the two are usually themed to look similar). If you just want to start SDDM on boot and then not start your session until you log in, then you should leave the autologin stuff disabled.


airdrik, proud to be a member of KDE forums since 2008-Dec.
nboskov
Registered Member
Posts
7
Karma
0
I saw that thread on GitHub and setting the environment variable doesn't work.

Problem is that all the autologin stuff is already turned off (or at least all the stuff that I am aware of):
- there is no /etc/sddm.conf.d/autologin.conf, since there is no /etc/sddm.conf.d at all
- find / -type f -iname autologin.conf finds nothing
- System Settings -> Login Screen(SDDM) -> Advanced -> Auto Login isn't checked
- System Settings -> Account Details -> User Manager -> Log in automatically isn't checked
airdrik
Registered Member
Posts
1854
Karma
5
OS
So back to the second question I posted: Do you want it to auto-start your KDE session when you boot (but initially locked), or are you just trying to get SDDM running so that you can log in (and have it start your KDE session after you've logged in)? (it sure sounds to me like you are just trying to get SDDM running but are getting lost in the weeds trying to deal with not necessarily wanted auto-login)


airdrik, proud to be a member of KDE forums since 2008-Dec.
nboskov
Registered Member
Posts
7
Karma
0
It does not require the one who booted the system to type in the password.


I want to force one who boots the system to type in the password prior to KDE session being shown.
From that perspective both things you mentioned are equal.
Anyway, let assume that I want to boot into a SDDM login screen.
nboskov
Registered Member
Posts
7
Karma
0
Also, I just found this viewtopic.php?f=225&t=139913
Although, it looks like a hasty hack. I am wondering what Kubuntu and others do to achieve the simple effect of requiring password upon boot up.
airdrik
Registered Member
Posts
1854
Karma
5
OS
It sounds like you may have been chasing a rabbit hole that you don't need to. You shouldn't need to set up auto-login+locking the session in order to get a login prompt on startup.

By default with a display manager (DM) like SDDM, the default setting is that the DM will start on boot and prompt for the user to log in, providing options for the user to select which session they want to use (e.g. KDE's Plasma Desktop, Gnome-Shell, LXDE, etc. Usually this is presented as an icon somewhere on the login screen).

Going back through the Arch wiki instructions for setting up SDDM, you should double-check that you have SDDM installed and configured per the display manager setup page. Of note, the only mention of the startkde command should be in the appropriate file in /usr/share/xsessions/ (so that on boot it shouldn't launch into the KDE desktop, but should launch into the SDDM login screen).

If after you have that set up and working you can revisit setting up autologin if that appeals to you (though really the only difference is whether the few seconds or so that you wait for the desktop to load happens before or after you log in).


airdrik, proud to be a member of KDE forums since 2008-Dec.
nboskov
Registered Member
Posts
7
Karma
0
The problem was that I had startkde in my .xinitrc. After deletion it works satisfactory good.
Although sddm login theme loaded at boot up is completely different than one loaded at later logouts.
airdrik
Registered Member
Posts
1854
Karma
5
OS
Hmm..
The first thing that comes to mind is that the initial display manager theme used when nobody is logged in (or logging in as a different user) is provided by SDDM, while the theme used when you lock your session is provided by Plasma (note: locking != logging out; when locking your session, your session and all apps are still running but is password-protected, while logging out ends your session, closing any running apps and returns you to the original login screen). The two are themed separately but there are themes you can get to make them look and feel similarly. In fact, there are a few look-and-feel themes you can install from store.kde.org (using Plasma Discover or System Settings -> Look And Feel -> Get New Themes) which bundle both the plasma theme and a matching SDDM theme.

If as you suggest the SDDM theme is different from when you first boot and when you log out (ending the session and returning to the SDDM login screen). that is unexpected and you might post a bug report to SDDM to get that fixed. Screenshots will be welcome.


airdrik, proud to be a member of KDE forums since 2008-Dec.
nboskov
Registered Member
Posts
7
Karma
0
To sum up, it works well.
My issue lay in sddm.service - it wasn't enabled. After enabling it, sddm does what it suppose to - starts its log in screen on startup. Pretty simple.

On theming, kde's lock screen theme and sddm's login screen are different things, though in most cases there is a sddm theme that resembles kde lock screen theme. Default Breeze theme has its counterpart in sddm's theming which is included in the Breeze theme package.

In my case, although I had selected Breeze sddm log in screen theme it still used a default sddm screen which didn't correspond to the lock screen. After altering sddm's theme to another one, then rebooting, and then returning sddm's theme back to Breeze, everything works fine. Both kde's lock screen theme and sddm's login theme are similar (not identical).

Thank you airdrik for the explanations and help.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]