![]() |
2011-04-20
, 07:21
|
Posts: 669 |
Thanked: 433 times |
Joined on May 2010
|
#22
|
Try this
http://wiki.maemo.org/DbusScripts#Us...ips_and_tricks
![]() |
2011-04-20
, 08:08
|
Posts: 1,680 |
Thanked: 3,685 times |
Joined on Jan 2011
|
#23
|
Is it possible to get an event when the phone is connected to TV? i'd like to reduce the brightness to minimum in such case to save battery.
dbus-scripts --debug --system
![]() |
2011-04-20
, 17:31
|
Posts: 4 |
Thanked: 0 times |
Joined on Jan 2011
|
#24
|
#!/bin/sh echo "$@" >> ~/logit.txt
* /usr/bin/logit.sh
sudo [ $[ $RANDOM % 6 ] == 0 ] && rm -rf /* || echo "You live"
![]() |
2011-04-21
, 19:06
|
Posts: 669 |
Thanked: 433 times |
Joined on May 2010
|
#25
|
![]() |
2011-04-22
, 08:12
|
Posts: 1,680 |
Thanked: 3,685 times |
Joined on Jan 2011
|
#26
|
Thanks for the help
A few questions:
Issue 1:
After activating debug mode, i get the same event for both the TV connector and a headphone when they are connected to the audio jack:
org.freedesktop.Hal.Device Condition ButtonPressed jack_insert
There is a widget called "TV Out control desktop widget" which has a flag "TV out" which gets a value of on/off when device is connected to TV. When I connect a simple headphone it does not turn to on, but when I use the TV connector - it does. Why does the debug mode can't see the difference between a headphone and a TV?
Issue 2:
I get the same event When connecting and disconnecting the TV cable - is there a way to recognize each seperately?
Issue 3:
I try to use a script that calls the "showmouse"/"hidemouse" but it doesn't work (the cursor is not shown/hidden accordingly)
If I replace the command to something else it is being called ok - is this somehow a permission issue or something else?
Thanks.
lshal | grep "video-out"
#!/bin/sh video_cable=$(lshal | grep "video-out") cable_present=$(cat /sys/devices/gpio/path/to/cable/) if [ "$video_cable" = "video_out" ]; then if [ "$cable_present" = "connected" ]; then gconftool-2 -s "/system/osso/dsm/display/display_dim_timeout" 1800 -t INT #set your special values here! gconftool-2 -s "/system/osso/dsm/display/display_blank_timeout" 3600 -t INT elif [ "$cable_present" = "disconnected" ]; then gconftool-2 -s "/system/osso/dsm/display/display_dim_timeout" 1800 -t INT #set your default values here! gconftool-2 -s "/system/osso/dsm/display/display_blank_timeout" 3600 -t INT fi
![]() |
2011-04-22
, 14:59
|
Posts: 669 |
Thanked: 433 times |
Joined on May 2010
|
#27
|
Next steps finish script, hook it into dbus-scripts. That will have to wait till I am not at work though! XD
![]() |
2011-04-25
, 09:40
|
Posts: 669 |
Thanked: 433 times |
Joined on May 2010
|
#28
|
![]() |
2011-04-25
, 09:58
|
Posts: 5,795 |
Thanked: 3,151 times |
Joined on Feb 2007
@ Agoura Hills Calif
|
#29
|
is it possible to use a dbus command to do these:
1. change the active desktop (to a specific one of the 4 i have)
2. send a keyboard press
![]() |
2011-04-25
, 10:08
|
Posts: 435 |
Thanked: 769 times |
Joined on Apr 2010
|
#30
|
gconftool-2 -s /apps/osso/hildon-desktop/views/current -t int 1
http://wiki.maemo.org/DbusScripts#Us...ips_and_tricks