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

script to set screen saver settings on Linux

Tags: None
(comma "," separated)
ankushkde
Registered Member
Posts
2
Karma
0
Hi Friends,

I am trying to configure screensavers settings KDE
running Centos 5.x 32-bit/Ubuntu 11.x environment. I need to prepare a script which will be push by Puppet and this script should be able to change
settings like idle_delay, set customized password-protected screen
saver, enabling lock etc..

On KDE I am not able to get what settings should be there for enabling
idle_delay, activating the customized password protected screen saver
etc..

KDE Settings
$ qdbus org.freedesktop.ScreenSaver /ScreenSaver


Can somebody update me what commands I need to run through script to set the screen-saver settings.


Regards

Ankush
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
First, I would recommend finding out which configuration files under ~/.kde4 or ~/.kde are changing when you change the settings in System Settings.

Next, you can use "kreadconfig" and "kwriteconfig" to read/write the configuration files in question to determine their values and change them as needed.

As for getting the new settings loaded - there is likely a reparseConfiguration call accessible via D-Bus, under the org.freedesktop.ScreenSaver /ScreenSaver interface.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ankushkde
Registered Member
Posts
2
Karma
0
Hi Ben,

Thanks for sharing the information. Yes, the settings are indeed stored in .kde/share/config/kdesktoprc or in .kde/share/config/kscreensaverrc.


Only thing I am not able to do is to apply the changes through kwriteconfig. I am not able to find any reparseConfiguration call for ScreenSaver via DBus.

Can you share the reparseConfiguration call for Screensaver.


Regards

Ankush
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Under KDE, run
Code: Select all
qdbus org.freedesktop.ScreenSaver /MainApplication org.kde.KApplication.reparseConfiguration


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

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