"sugarize" tool and Tux Paint
Albert Cahalan
acahalan at gmail.com
Sat Dec 29 02:48:33 EST 2007
I wrote a tool to make normal X programs to run under sugar.
As a demo, it runs a logo program.
http://dev.laptop.org/~albert/xlogo-1.xo
http://dev.laptop.org/git?p=users/albert/sugarize;a=summary
How it works: A launcher program places Sugar's incompatible command
arguments into the environment, along with LD_PRELOAD pointing at
a shared library. The launcher then starts up the program by calling
execlp() with the arguments that the program actually needs. As the
program is starting up, the dynamic linker ("man ld.so") forces the
shared library into the program. The shared library intercepts calls
into libX11. From that intercepted function the shared library is
able to set various Sugar-specific window properties before the app
becomes visible. This lets activity switching work, gets the donut
icon right, etc.
A slightly newer version is included in the Tux Paint activity.
http://wiki.laptop.org/go/Tux_Paint
More information about the Devel
mailing list