OLPC XO Opera browser as Sugar activity

Bert Freudenberg bert at freudenbergs.de
Fri Jun 27 06:30:23 EDT 2008


Am 27.06.2008 um 04:05 schrieb Stevens:

> Hi Bert, all --
>
> On Jun 25, 2008, at 11:37 PM, Bert Freudenberg wrote:
>
>> Sure. Do not use the Python script. You don't want to run a Python  
>> activity but a native one - otherwise you get two windows, the  
>> empty one opened by Python and the real one by Opera. Instead, you  
>> only need a tiny shell script that preloads a little library, which  
>> may work with Opera:
>>
>> http://lists.laptop.org/pipermail/devel/2008-January/009387.html
>
> I tried a shell script and it works:
>
> #!/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="OperaBrowse"
> exec opera -notrayicon -personaldir $SUGAR_ACTIVITY_ROOT/data &
>
> This starts Opera from Sugar and it runs correctly. Thanks for the  
> direction.
>
> -Peter

See - it's not hard ;)

Now, all of this was known before. Could you put links on the wiki or  
where-ever you unsuccessfully tried to get information from, so the  
next person will have an easier time? I am too involved to imagine  
where newcomers look for information, since making non-Python  
activities work is part of my day job ...

- Bert -

>> And since you're investigating this, what would be great is if you  
>> could re-package Opera as a real activity. That means, just move  
>> the Opera files that are normally installed in the system into the  
>> bundle itself, and setup the environment in the shell script so it  
>> works from that non-standard directory. Then zip up the activity  
>> directory, rename to .xo, and we have a real Opera bundle :) That  
>> way it would also survive a system upgrade which erases all  
>> manually installed RPMs.
>>
>> - Bert -



More information about the Devel mailing list