[Help, Fedora] power and lock screen management
-
Hi.
I'm using Fedora KDE spin since last year, and have a need for the commands / a script to change power management and lock screen settings via the console (instead of manually going through the GUI).
I tried googling the commands, but feel like I didn't even get into the right direction.
If anyone could point me into the correct direction, that'd be greatly appreciated. A ready solution is nice, but I'd also like to know how to find such things by myself in the future.
Sorry if I use the wrong terminology, I used Windows until I switched last year.
(I posted this weeks ago in the /c/Fedora, but unfortunately didn't get any replies.)
-
L [email protected] shared this topic
-
[email protected]replied to [email protected] last edited by
You can use the fedora direct sources to search their discourse forum. Google and Microsoft are likely warping your search results intentionally to drive you back onto Windows. Search is not deterministic any more. It is individually targeted.
I have never used KDE much, so I have no idea. You are probably looking for KDE settings. These would likely be part of gsettings in GNOME. That is not really a fedora thing. You need to look in the KDE documentation. This is the kind of thing that gets easier with time but can be frustrating at first.
Sorry I'm not more helpful than this. It is 2am in California and I didn't want to leave you with no replies at all.
-
[email protected]replied to [email protected] last edited by
I found this bug report thread for KDE, and Chris posted a couple possible solution in there. Seems like a good starting point.
-
[email protected]replied to [email protected] last edited by
Thanks. I'll have a look later, and will try to understand.
-
[email protected]replied to [email protected] last edited by
KDE config files can be changed on the command line using:
kwriteconfig
And viewed using
kreadconfig
Power management is in:
~/.config/powermanagementprofilesrc
And
~/.config/powerdevilrc
You can feed changes to the file via kwriteconfig via the command line OR create a duplicate file with different settings and use rename commands in a script file to switch back and forth.
To apply changes you'd need to then run qdbus:
qdbus org.freedesktop.powermanagement /org/kde/Solid/PowerManagement org.kde.Solid.PowerManagement.reparseConfiguration
To load the new config and then:
qdbus org.freedesktop.powermanagement /org/kde/Solid/PowerManagement org.kde.Solid.PowerManagement.refreshStatus
To reload the service with the new config.
So neither use kwriteconfig and qdbus in a script OR make duplicate config files and a bash script to copy or rename the configs as needed plus qdbus to apply the changes to the current session.
-
[email protected]replied to [email protected] last edited by
Nice comment, that's exactly the way to do it.
-
[email protected]replied to [email protected] last edited by
Thank you so much for the comprehensive explanation,includong the edit.
Coincidentally I discovered kwriteconfig by myself yesterday - but not the interaction with qdbus.