shr- avoid suspend and dim screen

W.Kenworthy billk at iinet.net.au
Wed Mar 25 03:10:52 CET 2009


Taken from the replies to a similar post of mine (I think!) some time
back.  Replace the exec call in the desktop file
(/usr/share/applications/tangogps) to this script.

The exports work around where tango cant seem to find its home config

This is my "car" script - sets up the FR so I can place it in a recess
of the dash in landscape mode.  For walking i dont rotate the screen,
and allow suspend (just comment out the relevant lines).

One day I'll get around to replacing it with a c program using library
calls which will hopefully speed it up - I am using this script to
customise tango, mofi, FBreader etc.

Using shr-testing up to date a few days ago (as I am having problems
building my repo at the moment :)

BillK


root at om-gta02:~# cat mefiles/tgps
#!/bin/sh

export USER='root'
export HOME='/home/root'
export PWD='/home/root'

cd /home/root

/usr/bin/xrandr -o 1

mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource 'CPU'
mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource 'Display'

/usr/bin/tangogps

mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'CPU'
mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'Display'

/usr/bin/xrandr -o 0

root at om-gta02:~# 


On Tue, 2009-03-24 at 20:58 +0100, Fernando Martins wrote:
> Ah! I forgot to tell: I'm using shr unstable from January and the 
> settings UI doesn't work, , so I was looking for a command line 
> instruction to suspend on/off.
> 
> Unfortunately, suspend off is not sufficient since the battey gets 
> drained too fast, in a couple hours while using GPS. I don't know how 
> much power the GPS and CPU is being used, but I'm sure switching off the 
> screen would help.
> 
> Fernando
> 
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community





More information about the community mailing list