[squeak-dev] Installing Etoys and Squeak on Ubuntu 9.04

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Installing Etoys and Squeak on Ubuntu 9.04

Ricardo Moran
Hi, I'm starting to work on Linux, I installed Ubuntu 9.04 and I was trying to install Etoys and Squeak. I should tell you: I am a Windows user with no experience in Linux.
I downloaded the EtoysInstaller.deb from squeakland and it worked fine. Then I tried to install squeak following the instructions I found in http://wiki.squeak.org/squeak/3616. This also worked, I typed squeak in the terminal and Squeak opened.
Then I tried to use one of my own images in which I usually work (on Windows), so I opened it using the command "squeakvm". The image worked almost fine, the only problem I found was that the buttons on the "Sugar Navigator Flap" wasn't displayed correctly.
Then I tried to open Etoys using the menu "Applications->Education->eToys" but it didn't open anymore. I went to /usr/share/etoys and tried to open the etoys.image with squeakvm and it opened with an error: "A primitive has failed" and the display all wrong (I had to redraw the screen by clicking on "display mode->scale to fit").
I tried reinstalling Etoys but the Package Installer tells me that "A later version is already installed". I suppose the Etoys image needs a different vm but I don't know where to find it.
What do you think I should do?


Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Bert Freudenberg

On 03.08.2009, at 21:17, Ricardo Moran wrote:

Hi, I'm starting to work on Linux, I installed Ubuntu 9.04 and I was trying to install Etoys and Squeak. I should tell you: I am a Windows user with no experience in Linux.
I downloaded the EtoysInstaller.deb from squeakland and it worked fine. Then I tried to install squeak following the instructions I found in http://wiki.squeak.org/squeak/3616. This also worked, I typed squeak in the terminal and Squeak opened.
Then I tried to use one of my own images in which I usually work (on Windows), so I opened it using the command "squeakvm". The image worked almost fine, the only problem I found was that the buttons on the "Sugar Navigator Flap" wasn't displayed correctly.
Then I tried to open Etoys using the menu "Applications->Education->eToys" but it didn't open anymore. I went to /usr/share/etoys and tried to open the etoys.image with squeakvm and it opened with an error: "A primitive has failed" and the display all wrong (I had to redraw the screen by clicking on "display mode->scale to fit").
I tried reinstalling Etoys but the Package Installer tells me that "A later version is already installed". I suppose the Etoys image needs a different vm but I don't know where to find it.
What do you think I should do?

To get a working Etoys, uninstall the Etoys distro package, then re-install the Squeakland one (which contains a VM).

To work with other Squeak images, install the ubuntu squeak packages. Or get a VM from squeakvm.org, and image/changes/sources from squeak.org, and use them, if you want more recent ones.

All of these can happily live together, just do not install the Ubuntu etoys package, which breaks Etoys and is outdated anyway.

- Bert -




Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Installing Etoys and Squeak on Ubuntu 9.04

David Mitchell-10
In reply to this post by Ricardo Moran
Almost certainly an image/vm mismatch.

I am a windows expert and moderately competent in Ubuntu.

My practice is to grab one of the one-click distributions and put my
image there. I've been teaching my kids using Stephane's Robot's book.
I used the One-click Seaside. We put it on a USB key and move it from
Windows to Linux depending on what machine is available.

On Mon, Aug 3, 2009 at 2:17 PM, Ricardo Moran<[hidden email]> wrote:

> Hi, I'm starting to work on Linux, I installed Ubuntu 9.04 and I was trying
> to install Etoys and Squeak. I should tell you: I am a Windows user with no
> experience in Linux.
> I downloaded the EtoysInstaller.deb from squeakland and it worked fine. Then
> I tried to install squeak following the instructions I found in
> http://wiki.squeak.org/squeak/3616. This also worked, I typed squeak in the
> terminal and Squeak opened.
> Then I tried to use one of my own images in which I usually work (on
> Windows), so I opened it using the command "squeakvm". The image worked
> almost fine, the only problem I found was that the buttons on the "Sugar
> Navigator Flap" wasn't displayed correctly.
> Then I tried to open Etoys using the menu "Applications->Education->eToys"
> but it didn't open anymore. I went to /usr/share/etoys and tried to open the
> etoys.image with squeakvm and it opened with an error: "A primitive has
> failed" and the display all wrong (I had to redraw the screen by clicking on
> "display mode->scale to fit").
> I tried reinstalling Etoys but the Package Installer tells me that "A later
> version is already installed". I suppose the Etoys image needs a different
> vm but I don't know where to find it.
> What do you think I should do?
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Ricardo Moran
In reply to this post by Bert Freudenberg
Thanks David and Bert. I uninstalled Squeak and Etoys and re-installed the Squeakland package. Then I searched the etoys script and find out how to open my image with the correct vm. Everything is working now :)


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Bellani
On Mon, Aug 3, 2009 at 5:31 PM, Ricardo Moran<[hidden email]> wrote:
> Thanks David and Bert. I uninstalled Squeak and Etoys and re-installed the
> Squeakland package. Then I searched the etoys script and find out how to
> open my image with the correct vm. Everything is working now :)
>
>
>
>
There is also a problem with the sound of both etoys(the one downloaded from squeakland)
and squeak. (try it executing the code: Beeper beep.)

To fix it I did this this with etoys:
sudo gedit /usr/bin/etoys

go to line  12
add this
-vm sound=OSS
so the resulting line would be:

VMOPTIONS="-encoding UTF-8 -plugins $BIN -vm-display-x11 -vm sound=OSS"


--
Eduardo Bellani

www.cnxs.com.br

Someone once called me "just a dreamer"
That offended me, the "just" part.
Being a dreamer is hard work.
It really gets hard when you start believing in your dreams.
--Doug Engelbart




signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Bellani
In reply to this post by Ricardo Moran
On Mon, Aug 3, 2009 at 5:31 PM, Ricardo Moran<[hidden email]> wrote:
> Thanks David and Bert. I uninstalled Squeak and Etoys and re-installed the
> Squeakland package. Then I searched the etoys script and find out how to
> open my image with the correct vm. Everything is working now :)
>
>
>
>
There is also a problem with the sound of both etoys(the one downloaded from squeakland)
and squeak. (try it executing the code: Beeper beep.)

To fix it I did this this with etoys:
sudo gedit /usr/bin/etoys

go to line  12
add this
-vm sound=OSS
so the resulting line would be:

VMOPTIONS="-encoding UTF-8 -plugins $BIN -vm-display-x11 -vm sound=OSS"


--
Eduardo Bellani

www.cnxs.com.br

Someone once called me "just a dreamer"
That offended me, the "just" part.
Being a dreamer is hard work.
It really gets hard when you start believing in your dreams.
--Doug Engelbart




signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Bert Freudenberg
In reply to this post by Bellani

On 04.08.2009, at 00:30, [hidden email] wrote:

> On Mon, Aug 3, 2009 at 5:31 PM, Ricardo Moran<[hidden email]>  
> wrote:
>> Thanks David and Bert. I uninstalled Squeak and Etoys and re-
>> installed the
>> Squeakland package. Then I searched the etoys script and find out  
>> how to
>> open my image with the correct vm. Everything is working now :)
>>
>>
>>
>>
> There is also a problem with the sound of both etoys(the one  
> downloaded from squeakland)
> and squeak. (try it executing the code: Beeper beep.)
>
> To fix it I did this this with etoys:
> sudo gedit /usr/bin/etoys
> go to line  12
> add this -vm sound=OSS so the resulting line would be:
>
> VMOPTIONS="-encoding UTF-8 -plugins $BIN -vm-display-x11 -vm  
> sound=OSS"

At least on Fedora 11 you also need to install the alsa-oss wrapper,  
and run squeak under aoss.

If anyone wants to fix this for real, the ticket is

http://bugs.squeak.org/view.php?id=7328

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

dcorking
Bert wrote:

> If anyone wants to fix this for real, the ticket is
>
> http://bugs.squeak.org/view.php?id=7328

(1)

Thanks for the link.  Will the workaround be in the next Squeakland
version of /usr/bin/etoys ?

(2)

What benefits are there from maintaining ALSA or PulseAudio support in
the VM?   As far as I know they are specific to Linux(*), while OSS
(Open Sound System) works on most Unix except Mac OS X.

Which sound interface does the OLPC XO (and Sugar) need?

Best, David

(*) I just read that PulseAudio was ported to some non-Linux
platforms, but that at least one leading Linux distributions only got
it working in 2009.

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Bert Freudenberg

On 04.08.2009, at 16:23, David Corking wrote:

> Bert wrote:
>
>> If anyone wants to fix this for real, the ticket is
>>
>> http://bugs.squeak.org/view.php?id=7328
>
> (1)
>
> Thanks for the link.  Will the workaround be in the next Squeakland
> version of /usr/bin/etoys ?

Only if someone can think of a way to reliably detect the problem.

> (2)
>
> What benefits are there from maintaining ALSA or PulseAudio support in
> the VM?   As far as I know they are specific to Linux(*), while OSS
> (Open Sound System) works on most Unix except Mac OS X.

OSS is obsolete. It's not supported out-of-the-box on most modern  
Linux distros anymore. If at all, it is provided by an emulation layer  
like alsa-oss which adds considerable delay. We would get Squeak  
talking to OSS talking to emulated ALSA talking to PulseAudio talking  
to real ALSA. No wonder there is delay in that.

Here is an overview of the various Linux sound APIs:

http://0pointer.de/blog/projects/guide-to-sound-apis.html

> Which sound interface does the OLPC XO (and Sugar) need?


Etoys sound works fine on the XO, which uses an older Fedora with  
straight ALSA. But Sugar runs on all distros, and the newer ones  
reroute ALSA calls to PulseAudio. This is what appears to break Squeak  
sound, because it works fine on "real ALSA" but breaks on "emulated  
ALSA".

The Right Way To Fix It would appear to be rewriting our ALSA plugin  
to use the "safe subset" of ALSA which is properly understood by  
PulseAudio.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Yoshiki Ohshima-2
In reply to this post by dcorking
At Tue, 4 Aug 2009 15:23:21 +0100,
David Corking wrote:
>
> (2)
>
> What benefits are there from maintaining ALSA or PulseAudio support in
> the VM?   As far as I know they are specific to Linux(*), while OSS
> (Open Sound System) works on most Unix except Mac OS X.
>
> Which sound interface does the OLPC XO (and Sugar) need?

  On XO, ALSA is the preferred driver.  Even there is some support
code in to switch the audio input port on XO to direct sensor input
mode.

-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

dcorking
In reply to this post by Bert Freudenberg
The addition to line 12 of /usr/bin/etoys should be:
 -vm-sound-oss
(all hyphens - the punctuation was garbled in one of the earlier messages.)

Bert Freudenberg wrote:

> Only if someone can think of a way to reliably detect the problem.
...
>  (PulseAudio) is what appears to break Squeak sound, because it works
> fine on "real ALSA" but breaks on "emulated ALSA".

Oh, I had hoped the workaround would be an effective fallback for
everyone on Debian derivatives.  I bet the lack of native ALSA is far
from trivial to detect in a shell script :(

> OSS is obsolete. It's not supported out-of-the-box on most modern Linux
> distros anymore. If at all, it is provided by an emulation layer like
> alsa-oss which adds considerable delay. We would get Squeak talking to OSS
> talking to emulated ALSA talking to PulseAudio talking to real ALSA. No
> wonder there is delay in that.

I haven't done any testing - is the delay noticeable?  The OSS API
(via emulation layers) is not obsolete, and OSS is still the standard
on BSD.

10 years ago, ALSA was the next big thing.  Now, ALSA is fading away,
and OSS and /dev/dsp , with all their flaws, are still here.

> Here is an overview of the various Linux sound APIs:
>
> http://0pointer.de/blog/projects/guide-to-sound-apis.html

(great guide - thanks -  and the author admits his bias too!  I also
enjoyed the linked article:  http://lwn.net/Articles/299211/  and
comments)

Given that so many distros have already gone to PulseAudio, Lennart
makes a pretty convincing case for the Linux VM to move towards a
"PulseAudio-safe" subset of the ALSA API.  Thanks for your patience
with me.

David

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

dcorking
In reply to this post by Yoshiki Ohshima-2
Yoshiki Ohshima wrote:

>  On XO, ALSA is the preferred driver.  Even there is some support
> code in to switch the audio input port on XO to direct sensor input
> mode.

Which are the main classes or methods for direct sensor input?  Is there a tile?

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Bert Freudenberg
In reply to this post by dcorking
On 04.08.2009, at 21:51, David Corking wrote:

> Bert Freudenberg wrote:
>
>> Only if someone can think of a way to reliably detect the problem.
> ...
>> (PulseAudio) is what appears to break Squeak sound, because it works
>> fine on "real ALSA" but breaks on "emulated ALSA".
>
> Oh, I had hoped the workaround would be an effective fallback for
> everyone on Debian derivatives.  I bet the lack of native ALSA is far
> from trivial to detect in a shell script :(

Yes, but detecting active pulseaudio is simpler. See my comment on

http://tracker.squeakland.org/browse/SQ-214

>> OSS is obsolete. It's not supported out-of-the-box on most modern  
>> Linux
>> distros anymore. If at all, it is provided by an emulation layer like
>> alsa-oss which adds considerable delay. We would get Squeak talking  
>> to OSS
>> talking to emulated ALSA talking to PulseAudio talking to real  
>> ALSA. No
>> wonder there is delay in that.
>
> I haven't done any testing - is the delay noticeable?

We tried it in SoaS on an Intel Classmate in Mexico today. First using  
the alsa-oss wrapper which had an awful delay. Then using the padsp  
wrapper, much better, but still with a slight delay.

> The OSS API
> (via emulation layers) is not obsolete, and OSS is still the standard
> on BSD.

You are right - but since in many Linux distros it is not pre-
installed anymore (not even the emulation wrapper) we cannot rely on  
it. Likewise, it is not on the OLPC XO (which actually prompted doing  
the ALSA driver).

> 10 years ago, ALSA was the next big thing.  Now, ALSA is fading away,
> and OSS and /dev/dsp , with all their flaws, are still here.

ALSA seems to still be the low-level interface of choice. It's just  
that PulseAudio is trying to virtualize it, breaking some code.

>> Here is an overview of the various Linux sound APIs:
>>
>> http://0pointer.de/blog/projects/guide-to-sound-apis.html
>
> (great guide - thanks -  and the author admits his bias too!  I also
> enjoyed the linked article:  http://lwn.net/Articles/299211/  and
> comments)
>
> Given that so many distros have already gone to PulseAudio, Lennart
> makes a pretty convincing case for the Linux VM to move towards a
> "PulseAudio-safe" subset of the ALSA API.  Thanks for your patience
> with me.


Well, the code is here if you want to try:

http://squeakvm.org/svn/squeak/trunk/platforms/unix/vm-sound-ALSA/sqUnixSoundALSA.c

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Yoshiki Ohshima-2
In reply to this post by dcorking
At Tue, 4 Aug 2009 21:02:52 +0100,
David Corking wrote:
>
> Yoshiki Ohshima wrote:
>
> >  On XO, ALSA is the preferred driver.  Even there is some support
> > code in to switch the audio input port on XO to direct sensor input
> > mode.
>
> Which are the main classes or methods for direct sensor input?  Is there a tile?

  From the Multimedia category of Object Catalog, drag out
WorldStethoscope object.  There you can click on the AC/DC button to
switch it.  There aren't enough number of tiles to control
WorldStethoscope and graphs you can create from it for now...

-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

dcorking
In reply to this post by Bert Freudenberg
Bert Freudenberg wrote:

> Yes, but detecting active pulseaudio is simpler. See my comment on
>
> http://tracker.squeakland.org/browse/SQ-214
>

Great!  That code works fine on my Ubuntu 9.04 box.

David

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Timothy Falconer-3
In reply to this post by Bellani
On Aug 3, 2009, at 6:31 PM, [hidden email] wrote:

> On Mon, Aug 3, 2009 at 5:31 PM, Ricardo Moran<[hidden email]>  
> wrote:
>> Thanks David and Bert. I uninstalled Squeak and Etoys and re-
>> installed the
>> Squeakland package. Then I searched the etoys script and find out  
>> how to
>> open my image with the correct vm. Everything is working now :)
>>
>>
>>
>>
> There is also a problem with the sound of both etoys(the one  
> downloaded from squeakland)
> and squeak. (try it executing the code: Beeper beep.)
>
> To fix it I did this this with etoys:
> sudo gedit /usr/bin/etoys
> go to line  12
> add this -vm sound=OSS so the resulting line would be:
>
> VMOPTIONS="-encoding UTF-8 -plugins $BIN -vm-display-x11 -vm  
> sound=OSS"

Can someone put this on the "secrets" wiki page?  (all such tips  
should go there as a temporary place before more formal documentation).

http://wiki.squeakland.org/display/sq/Secrets

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: [etoys-dev] Installing Etoys and Squeak on Ubuntu 9.04

Bert Freudenberg
On 31.08.2009, at 15:48, Timothy Falconer wrote:

> On Aug 3, 2009, at 6:31 PM, [hidden email] wrote:
>
>> On Mon, Aug 3, 2009 at 5:31 PM, Ricardo  
>> Moran<[hidden email]> wrote:
>>> Thanks David and Bert. I uninstalled Squeak and Etoys and re-
>>> installed the
>>> Squeakland package. Then I searched the etoys script and find out  
>>> how to
>>> open my image with the correct vm. Everything is working now :)
>>>
>> There is also a problem with the sound of both etoys(the one  
>> downloaded from squeakland)
>> and squeak. (try it executing the code: Beeper beep.)
>>
>> To fix it I did this this with etoys:
>> sudo gedit /usr/bin/etoys
>> go to line  12
>> add this -vm sound=OSS so the resulting line would be:
>>
>> VMOPTIONS="-encoding UTF-8 -plugins $BIN -vm-display-x11 -vm  
>> sound=OSS"
>
> Can someone put this on the "secrets" wiki page?  (all such tips  
> should go there as a temporary place before more formal  
> documentation).
>
> http://wiki.squeakland.org/display/sq/Secrets


No need to. The workaround has been added to the 4.0.2247 beta two  
weeks ago:

http://svn.squeakland.org/installers/NEWS

and also to the upcoming VM releas:

http://squeakvm.org/svn/squeak/trunk/platforms/unix/cmake/squeak.in

- Bert -