Registered Member
|
Hi,
What should I add to the following command in order for the change to be saved for the current session
Thank you |
Administrator
|
Out of curiosity, why are you needing this change manually? Perhaps there is a better way to achieve what you need.
"Violence is the last refuge of the incompetent."
Plasma FAQ maintainer - Plasma programming with Python |
Registered Member
|
I developed a computer-based alarm clock and need to have the computer on if lid closed during the night and computer off if lid closed during the day.
Thank you |
Administrator
|
The problem with changing configuration files on the fly is that unless the programs reading it are restarted or reparse them, they will happily ignore the setting and go off on their own.
You could however use "kwriteconfig" to handle such files, should you need that.
Take a look at the file and substitute XXX for the right key (they're in format [aaa][bbb], you'll want the "bbb" part) as I don't have a laptop at hand to check the right name.
"Violence is the last refuge of the incompetent."
Plasma FAQ maintainer - Plasma programming with Python |
Administrator
|
You can run the following command to ask PowerDevil (KDE Power Management) to reload it's configuration:
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Always with my same problem of disabling power suspend, I want to say that doesn't work to reload config.
Waiting more than one minute, nothing happen. Tried "qdbus org.kde.kded /kded reconfigure" too KDE 4.11.2 Gentoo |
Administrator
|
Please try making a similar change through the control panel. I have checked with the code - and the qdbus command is a functional equivalent to what it does to inform the Powerdevil daemon component of configuration changes.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
In fact, as my script doesn't work, I have to use control panel to disable suspend during my gentoo updates (compilationq), so I can tell it works with it. |
Administrator
|
Please diff the configuration files produced by kwriteconfig and the the control panel, to see if any other changes are being introduced which may be necessary.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
You mean ~/.kde4/share/config/ ? I tested, there is no difference at all in ~/.kde4/share/config/ between the case (1) not working with config file modifyed by kwriteconfig and (2) the control panel where I only uncheck/check session suspend. In (1) what I did after kwriteconfig : ~/.kde4/share/config $ qdbus org.kde.kded /org/kde/Solid/PowerManagement reparseConfiguration ~/.kde4/share/config $ qdbus org.kde.kded /kded reconfigure ~/.kde4/share/config $ qdbus org.kde.kded /org/kde/Solid/PowerManagement reparseConfiguration In (2) the suspend is effectively activated after one minute. |
Administrator
|
Okay, i'm mystified then. I'll contact the developers to see if they can offer any guidance as to why running the qdbus command would not work - as it should do.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thank you very mutch for all your help. |
Registered Member
|
Is not this the full path?
|
|
yes, but unless clashes, qdbus should autopick that - you'd get an error message otherwise ("no such function" or so)
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot]