Author Topic: Qcop Commands Wanted!  (Read 2848 times)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Qcop Commands Wanted!
« 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
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
Qcop Commands Wanted!
« Reply #1 on: February 05, 2006, 01:24:39 pm »
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

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Qcop Commands Wanted!
« Reply #2 on: February 05, 2006, 05:09:03 pm »
Quote
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
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

gojira

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Qcop Commands Wanted!
« Reply #3 on: February 06, 2006, 02:21:16 am »
Quote
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:
Code: [Select]
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...
« Last Edit: February 07, 2006, 06:23:06 pm by gojira »
Zaurus SL-C3200 Debian EABI / Sharp ROM (tetsu v18j), Socket CF Bluetooth (Rev E), BT747 GPS, Canon K30225 CF Wifi.  RIP: Zaurus SL-C860 Sharp ROM (1.40JP).

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
Qcop Commands Wanted!
« Reply #4 on: February 07, 2006, 12:19:22 pm »
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.

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Qcop Commands Wanted!
« Reply #5 on: February 07, 2006, 01:31:49 pm »
Quote
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
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

qx773

  • Full Member
  • ***
  • Posts: 219
    • View Profile
Qcop Commands Wanted!
« Reply #6 on: February 07, 2006, 10:22:18 pm »
The screen saver can be shut off independently with:

qcop QPE/System 'setScreenSaverMode(int)' 2
keypebble
qcop QPE/System 'setScreenSaverMode(int)' 100