![]() |
2010-07-20
, 01:54
|
Posts: 180 |
Thanked: 41 times |
Joined on Mar 2007
@ Maine
|
#3
|
![]() |
2010-08-05
, 22:51
|
Posts: 1 |
Thanked: 0 times |
Joined on Aug 2010
|
#4
|
![]() |
2010-08-05
, 22:59
|
|
Posts: 609 |
Thanked: 243 times |
Joined on Jan 2010
@ Eastern USA
|
#5
|
![]() |
2010-08-12
, 13:28
|
Posts: 1 |
Thanked: 0 times |
Joined on Aug 2010
|
#6
|
Traceback (most recent call last): File "skypeonline.py", line 11, in <module> sessbus = dbus.SessionBus() File "/usr/lib/pymodules/python2.5/dbus/_dbus.py", line 219, in __new__ mainloop=mainloop) File "/usr/lib/pymodules/python2.5/dbus/_dbus.py", line 108, in __new__ bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop) File "/usr/lib/pymodules/python2.5/dbus/bus.py", line 125, in __new__ bus = cls._new_for_bus(address_or_type, mainloop=mainloop) dbus.exceptions.DBusException
![]() |
2011-01-21
, 20:09
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#7
|
File "/opt/Scripts/Skypeon.py", line 16 accounts = am_props.Get(TP_ACCT_MGR, ^ IndentationError: unexpected indent ~ $
![]() |
2011-05-01
, 15:41
|
Posts: 7 |
Thanked: 2 times |
Joined on Apr 2010
|
#8
|
#!/usr/bin/env python import dbus import gobject #NAMES TP_ACCT_MGR = 'org.freedesktop.Telepathy.AccountManager' TP_ACCT = 'org.freedesktop.Telepathy.Account' DBUS_PROPS = 'org.freedesktop.DBus.Properties' sessbus = dbus.SessionBus() am_obj = sessbus.get_object(TP_ACCT_MGR, '/org/freedesktop/Telepathy/AccountManager') am_props = dbus.Interface(am_obj, DBUS_PROPS) accounts = am_props.Get(TP_ACCT_MGR, "ValidAccounts") for path in accounts: if ("/org/freedesktop/Telepathy/Account/ring/tel/ring" == path): continue acct_obj = sessbus.get_object(TP_ACCT_MGR, path) acct_props = dbus.Interface(acct_obj, DBUS_PROPS) acct_props.Set(TP_ACCT, "RequestedPresence", dbus.Struct((dbus.UInt32(2), dbus.String(u"available"), dbus.String(u"") )) ) acct_props.Set(TP_ACCT, "ConnectAutomatically", dbus.Boolean(True))
#!/usr/bin/env python import dbus import gobject #NAMES TP_ACCT_MGR = 'org.freedesktop.Telepathy.AccountManager' TP_ACCT = 'org.freedesktop.Telepathy.Account' DBUS_PROPS = 'org.freedesktop.DBus.Properties' sessbus = dbus.SessionBus() am_obj = sessbus.get_object(TP_ACCT_MGR, '/org/freedesktop/Telepathy/AccountManager') am_props = dbus.Interface(am_obj, DBUS_PROPS) accounts = am_props.Get(TP_ACCT_MGR, "ValidAccounts") for path in accounts: if ("/org/freedesktop/Telepathy/Account/ring/tel/ring" == path): continue acct_obj = sessbus.get_object(TP_ACCT_MGR, path) acct_props = dbus.Interface(acct_obj, DBUS_PROPS) acct_props.Set(TP_ACCT, "RequestedPresence", dbus.Struct((dbus.UInt32(2), dbus.String(u"available"), dbus.String(u"") )) ) acct_props.Set(TP_ACCT, "ConnectAutomatically", dbus.Boolean(True))
![]() |
2011-05-01
, 16:01
|
|
Posts: 196 |
Thanked: 113 times |
Joined on Jun 2010
@ Finland
|
#9
|
mc-tool list | grep -v "ring/tel" | awk {'print "mc-tool request "$1" busy"'} | sh
The Following 3 Users Say Thank You to Zas For This Useful Post: | ||
![]() |
2011-05-05
, 10:37
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#10
|
If you install "libmissioncontrol-utils" you can set resence with:
Just replace "busy" with "offline" or "online".Code:mc-tool list | grep -v "ring/tel" | awk {'print "mc-tool request "$1" busy"'} | sh
If you don't want to set all accounts at once you can replace -v "ring/tel" (exclude -v) with "skype" or "ovi" or "gmail" etc. depending on the account settings.
Thanks.
EDIT:
I have managed to solve this with a bit of digging on the forums and adapting of scripts. The first script I created called "skype-online" is here:
Last edited by bristoldave; 2010-06-10 at 10:35.