Reply
Thread Tools
Posts: 154 | Thanked: 217 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, 181 views)

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

The Following 26 Users Say Thank You to billranton For This Useful Post:
Posts: 69 | Thanked: 18 times | Joined on Apr 2010
#2
Just confirming, is this the next step after following the instructions from the 'MSN on the N9/N950! ' thread?
 
Hariainm's Avatar
Posts: 435 | Thanked: 575 times | Joined on Feb 2010 @ Galiza
#3
ok, i'm following your steps but i can't see my msn account:

Code:
$ sqlite3 .accounts/accounts.db
SQLite version 3.7.7 2011-06-23 19:49:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from services;
1|GenericEmail|Email Mailbox|GenericProvider|e-mail
2|ovi.com|qtn_comm_appname_cont|ovi|Sync
3|flickr-share|qtn_comm_share_sharing|flickr|sharing
4|twitter|qtn_twit_twitter|twitter|social
5|mfecalendar|Microsoft Exchange|mfe|calendar
6|ovinotifications|qtn_push_notifications_title|ovi|ovinotifications
7|genericemail|Email|email|e-mail
8|caldav|CalDAV|caldav|calendar
9|mfemail|Microsoft Exchange|mfe|e-mail
10|youtube-share|qtn_acc_sel_pro_ser_sharing|youtube|sharing
11|facebook-share|qtn_fbk_sharing|facebook|shar
12|facebook-chat|qtn_fbk_facebook|facebook|IM
13|google-talk|qtn_goog_gtalk|google|IM
14|sip|SIP|sip|IM
15|gmail|qtn_goog_gmail|google|e-mail
16|twitter-share|qtn_twit_sharing|twitter|shari
17|picasa-share|qtn_acc_sel_pro_ser_sharing|pic
18|skype|Skype|skype|IM
sqlite>
what's suppossed to do now? i already did the other thread tutorial, and my msn account works, and i can see it doing mc-tool list

Is select * from services; the right command? not changing the * for the butterfly/msn/.... name, or something? i already did it, but doesn't work...

Last edited by Hariainm; 11-29-2011 at 10:15 PM.
 
Posts: 154 | Thanked: 217 times | Joined on May 2011 @ Switzerland
#4
Originally Posted by rexii23 View Post
Just confirming, is this the next step after following the instructions from the 'MSN on the N9/N950! ' thread?
Yes, though it should work for any telepathy account - so if we manage to port any other protocol it'll work for that too. There are a depressingly large number of protocol icons already in /usr/share/themes. Makes you wonder what might have been.

Originally Posted by Hariainm View Post
Is select * from services; the right command? not changing the * for the butterfly/msn/.... name, or something? i already did it, but doesn't work...
Yeah when I put the msn.service file in /usr/share/accounts/services/ it showed up on the end of that list. Did you put it in the right place?
 
Posts: 1,191 | Thanked: 2,027 times | Joined on May 2011
#5
Thanks, I'll try to enable jabber.org account this way. By the way XMPP (former Jabber) changed the icon, and uses now:

 

The Following User Says Thank You to shmerl For This Useful Post:
coderus's Avatar
Posts: 3,492 | Thanked: 5,109 times | Joined on Nov 2011 @ Russia
#6
values(14,0
maybe right command is
values(14,20
isn't it?
 
Posts: 154 | Thanked: 217 times | Joined on May 2011 @ Switzerland
#7
You would think so, but lots of the settings table has 0 for the service field, especially the usernames. I don't know if this is a bug, but I can confirm that it works with a 0. I haven't tried it with the service id filled in.
 
Posts: 69 | Thanked: 18 times | Joined on Apr 2010
#8
Originally Posted by Hariainm View Post

Is select * from services; the right command? not changing the * for the butterfly/msn/.... name, or something? i already did it, but doesn't work...
I had to restart the phone for this to work.

Thanks billranton after playing around with it for a while I finally managed it get it all setup!!

The only downside I see with this solution atm is that the password is stored in plain text and in sqlite....but at least its better than no msn on my phone!
 
Posts: 154 | Thanked: 217 times | Joined on May 2011 @ Switzerland
#9
Originally Posted by rexii23 View Post
The only downside I see with this solution atm is that the password is stored in plain text and in sqlite....but at least its better than no msn on my phone!
This was also the case before in telepathy - if you do 'mc-tool show <accountuid>' then it's right there. The proper ones seem to use some kind of credentials system to store the passwords. That's probably something a binary account ui plugin would manage.
 
Posts: 69 | Thanked: 18 times | Joined on Apr 2010
#10
oh well, it will do for now, I have a password set on the phone so at least that helps.

found an issue with integration with contacts. I can't seem to add the MSN service onto my contacts. I can see them someone talks to me and then I can add them by clicking on their name in messages. Are you having a similar issue? It did merge my hotmail contacts, but I had a MfE account with hotmail already so it was all synced in the first place, there was a couple of duplicate emails but if I tap on them I send an email instead.

Also noticed that if I add this contact after seeing it pop up in the message window. I do get MSN under Service for this contact, but under the word MSN there is 'failed'
Apart from Service there is also Mail, where it contains the contact's email address.

EDIT: I went into Accounts, disabled MSN, saved it, and then went back in and reenabled it. This did the trick and in the contacts window it displayed 'fetching contacts' after a minute or 2 it properly merged my contacts!!

Last edited by rexii23; 11-30-2011 at 07:35 AM.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT -4. The time now is 10:27 PM.