2023-01-20

Get a kerberos ticket from Gnome Online Accounts via dbus

Four years after my last post here, I still struggle somewhat regularly with getting stuff done over dbus. I know, I could have employed some of my free time during these years to actually learn dbus but alas... Here is my latest finding.

$ dbus-send --session \
--dest=org.gnome.OnlineAccounts \
--type=method_call \
--print-reply \
/org/gnome/OnlineAccounts/Accounts/account_<something> \
org.gnome.OnlineAccounts.Ticketing.GetTicket \

And how do you find this little account_<something> item you need to know? I'm glad you asked.

$ gdbus introspect -e -r \
-o /org/gnome/OnlineAccounts/Accounts \
-d org.gnome.OnlineAccounts |less

(...)
node /org/gnome/OnlineAccounts/Accounts {
node /org/gnome/OnlineAccounts/Accounts/account_1647435362_1 { <=== here it is!
(...)
readonly s ProviderType = 'kerberos'; <=== this is a kerberos-type online account

That's all for today. See you in another decade.