"sugarize" tool and Tux Paint
david at lang.hm
david at lang.hm
Thu Jan 10 18:34:06 EST 2008
these don't seem to work on build 679 (tux paint, xlogo, or this script)
On Mon, 7 Jan 2008, Bert Freudenberg wrote:
> On Dec 29, 2007, at 8:48 , Albert Cahalan wrote:
>> I wrote a tool to make normal X programs to run under sugar.
>> As a demo, it runs a logo program.
>> 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.
> Cool. Works fine with xlogo (on latest ship.2 build).
> With xeyes, on the second start I get two colored icons, one of which
> keeps pulsing. With xterm, I get the regular gray non-activity icon,
> plus a pulsing one that won't stop. Apparently not even these basic X
> programs use the same method for opening windows?
>> A slightly newer version is included in the Tux Paint activity.
> Hmm, didn't help.
> Btw, I made a shell version of your sugarize C program. It's easier
> to customize, feel free to use:
> while [ -n "$2" ] ; do
> case "$1" in
> -b | --bundle-id) export SUGAR_BUNDLE_ID="$2" ;;
> -a | --activity-id) export SUGAR_ACTIVITY_ID="$2" ;;
> -o | --object-id) export SUGAR_OBJECT_ID="$2" ;;
> -u | --uri) export SUGAR_URI="$2" ;;
> *) echo unknown argument $1 $2 ;;
> export LD_PRELOAD="$SUGAR_BUNDLE_PATH/lib/libsugarize.so"
> export NET_WM_NAME="X Logo"
> exec xlogo
> - Bert -
> Devel mailing list
> Devel at lists.laptop.org
More information about the Devel