Archive for the 'Uncategorized' Category

Comparing files in Nautilus with diff-ext

I spend a lot of time at the command line so my fingers can run diff commands faster than reaching for the mouse, but I was interested to see Ben Martin’s article on on doing a diff without touching the command line. Since Ubuntu Intrepid already has a package, enabling this is as simple as:

sudo apt-get install diff-ext

killall -15 nautilus


(or you can install diff-ext using Synaptic, and log out and in again, and click on Applications > Programming > Diff-ext to configure it.)

The third step is to select a diff program to be launched by Nautilus – I use meld which supports 3-way diffs.

The article describes its usage:

Now you should be able to select two files in a directory in Nautilus, right-click to bring up the context menu, and notice a Compare entry toward the bottom of the menu. Selecting Compare will run your preferred diff utility on these files as shown in the adjacent screenshot.

If you have only a single file highlighted and bring up the context menu you will see “Compare later” in the context menu. Selecting that option places the path of the selected file onto a stack. The next time you select a single file you will see both “Compare later” and “Compare to ‘/…/first-file'” in the context menu.

f you select two files, you will be able to compare those two like before, but also have the option to run a three-way comparison with a file from the “Compare later” stack. Although I mention a compare stack, currently gdiff-ext only lets you compare with the very last thing you added to the “Compare later” stack.

If you select two directories and choose Compare, then both directories are passed to your nominated diff tool.

Chatting to Sugar from a PC

(By PC I mean any OS including Linux, Windows, Mac and mobile devices, that has a Jabber client. And since Sugar can run on non-XOs, with XO I include any device primarily running Sugar…)

One of the strengths of the Sugar platform on the OLPC XO is that collaboration is built in. Many Activities are collaborative. However, one of the criticisms has been that it’s been a bit of a walled garden: not easy to collaborate with other computers unless they have the whole Sugar platform installed.

A feature I worked on for the upcoming Sugar 0.82 release is interoperability with XMPP (Jabber) instant messaging software. Collaboration is already based on XMPP, through the use of Telepathy in the Sugar stack – using a chat room for each shared activity – so much of the infrastructure was already in place.

This feature is planned to be included in the OLPC 8.2.0 release, later this year.


  • XO (or other device running Sugar) connected to a Sugar-customised Jabber server
  • PC (regular desktop on any OS) – or mobile device (my Nokia N810 tablet works great) – with a Jabber client

Here’s a walkthrough of the result:

Step 1: (PC) Register on the Jabber server

At the moment, only a very particular server setup works for Sugar collaboration – so you need to use a Jabber server on a school server, or a community jabber server – or set one up yourself. Assuming you have XOs connected to a server, register your Jabber client with that server:

Register Jabber account

Register Jabber account

(At this stage there is no federation of servers, so you must register on that particular server.)

Step 2: See the XO(s) on your buddy list

Currently everyone sees everyone else on the server, in a special group, usually called Online. In this example there is only one XO connected to the server but there may be many.

See XOs in Buddy List

See XOs in Buddy List

Step 3: Start a chat with an XO buddy

Start a chat with the XO. Type a message and send it to start the connection:

Start a chat

Start a chat

Step 4: Sugar displays a notification

On the XO, Sugar will display a notification in the toolbar of the current view or activity, showing an invitation to Chat.

Sugar notification

Sugar notification

You can click on it directly to start Chat, or on the frame invitation:

Step 5: Invitation in the frame

If you view the frame you will see the invitation to Chat. Click on the icon, or hover to get the rollover menu with Join and Decline options.

Frame invitation

Frame invitation

Join, or click the icon.

Step 6: Chat starts

The Chat activity is launched. Note that the “Share with” option is gone, since you cannot share this chat connection with other XOs.

Chat starts

Chat starts

The message(s) sent from the Jabber client are displayed.

Step 7: Chat in progress

Continue the conversation, and it will be displayed as usual in Chat:

Chat in progress

Chat in progress - Sugar

and in the Jabber client:

Chat in progress - PC

Chat in progress - PC

Thanks to Guillaume Desmottes and the other Collaborans for assistance.