Coding on the xo

From OLPC
Revision as of 01:26, 27 August 2007 by Natcl (talk | contribs) (Synergy)
Jump to: navigation, search

Overview

The goal of this page is to give some tips and tricks for people who need to edit code directly on the XO (as opposed to developing in sugar-jhbuild or with an emulator)

Every developer has his own workflow, I will describe some parts of my workflow which may help you.

Synergy

http://synergy2.sourceforge.net

The first tool that comes in handy when coding or working on the XO is Synergy. Synergy is a keyboard/mouse client/server utility. It will allow you to share your mouse and keyboard from one computer (the server) to several other computers (the clients) regardless of the OS. This will work similar to using multiple monitors, moving your mouse to the edge of the screen (you can select which edge) will transfer the mouse/keyboard to the client computer. I personally use a MacBook as my main computer with one or two XOs next to it and also a Windows desktop. Using Synergy I can control the 3 computers from my MacBook. Mac/Linux users can use QuickSynergy which is simpler to configure : http://quicksynergy.sourceforge.net

To install synergy on the XO, simply type "yum install synergy" in the terminal.

Note that with synergy you can copy/paste text from one computer to the other, this is really useful to copy error messages in the sugar console and paste them on IRC on your main machine.

sshfs

Using sshfs, you can mount the XO as a filesystem on another computer via SSH. You can use this to edit code from an OS specific IDE. You can for example mount the XO on your main development computer and use Eclipse (or any other IDE) to edit files on the XO. This coupled with synergy is quite powerful. On linux you can install sshfs pretty easily. (search for sshfs in Google) On a Mac you will need to install MacFuse first (http://code.google.com/p/macfuse/) and sshfs (available on the same page). As an alternative to Google's SSHFS package you can also use MacFusion (note that you still need to install MacFuse first) which has a better GUI and also supports FTP which can be useful : http://www.sccs.swarthmore.edu/users/08/mgorbach/MacFusionWeb