OESF Portables Forum
General Forums => General Discussion => Topic started by: daniel3000 on February 05, 2006, 08:06:58 am
-
Hello,
I have found info about the needed commands to enable / disable screensaver and suspend with qcop, but it doesn't work here. Probably I am doing something wrong...
every attempt to run on the command line:
qcop "QPE/System" "setSuspendOnOff(bool)" XYZ
fails (for XYZ I have tried every boolean value I could think of: 0, 1, false, true, on, off, yes, no...).
I always get the error message:
"Syntax error in parameter type: bool".
I tried to use int instead of bool, with values 0 and 1. This doesn't give me the error message anymore, but it simply does not work.
I need to disable suspend in a shell script temporarily. Could anyone point me into the right direction please?
ALso for screeensaver. I'd like to disable it permanently if possible. I know about the qpe.conf modification which disables it, but it is overwritten everytime I use the "Light and Power" applet. So I'd like to be able to disable the screensaver from a script.
Thanks
daniel
-
For keypebble, I use the following script:
qcop QPE/System 'setScreenSaverIntervals(int,int,int)' 0 0 0
keypebble
qcop QPE/System 'setScreenSaverIntervals(int,int,int)' -1 -1 -1
-
For keypebble, I use the following script:
qcop QPE/System 'setScreenSaverIntervals(int,int,int)' 0 0 0
keypebble
qcop QPE/System 'setScreenSaverIntervals(int,int,int)' -1 -1 -1
[div align=\"right\"][a href=\"index.php?act=findpost&pid=113752\"][{POST_SNAPBACK}][/a][/div]
So 0 0 0 switches off the screensaver and -1 -1 -1 reenables it? What are the three values for? Is suspend affected in any way by that?
And: Does this also change the values in qpe.conf, or is it only temporary (until next QTopia restart)?
Thanks!
daniel
-
I have found info about the needed commands to enable / disable screensaver and suspend with qcop, but it doesn't work here. Probably I am doing something wrong...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=113724\"][{POST_SNAPBACK}][/a][/div]
blank: qcop QPE/System 'setBlankLCD(int)' 1
suspend: keyhelper can use __9quit.desktop, which has exec=suspend, but I can't find a suspend executable, so maybe it gets qpe to process the desktop file...
Edit: Sorry, I took enable/disable as activate/cancel...
-
I do not completely understand it myself, but the script that I showed shuts off the screen saver and suspend, runs keypebble, and then re-enables the screen saver and suspend when the execution of keypebble has ended. You can replace keypebble with whatever program or programs that you want to run. You can also create a separate script just to turn off the screen saver and suspend, and then create another script to turn the suspend and screen saver back on.
-
I do not completely understand it myself, but the script that I showed shuts off the screen saver and suspend, runs keypebble, and then re-enables the screen saver and suspend when the execution of keypebble has ended. You can replace keypebble with whatever program or programs that you want to run. You can also create a separate script just to turn off the screen saver and suspend, and then create another script to turn the suspend and screen saver back on.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=113990\"][{POST_SNAPBACK}][/a][/div]
Yes, thanks! I just did a test and suspend and screensaver are really disabled after the 0 0 0 call.
Now I have to find out which parameter stands for which setting so I can en/disable screensaver independently from suspend :-)
thanks
daniel
-
The screen saver can be shut off independently with:
qcop QPE/System 'setScreenSaverMode(int)' 2
keypebble
qcop QPE/System 'setScreenSaverMode(int)' 100