[etoys-dev] Re: npsqueakrun hack on Ubuntu

K. K. Subramaniam kksubbu.ml at gmail.com
Fri May 21 06:45:57 EDT 2010


On Friday, May 21, 2010 01:19:10 pm Bert Freudenberg wrote:
> On 20.05.2010, at 20:45, K. K. Subramaniam wrote:
> > Hi,
> > 
> > I had to hack npsqueakrun script to workaround a problem in npsqueakrun
> > that caused it to fail in Ubuntu. The seventh argument (script) is empty
> > and gets lost in the last exec. So the startup code in the image got one
> > argument less and that messed up the param value pairs. I passed
> > /dev/null to workaround this problem.
> 
> Which npsqueakrun script was this? The document arg should just be an empty
> string.
The one in trunk but my phrasing is all wrong. The bug was introduced by my 
hack :-(. I was trying to trim down the trunk version and introduced a subtle 
bug. On Ubuntu $* and $@ behave differently. So when I exec-ed vm with "$*" 
instead of "$@" the empty string got dropped. Bad me.

> > I am posting the hack to discuss if we really need a separate npsqueakrun
> > script? if npsqueak passes /dev/null for script then npsqueak can be
> > symlinked directly to vmdir/bin/squeak.
This was my real purpose behind the mail. Now that I have tracked the bug the 
empty script name should'nt matter. I hacked out all the redundant code out of 
the launch script till I had only a one-liner:
   exec $HOME/.npsqueak/vmdir/bin/squeak "$@"

Now I could eliminate it altogether. I need only three symlinks in ~/.npsqueak 
to get the plugin going:

   ln -s $VMDIR/lib/squeak/npsqueak.so npsqueak.so
   ln -s $VMDIR/bin/squeak                     npsqueakrun
   ln -s $IMAGEDIR/Contents/Resources/etoys.image SqueakPlugin.image
 
and Etoys plugin opens in a jiffy (once past the RTT latency for downloading 
the launch jsp). It is also easy to test different VMs and images combinations 
in browsers.

Subbu


More information about the etoys-dev mailing list