[qtmoko] running a script once usb-connection is detected

Radek Polak psonek2 at seznam.cz
Thu Mar 6 07:19:34 CET 2014

On Tuesday, March 04, 2014 08:16:28 PM robin wrote:

> hi,
> thanks to radek I am now able to launch the voicerecorder from the aux
> button (see bellow).
> now I would like the recordings to be processed as soon as the phone
> realises that it has an internet connection via usb. can anyone help me
> if either there is a script which polls for the usb-connection where I
> could insert another command or what other solutions there might be.
> what I would like to do in the end is to be able
> a) to quickly record a messege (DONE)
> aI) increase recording volume just for the message (??)

I think you can use udev to launch scripts on USB insert event. Adjusting 
volume can be done either by restoring whole alsa state file using alsactl -f 
/path/to/alsa.state restore or it should be possible to use something like 
"amixer set Master 5%+" - you'd have to figure out correct control names.

> ps @ radek: what does the Suspend.service actually launch so you get the
> shutdown/restart menu?

Hmm i think this menu is just one dialog in qpe process. It's not application.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmoko.org/pipermail/community/attachments/20140306/5a72e6f9/attachment.html>

More information about the community mailing list