"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)

suggestions?

David Lang

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.
>>
>> 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.
>
> 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.
>> http://wiki.laptop.org/go/Tux_Paint
>
> Hmm, didn't help.
>
> Btw, I made a shell version of your sugarize C program. It's easier
> to customize, feel free to use:
>
> #!/bin/sh
> 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 ;;
>     esac
>     shift;shift
> done
> 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
> http://lists.laptop.org/listinfo/devel
>


More information about the Devel mailing list