Xscreensaver + systemctl suspend Perl script for power management in LXDE not working
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Xscreensaver + systemctl suspend Perl script for power management in LXDE not working
I have Fedora 19 lxde and it does not come with any power management utilities. I tried downloading the xfce power manager but none of the changes I made had any effect, so now I'm trying to use Xscreensaver in conjunction with a Perl script I stole (never used perl) on the Xscreensaver website http://www.jwz.org/xscreensaver/man3.html to issue a standby command with systemctl:
Code:
#!/usr/bin/perl
my $blanked = 0;
open (IN, "xscreensaver-command -watch |");
while (<IN>) {
if (m/^(BLANK|LOCK)/) {
if (!$blanked) {
system "systemctl suspend";
$blanked = 1;
}
}}
I run this script in the background and it actually works the first time the screensaver is triggered; however, after resuming from suspend, even though the script still appears to be running, it will no longer trigger in the future. How can I get it to reinitialize?
It seems you would want to make a daemon in perl, there is plenty of example code out there .. but my first suggestion would be to work out why xfce power manager isn't working, I run Fed19 with LXDE and I don't have any issues with it. Are there any messages in the logs related to ACPI ?
Ok well it worked one time after booting but it doesn't do it again. When I first launch xfce4 power settings it says that the power manager isn't running and asks to start it. Is the service not running in the background correctly or something?
Well actually I do have another problem, although it is unrelated to power management.
I don't suppose you have experience with bluetooth on LXDE Fedora? I installed quite a few of the bluetooth packages recently (bluez, blueman, gnome-bluetooth) and I can't get any of them to work. The GUI utilities don't execute because of some errors in python (?) I think according to the console and I'm not sure how to use any CLI utilities if there are any.
My asus bluetooth radio is detected by the hci tool so I don't think it's a problem with that.
I just need a straight forward utility to pair my device (controller).
Might be better to start a new question so any bluetooth gurus might see it .. personally I rarely use bluetooth but when I did I had no problems, maybe check /var/log/messages and add any results into the new question
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.