![]() Registered Member ![]()
|
I see a lot of questions about screen locking kde but they are all answered with GUI based resolutions. I need to know how to configure Kde to screen lock after a certain amount of time through the command prompt. To answer any future questions as to why I want to do this, I am creating a software that hardens a linux operating system, and one configuration item is screen locking of the kde desktop manager. This software does things through python by altering config files and running commands with the subprocess module so setting the screen locking through the GUI is not possible. I was told that in each user's home directory there is a /.kde/share/config/kdesktoprc file that you can put directives in but that file doesn't exist on my system. what does exists is /homedir/.kde/share/config/kio_desktoprc file but not sure if these are equivalent files. Please help.
|
![]() Registered Member ![]()
|
Hi,
you should take a look at power managment setting. Mark "suspend session" (i hope that it is how it is called in english), choose time, and from dropdown menu select lock screen to get it configured. The setting is stored in my case in the file ~/.kde4/share/config/powermanagementprofilesrc When configured to lock session after 10 minutes it containes the following [AC][SuspendSession] idleTime=600000 suspendType=32 IdleTime is clearly time required before trigering suspend action. SuspendType 32 appears to be nothing more than screen lock action. I have no idea why 32. If you want to modifie this file with script don't forget to restart powerdevil in order to reload it's settings. I hope that this helped you. Have fun. |
![]() Registered Member ![]()
|
The Screensaver/Screen Locker options are actually stored in ~/.kde/share/config/kscreensaverrc:
Lock=true means the screen locker will request a password for unlocking, LockGrace is the time after which a password is requested (in ms) and Timeout specifies the time in seconds after which the Screen Locker kicks in. And you can use the command "kwriteconfig" to change those configuration files, in this case f.e.:
|
![]() Administrator ![]()
|
If you do not want users to be able to change their settings, then you also need to look at the Kiosk framework. This also offers you the option of making the setting system wide, so it does not have to be applied to each user individually.
More information on Kiosk can be found on KDE Techbase.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]