Setting UpSugarbot is installed and run in a manner very similar to most Activities. It also has an automated-launcher tool to be used in conjunction with a buildbot. - Get Sugarbot
- Download the latest stable package from the Downloads page.
- Perform an SVN update to get the latest development version of Sugarbot
- svn co http://sugarbot.googlecode.com/svn/trunk/sugarbot/ sugarbot.Activity
- Copy the folder into your Sugar Activities folder.
- cp -R sugarbot ~/Activities/sugarbot.Activity
- In order for sugarbot to start automatically, a small change must be made to the main.py in the Sugar distribution.
- In the sugarbot directory, there is a file named modded-main.py. It has been tested with the Ubuntu Hardy packages. Either:
- Replace sugar/shell/main.py with modded-main.py
- Diff the files and make the necessary changes for sugarbot
Configuring SugarSugar runs without configuration out of the box. Simply rename sample-config.py to config.py. config.py allows you to select the port that is used for connecting, as well as specify the IP address of the interface that the server listens on, and the IP address of that the clients will connect to. Launching Sugar- Launch the sugarbot XML-RPC server. The XML-RPC server is self-contained in sbrpcserver.py.
- The syntax is: python sbrpcserver.py sugarbot_script
- python sbrpcserver.py script_calculate.py script_terminal.py
- Two options are available for launching sugarbot:
- To automatically launch sugarbot when Sugar starts:
- Launch Sugar by using the included sugarbotlauncher.py tool.
- When all of the scripts have been executed from the XML-RPC server, the Sugar session will exit.
- The return value will be 0 if all of the scripts executed without error, otherwise 1.
- To manually launch Sugarbot:
- Launch Sugar.
- Launch the sugarbot Activity (if you did not perform the step above). sugarbot will automatically contact the XML-RPC server, and run the provided script.
Using sugarbot with buildbotAn example master.cfg has been provided for using buildbot with sugarbot. It has been tested on Ubuntu Hardy Heron, using the Sugar and buildbot packages from the apt-get repository. In order for Sugar to run properly, it may be required to enter the following command into the terminal: sudo xhost +. This enables X11 connections from any host, which is a requirement for buildbot to operate properly with Sugar.
|