The Following User Says Thank You to jolouis For This Useful Post: | ||
![]() |
2008-09-30
, 08:16
|
Posts: 3 |
Thanked: 8 times |
Joined on Apr 2007
@ Odense, Denmark
|
#2
|
/usr/bin/dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:<number> string:"<status-msg>"
/usr/bin/dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:2 string:"I'm here"
The Following 8 Users Say Thank You to wille For This Useful Post: | ||
![]() |
2008-09-30
, 14:25
|
Posts: 631 |
Thanked: 837 times |
Joined on May 2007
@ Milton, Ontario, Canada
|
#3
|
![]() |
2009-12-13
, 17:59
|
Posts: 105 |
Thanked: 62 times |
Joined on Aug 2009
@ Finland
|
#4
|
Hi;
This works:
Where <number> is one of:Code:/usr/bin/dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:<number> string:"<status-msg>"
1: offline
2: online
3: away
4: extended away
5: invisible
6: Do not Disturb
So fx if you want to go online with the status message of "I'm here":
Code:/usr/bin/dbus-send --type=method_call --print-reply --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresence uint32:2 string:"I'm here"
Hope this helps.
/Per Wille
![]() |
2010-01-04
, 09:05
|
Posts: 729 |
Thanked: 155 times |
Joined on Dec 2009
|
#5
|
Background: the problem I'm running into is that I've got the tablet set to auto-associate with any of the known access points that it finds, but only some of them actually have internet connectivity (i.e. the one in my Jeep, for example, is just a local AP that I connect and use for managing the media player on, not for internet access). I've also got the Presence accounts for my SIP and MSN connections setup to auto connect whenever Wifi activates. However, when the tablet associates with an AP that doesn't actually have internet access, the Presence system just continuously tries to connect... over, and over, and over... leading to a much faster drop in battery life than if it just GAVE UP. Anyways, so the idea is to write a script that will be called by dbus-scripts to check which AP profile the tablet has just associated with, and if it's one that doesn't have internet connectivity than to manually disconnect the Presence accounts. I've read all kinds of documentaiton about Telepathy, Mission Control, DBus, etc and have come up with:
dbus-send --system --print-reply --type=method_call --dest=org.freedesktop.Telepathy.MissionControl /org/freedesktop/Telepathy/MissionControl org.freedesktop.Telepathy.MissionControl.SetPresen ce string:"offline"
but unfortunately it doesn't actually do anything, and I'm thinking I've gone wrong somewhere as I can't seem to get any kind of response from a GetPresence call, or anything else from Mission Control. So, am I completely wrong here, or? Any ideas?
Reference documentation I've been to thus far:
http://www.manpagez.com/man/1/dbus-send/
http://maemo.org/development/documen...managers_bora/
http://telepathy.freedesktop.org/wiki/Mission%20Control
http://telepathy.freedesktop.org/spec.html
Any ideas/thoughts/help is greatly appreciated!
Thanks,
-Rob