Hello, I would like to figure out a way to create a simple script to temporary disable xscreensaver and power-manager screensaver. The point in that is that I want to be able to automatize the things I need to do in order to watch longer flash videos without interruption from the screensaver. Can anyone help me?
I'm not sure if this is anything like what you want but I have this in my autostart.sh
#no blank screen xset s off && xset -dpms &
and it works. the screen doesn't blank out (I have no xscreensaver or other screensaver running)
So what you're looking for is a script that kills xscreensaver & xfce4-power-manager before you watch the Flash video, then restarts them after you're done?
Why not make it simple and use two - one to kill them, another to restart them?
#!bin/bash pkill xscreensaver & pkill xfce4-power-manager &
#!bin/bash xfce4-power-manager & xscreensaver -no-splash &
EDIT: `pkill xfce4-power-manager` won't work...this should do better:
#!bin/bash pkill xscreensaver kill `pidof xfce4-power-manager`
Also, you shouldn't need the ampersands in the kill script.
re-EDIT: Shortened the code a little.
Last edited by pvsage (2011-05-08 16:11:15)
Thank you guys. I wanted to use a single shortcut to turn the script on/off. Is it possible for the scripts pvsage wrote?
OK, so you want an if-then-else script to toggle them on and off. Here's a quick-and-dirty one:
#!/bin/bash if [ "$(pidof xfce4-power-manager)" ] then pkill xscreensaver kill `pidof xfce4-power-manager` else xfce4-power-manager & xscreensaver -no-splash & fi
This is easiest to monitor if you have xfce4-power-manager set to always display an icon in the systray...if the icon isn't there, the power manager is down.
EDIT: Forgot the root slash in the hashbang...
re-EDIT: I just tested this on my netbook, and it works. Don't forget to put it in your path (I prefer ~/bin) and make it executable. Bind it to a keyboard shortcut...wax on, wax off.
Last edited by pvsage (2011-05-08 16:54:45)
Thank you, pvsage!
Last edited by pvn (2015-06-13 18:53:12)