Non-XO Clients as “XO Buddies” in Sugar Chat and Network Home

Per my previous post, now you can join a XO Sugar chat from other clients, but to the XO, you’ll show up as ??? in the chat instead of as an “XO Buddy.”  An XML stanza will fix that.

Once you go through all this and set up your login to be an “XO Buddy,” it’s persistent.  In other words, you only have to do this once per user.

First of all, your client needs to be able to send XML.  See below for specific client instructions.

Here’s an example of the stanza to send.

 <iq type=”set” id=”18″ from=’anna@schoolserver.example.org’>
     <pubsub xmlns=”http://jabber.org/protocol/pubsub”>
       <publish node=”http://laptop.org/xmpp/buddy-properties”>
         <item>
           <properties xmlns=”http://laptop.org/xmpp/buddy-properties”>
             <property type=”str” name=”ip4-address”>172.18.0.1</property>
             <property type=”bytes” name=”key”>123456=</property>
             <property type=”str” name=”color”>#660066,#003366</property>
           </properties>
         </item>
       </publish>
     </pubsub>
 </iq>

Things to change in the stanza:

First line  <iq type=”set” id=”18″ from=’anna@schoolserver.example.org’>

Add more numbers to the id.  No, I don’t know how many.  This has been a source of mystery.  All I know is that adding more numbers sometimes makes it work.  And of course change anna to your Jabber login name.

Sixth line <property type=”str” name=”ip4-address”>172.18.0.1</property>

Usually the public IP address of the Jabber server works.  I haven’t tried other addresses, so YMMV.

Seventh line <property type=”bytes” name=”key”>123456=</property>

Change “key” to something else.  Your id_rsa.pub or just a random id_rsa.pub seems to be a good choice.  How to generate one?

anna@anna-desktop:~$ mkdir /home/anna/temp
anna@anna-desktop:~$ ssh-keygen -t rsa -C “anna-jabber”
Generating public/private rsa key pair.
Enter file in which to save the key (/home/anna/.ssh/id_rsa): /home/anna/temp/id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/anna/temp/id_rsa.
Your public key has been saved in /home/anna/temp/id_rsa.pub.
The key fingerprint is:
9f:e2:2b:97:13:b0:3a:03:14:c1:dc:7e:ba:41:2b:52 anna-jabber
The key’s randomart image is:
+–[ RSA 2048]—-+
| o.o             |
|  + .            |
|   o             |
|  E o o          |
| o . + oS        |
|. o + . .. .     |
| . o +  .oo      |
|    = ..+.       |
|     o ooo       |
+—————–+

anna@anna-desktop:~$ cd temp/
anna@anna-desktop:~/temp$ ls
id_rsa  id_rsa.pub
anna@anna-desktop:~/temp$ cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAv6aK3/bwZY3OcjLuDILPUio+adTxuCd0GXkKQ0884qtWPLkQKC0fi0m3idwKrbIngdkzrPvMXi/X16WeGWQ/lY3G5g9tCnOTlftAvEzodXGAogPdlzaxnWVAfftU2Tt6Azgf/yhMJzoFYt+OZbwStAZTK0KVnrYdtTQ/ECt7WcyyRUW7RnQrMhulHrERohtk5ZcDu9fA4HH0b/GGmcTs7BLJIwRM5K2PumDX4Ocd/pYbGgKCAgLOaZFJ/GzVc2zQJF61Vhirk0FAooskgzcHgQ9yR7YZmRgmUjL/2VN5TDfOgWsC8ZBdxgkH+JzSb88uIkhPcEnxhZ9ETldOCTs4Pw== anna-jabber

Now I paste all that gobbledygook into that line.

             <property type=”bytes” name=”key”>AAAAB3NzaC1yc2EAAAABIwAAAQEAv6aK3/bwZY3OcjLuDILPUio+adTxuCd0GXkKQ0884qtWPLkQKC0fi0m3idwKrbIngdkzrPvMXi/X16WeGWQ/lY3G5g9tCnOTlftAvEzodXGAogPdlzaxnWVAfftU2Tt6Azgf/yhMJzoFYt+OZbwStAZTK0KVnrYdtTQ/ECt7WcyyRUW7RnQrMhulHrERohtk5ZcDu9fA4HH0b/GGmcTs7BLJIwRM5K2PumDX4Ocd/pYbGgKCAgLOaZFJ/GzVc2zQJF61Vhirk0FAooskgzcHgQ9yR7YZmRgmUjL/2VN5TDfOgWsC8ZBdxgkH+JzSb88uIkhPcEnxhZ9ETldOCTs4Pw=</property>

Delete the temp directory you generated the keys in.

rm -rf /home/anna/temp

Eighth line: <property type=”str” name=”color”>#660066,#003366</property>

This is the fun part.  Pick out a couple of html colors for your XO buddy.  This is a good resource.

http://html-color-codes.com/

So here’s an example of the stanza I’m going to send:

 <iq type=”set” id=”97247835581234″ from=’anna-gajim@schoolserver.example.org’>
     <pubsub xmlns=”http://jabber.org/protocol/pubsub”>
       <publish node=”http://laptop.org/xmpp/buddy-properties”>
         <item>
           <properties xmlns=”http://laptop.org/xmpp/buddy-properties”>
             <property type=”str” name=”ip4-address”>172.18.0.1</property>
             <property type=”bytes” name=”key”>AAAAB3NzaC1yc2EAAAABIwAAAQEAv6aK3/bwZY3OcjLuDILPUio+adTxuCd0GXkKQ0884qtWPLkQKC0fi0m3idwKrbIngdkzrPvMXi/X16WeGWQ/lY3G5g9tCnOTlftAvEzodXGAogPdlzaxnWVAfftU2Tt6Azgf/yhMJzoFYt+OZbwStAZTK0KVnrYdtTQ/ECt7WcyyRUW7RnQrMhulHrERohtk5ZcDu9fA4HH0b/GGmcTs7BLJIwRM5K2PumDX4Ocd/pYbGgKCAgLOaZFJ/GzVc2zQJF61Vhirk0FAooskgzcHgQ9yR7YZmRgmUjL/2VN5TDfOgWsC8ZBdxgkH+JzSb88uIkhPcEnxhZ9ETldOCTs4Pw=</property>
             <property type=”str” name=”color”>#333300,#660000</property>
           </properties>
         </item>
       </publish>
     </pubsub>
 </iq>

Pidgin:

Go to Tools -> Plugins.  Check XMPP Console.  Click Close.
Now you can go to Tools -> XMPP Console -> XMPP Console

In the dialog window underneath the larger window, paste your stanza and hit enter.

PSI:

Go to General -> Options -> Toolbars
In the left hand panel, under “Available actions” click on XML Console.  Use the right arrow button in the middle to add it to the Current Actions list.  Click Apply, then OK.  At the bottom of the Buddy List window, you should see a Terminal looking icon.  Click on that, then click the XML input button.  Paste your stanza and click Transmit.

Gajim:

Go to Actions -> Advanced -> for account schoolserver.example.org -> Show XML Console

In the XML Input box, paste the stanza and click send.

Which ever client you use, restart it after you send the XML and then you should show up as an “XO Buddy” in an XO’s network neighborhood, provided everyone’s on the same Jabber server.

If you can’t get this to work and are feeling frustrated, or you don’t have a client capable of sending XML, ask the server admin to create an account for you, or log in as you, and try to send the XML from one of her clients.  Then you can use that to login and be an “XO Buddy.”

References:
http://dev.laptop.org/~morgan/telepathy-docs/olpc.html
http://wiki.laptop.org/go/Jabber

2 thoughts on “Non-XO Clients as “XO Buddies” in Sugar Chat and Network Home”

  1. Well, I installed Pidgin on XP. I set up a Jabber account and set the XML from my Ubuntu desktop, then used that login from Pidgin on XP. And now I not only show up in Network Home, but I joined Sugar chat with colors (ugly Windows blue, but that was my doing).

Leave a Reply