Lock screen at startup? (openSUSE 12.1, KDE 4.8)

Hi, is there anyway to lock the screen at startup? openSUSE starts straight away to the desktop and everyone can use my machine without problem, I want to prevent that.
Thanks :slight_smile:

I’m not aware that there is

You can disable the AUTOLOGIN, so that on startup it shows a login screen.

Yast → /etc/sysconfig → Desktop → Display Manager → DISPLAYMANAGER_AUTOLOGIN

In Yast gui it’s a bit hidden: Security & Users > select user in Users tab (usually the first) > Advanced Options drop-down button at bottom right corner > Login Configuration > uncheck automatic login and login without password.

Thanks, it worked.

I have thought about another way around. I have found lock screen command and I put it into boot.local but it does not lock the desktop at startup. Why?
lock screen command:

**/usr/lib/kde4/libexec/kscreenlocker --forcelock

**

I think things in boot.local happen in level 3, before X (and KDE) kick in. Perhaps it will work better if you put it in ~/.kde4/share/autostart/.

You can also do this in System-settings>Startup and Shutdown>Startup

It does happen before X starts.

boot.local Here, enter additional commands to execute at boot before changing into a runlevel. It can be compared to AUTOEXEC.BAT on DOS systems.
The SuSE Linux Boot Concept
Your idea of autostart is a good one.

Thanks for the information!
I usually use Autostart to put script in, but it does not save my script. It does not create any script in ~/.kde4/share/autostart/ and no script in Startup and Shutdown>Startup also, maybe a bug. I have to create a startup script in the folder manually.

Oh I just know that there are some directories called “autostart”:

  • ~/.kde4/share/autostart
  • ~/.kde4/Autostart
  • usr/share/autostart
    So what is different between them???

I’ve noticed this in 4.7 where scripts supposed to run at shutdown were in fact placed at the autostart directory. Forget the GUI, just place your script in the right folder. Then your script will show in system-settings.

I think this may be fixed in 4.8, but I didn’t test.

Why three question marks??? :slight_smile:

One is for the current KDE user only, the other may apply to all KDE users or is a leftover from a previous KDE version, I’m not sure, and the last has the services started by KDE. Make some testing if you want to be sure.

When I am curious and can not find way to explain something, I usually type many question marks =]]
I am putting a *.sh file in ~/.kde4/Autostart and it starts at start up. I will try .kde4/share/autostart to test what would happen =)
I took a look in usr/share/autostart, and I saw services of KDE, their interface, I think, *.desktop files.
There are different runlevels and I am reading about them to know how linux starts, very interesting! =]

I put the following in my boot.local for my virtual desktops that start at boot. It should work for any desktops logged into your username.

( sleep 9 && dcop --user [username] --all-sessions kdesktop KScreensaverIface lock ) &

On 2012-11-19 23:06, Max Rebo wrote:
> I put the following in my boot.local for my virtual desktops that start
> at boot. It should work for any desktops logged into your username.

Any desktop? Including gnome, xfce, etc?

–
Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))