View Single Post
Posts: 307 | Thanked: 1,460 times | Joined on May 2011 @ Switzerland
#1
EDIT: go here and do all of this without terminals and repositories and sqlites. I'll leave this here for reference.

Dotted around these forums are instructions to add non-gmail jabber accounts, msn, icq or other haze supported protocols on harmattan with mc-tool, you'll have seen that although the accounts are usable, they're not very well integrated. Although this is a long way from a proper implementation, it'll make sure you can see everything properly like this:







First download the zip file attached to this post. Inside are the required xml files to declare the main four libpurple protocols (Jabber, MSN, AOL, Yahoo) to the Accounts system. As root, copy the .provider files to /usr/share/accounts/providers, and the .service files to /usr/share/accounts/services. Also in there is a choice of icons for jabber, as harmattan doesn't come with one. Choose which you like and copy to /usr/share/themes/blanco/meegotouch/icons/. If you use the -xmpp ones, either rename them to -jabber or change the jabber provider and service files. If anyone makes xml and icons for protocols I haven't included, let me know and I'll include them in the zip.

At this point you should be able to see your new services in the Accounts application under 'Add accounts'. Although it'll show you a form, it needs a binary plugin to actually create the account so it won't work. We'll do it manually from what we already have.

First use 'mc-tool list' at a terminal to find the uid of your telepathy account. It'll be something like 'gabble/jabber/email_40address_2enet0' or 'haze/msn/email_40address_2enet0'. Keep it for later. Disable the account with 'mc-tool disable <uid>', as we'll let the accounts UI re-enable it when it's set up.

Assuming you've got the harmattan dev repository set up, you can install sqlite to add the account manually:

Code:
apt-get install sqlite3
Then when logged in as user and in user's home directory, open the accounts database:

Code:
sqlite3 .accounts/accounts.db
See if the service has been picked up:

Code:
select * from services;
If everything's gone well you should see the new service at the end like this:

Code:
20|msn|MSN|msn|IM
Remember the first number, it's the service id. Next you need to add a new account. The email address is the display name of the account, so should be your id. The third field should be the service name from the second field above, in this case 'msn':

Code:
insert into accounts values (null, 'me@hotmail.com', 'msn', 0);
and find out the new id:

Code:
select * from accounts;

...
14|me@hotmail.com|msn|1
Next we need to connect the new SSO account to the telepathy one by adding a row to the settings table. Add the telepathy uid you found earlier with mc-tool to the following sql along with the account id and the service id (in this example 14 and 20):

Code:
insert into settings values(14, 20, 'tmc-uid', 's', '<telepathy uid>');
And give it your username and password:

Code:
insert into settings values(14,0,'username','s','me@hotmail.com');
insert into settings values(14,0,'password','s','mypassword');
At this point you should close sqlite and reboot. Open the Accounts app, and you'll see your IM account at the end of the list, disabled. Open it and you'll see no account settings except for the toggle at the top to enable the account. Switch this on and that should do it. Tap 'Availability' and sign in. You should see your account in this list. If you have additional accounts on the same service, repeat from the sqlite part onwards. You don't need to duplicate the xml files.

As I said, this is still just a workaround. A proper implementation would wrap up the telepathy plugin, the provider and service xmls, icons, and an executable binary in /usr/lib/AccountsUI/ for account management. But this will do for now. I've got as far as finding this documentation for that, but I have no experience with c++ dev for maemo, so have a long way to go.

EDIT: Added official xmpp icons. Kept the old ones though because I prefer them.
EDIT: More info from elsewhere in the thread.
EDIT: Included a zip of provider and service files.
Attached Files
File Type: zip purple.zip (15.2 KB, 393 views)

Last edited by billranton; 2011-12-12 at 11:08. Reason: Link to Niwakame's debs!
 

The Following 26 Users Say Thank You to billranton For This Useful Post: