OLPC XO Opera browser as Sugar activity

Stevens informatics at fastmail.fm
Thu Jun 26 22:05:49 EDT 2008


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


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