Hacking Sugar: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 52: Line 52:
<li> IRC (Internet Relay Chat) - irc.freenode.net #olpc #sugar #olpc-help
<li> IRC (Internet Relay Chat) - irc.freenode.net #olpc #sugar #olpc-help
<li> Mailing List
<li> Mailing List
<li> Teleconferences Call
<li> WiKi! http://wiki.laptop.org
</ul>
</ul>

Always you can find someone available to help in the IRC channels, join us!


== Sugar ==
== Sugar ==

Revision as of 17:06, 19 September 2007

Introduction

Hacking Sugar is a public resource for developers that want to get involved in the Sugar Shell development. Here you can find useful information about how to hack/write new sugar components or write external activities and how to integrate them in Sugar.

Sugar is a big opportunity for developers, you can get involved and get the chance to create and improve this wonderful graphical Shell

Motivation

In the latest two years, OLPC has developed and improved a lot of components for the XO platform, including Hardware, Firmwares, Linux Devices Drivers and a graphical shell for kids called Sugar. Start to work in a open source project, sometimes can be a little difficult if you don't have an updated documentation about "how this piece of software work?", and you have to spent some time reading the source code.

The OLPC project, specially Sugar is changing every day, new API, new components, new ideas, etc. The main idea of "Hacking Sugar" is to write a collaborative document where you can find the exactly information about your needs and a lot of tips from experienced developers.

Is this document for me ?

Every time that we read some document, we ask our self if the document is what that we want, so let's do some questions before to spent some hours reading this:

  • do I have a developer skill, if don't, do I would like to have one?
  • do I want to learn a lot of Python, GTK, and Sugar Internals ?
  • do I want to contribute to put a better laptop in the hands of every child ?

well, if you are reading this line I'm happy that we got a new contributor.

OLPC, a collaborative work

OLPC is a big project, and talking about the software components we can't avoid to talk about how the development is done?. OLPC have a main staff of developers, most of them provided by RedHat Inc. and lot of collaborators and volunteers from different countries, and big part of this job is done through Internet. Let's understand how.

Software are in repositories

Repositories are specialized software hosted in central servers that allow to manage different project with a Control Version System, the selected one by OLPC is GIT. So all pieces of software of OLPC are hosted in a development server called dev.laptop.org, every piece of software has his own repository and his own maintainer and developers. You can browse through the code, look for applied patches, commits, revision changes, etc. A real example about this is here:


About how to get the software from the GIT respositories, do some patch and others, please read this helpful pages:


So if u have in mind to develop some SW, try to install GIT in your local Linux distribution, is a good step to start ;)

Communication

Share ideas is fundamental, and more important is the opinion from other about it. Communication is the base of every project and is more difficult in this case where the people is around the world, OLPC use different channels of communications as:

  • IRC (Internet Relay Chat) - irc.freenode.net #olpc #sugar #olpc-help
  • Mailing List
  • Teleconferences Call
  • WiKi! http://wiki.laptop.org

Always you can find someone available to help in the IRC channels, join us!

Sugar

Sugar is the core of the OLPC Human Interface. Its goal is to turn the Laptop into a fun, easy to use, social experience that promotes sharing and learning. Our first steps, is learn how sugar works, in order to do that, is necessary to have some basic Python knowledge , if you don't know about python, you can learn about it in http://www.diveintopython.org , please read the book, do so examples and come back here :) .

Sugar is not a Desktop as Gnome, KDE or XFCE, it's a Graphical Shell for Kids and this shell has been written from scratch following the HIG (Human Interface Guidelines). So every change, feature or new component in the core of sugar must be approved by the designer team.

This great UI (user interface), needs external components to work in a better way (similar to normal Desktops), as base, we need a Linux OS (no restricted distribution) and aditional software as:

  • D-Bus
  • HAL
  • Hippo-Canvas
  • GTK+
  • Avahi
  • Matchox Window Manager
  • Network Manager
  • Others...

How Sugar takes the control?

Talking about code, Sugar is a GTK+ program that require a Windows Manager and a X Server. A main python script called sugar-shell execute the matchbox-window-manager and this last one connect to the X server, and then the script stay in the gtk main loop. Now we have a main window as an UI and have the control. Please take a look to: