Understanding Sugar code
OK, Sugar runs on an OLPC. The OLPC runs a stripped down Fedora Linux Operating System.
Open the Developer Console, and go to the Terminal tab. Click in the Terminal window, and switch to the root account:
To do this, let's use the superuser command, "su".
[olpc@localhost]$ su
What runs as part of sugar? Let's see what processes have the keyword sugar using both the "ps" command to list processes, and the grep command to filter for the processes with the word "sugar" in them.
bash-3.1# ps -eaf | grep sugar olpc 1290 1285 3 15:46 ? /usr/bin/python /usr/bin/sugar-shell olpc 1293 1285 3 15:46 ? matchbox-window-manager -kbdconfig /usr/share/sugar/kbdconfig ... olpc 1296 1285 3 15:46 ? dbus-launch --exit-with-session sugar-shell olpc 1298 1285 3 15:46 ? /usr/bin/python /usr/bin/sugar-presence-service olpc 1302 1285 3 15:46 ? /usr/bin/python /usr/bin/sugar-clipboard olpc 1304 1285 3 15:46 ? /usr/bin/python /usr/bin/sugar-nm-applet olpc 1306 1285 3 15:46 ? python /usr/bin/sugar-console olpc 1339 1285 3 15:46 ? grep sugar
Most things seem to run on python, not a big suprise. But right here, we can see some key architectural divisions:
- A shell
- A presence service (the right side of the sugar interface)
- A clipboard (The left side of the sugar interface)
- A nm applet utility of some kind (This might be the bottom stuff in the sugar interface)
- A console (probably the development console)
Also, there are two non-python type processes running, dbus-launch, and a matchbox-window-manager. I think matchbox is an automated test utility, and the dbus is for Inter-process communications (supporting the presence service, amongst other things)
So the questions are...
What starts the sugar shell? What is each service or utility?