Author Topic: Bash Script To Disable Suspend  (Read 3039 times)

mbaush

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
Bash Script To Disable Suspend
« on: May 04, 2006, 11:17:49 am »
Anyone knows how I could temporarily disable the auto-suspend using a bash script and re-activate it once an app is done ?

I tried using "sed" to modify the qpe.conf, but it seems like the changes were ignored.

Thanks!
Zaurus SL-C3000, Cacko

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Bash Script To Disable Suspend
« Reply #1 on: May 04, 2006, 12:39:30 pm »
Iirc, there's a QCOP command for this.

It's used by some of the music/video players.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

chrget

  • Full Member
  • ***
  • Posts: 129
    • View Profile
Bash Script To Disable Suspend
« Reply #2 on: May 05, 2006, 03:55:03 am »
Quote
Anyone knows how I could temporarily disable the auto-suspend using a bash script and re-activate it once an app is done ?[div align=\"right\"][a href=\"index.php?act=findpost&pid=125725\"][{POST_SNAPBACK}][/a][/div]
This works for me:

Code: [Select]
#!/bin/sh

case "$1" in
        off)
                qcop QPE/System 'setScreenSaverIntervals(int,int,int)' 0 0 0
               ;;

        on)
                qcop QPE/System 'setScreenSaverIntervals(int,int,int)' -1 -1 -1
               ;;

esac

exit 0
Regards,
Chris.
SL-5500G running a modified 3.13 Sharp ROM
Extrememory 1GB SD / Netgear MA701 WLAN
Audiovox RTM-8000 GSM/GPRS CF Card