Scratch Wiki > Linux installers

Linux installers

Debian/Ubuntu Installer

We are currently working on an Ubuntu package for Scratch 1.4.  Below you will find information about the experimental Ubuntu package for Scratch 1.3.1. 

The following package is still experimental and you should treat it as such.  See known issues below for details about bugs and things we need help with.

Download latest version of Scratch for Linux, scratch-1.3.1_0.9-4_i386.deb for Ubuntu 8.10.

From Command Line Interface

Install the package

sudo dpkg -i scratch-1.3.1_0.9-4_i386.deb

To uninstall you can do:

sudo dpkg --remove scratch-1.3.1
Notes:

Scratch (actually squeakvm's) sound works on top of ALSA-OSS emulation, so we need to install additional packages to make this emulation work.

There are two packages needed here:
- alsa-oss
- libasound2-plugins

So, if you need to work with sound in Scratch, you should install those packages

sudo apt-get install alsa-oss libasound2-plugins

[RIA]

Generic Linux installer

Before we got actively involved in the creation of an Ubuntu installer, we packaged an experimental version of a Linux installer created for Scratch 1.3.1.   This installer uses David Thornburg and tookelso's perl script and overall structure. I was able to run it successfuly  on my system (Thinkpad x300 with Ubuntu Intrepid Ibex 8.10, 32-bit). A few things do not work:

  1. MIDI (drum and note blocks)
  2. .sb  file type association
  3. Sound input/output. I get some errors but it could be just a problem with my system.

ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Timeout

startSound: snd_pcm_open: Connection refused

X connection to :0.0 broken (explicit kill or server shutdown).

ALSA lib pulse.c:272:(pulse_connect) PulseAudio: Unable to connect: Timeout

(NOTE: The sound issues may arise from the fact that the Ubuntu Squeak package is missing the vm-sound-ALSA file for some reason. -- JHM)

Commands to install:

wget http://info.scratch.mit.edu/@api/deki/files/698/=Scratch1.3.1Linux.tar.gz -O Scratch1.3.1Linux.tar.gz
tar zxf Scratch1.3.1Linux.tar.gz
cd Scratch1.3.1Linux
perl scratch_install.pl  

Compiling

You should not need to recompile anything if you are using a recent version of Ubuntu (7.x or 8.x). However, if you do need to rebuild the binaries, the source code for the Squeak virtual machine is available at http://www.squeakvm.org/unix/ and the source code for the special Scratch plugins is available here.

Known Issues

Here are the known problems as of March 10, 2009. 

  • Current versions of Scratch on Linux do not close when (X) or Alt-F4 is pressed.
  • Drum and tone blocks make no sound due to lack of MIDI support. Some users have explored using TIMIDITY to support MIDI on Linux, but that appears to create other sound problems due to contention for the sound device.

 

We could use some help from the Open Source community with...

 Sound issues...

I'll try to summarize where we are with the sound issues in Ubuntu 8.0x -

First, a bit of background about Scratch: Scratch runs on Squeak, which is written in smalltalk, one of the first object oriented languages.  So Scratch is an 'image' that runs in a squeak virtual machine built for a particular OS.  Squeak is an Ubuntu package but we don't use the one from the repos - our Scratch package installs its own copy of the Squeak VM.

There are two major issues having to do with sound - playback and recording of sounds, and playback of midi sounds.

1. Playback and recording of Sound.  Scratch has two plugins to play sound and can use one or the other - an Alsa plugin and an OSS plugin. Based on our research, it seems like ALSA is the interface that will last longer into the future.  The Alsa plugin works on current versions of Fedora, Ubuntu 7.10, and the linux underneath OLPC's Sugar, but seems to have stopped working as of Ubuntu 8.04. We heard there were some changes to the sound system starting in 8.04 that we think might have broken it (introduction of  pulseaudio?).  Is there information about this in the community that might be useful / relevant in troubleshooting this? 
When trying to play sound via the Alsa plugin, we get the following:

  Playback will return error:
    "soundStart: snd_add_pcm_handler: Function not implemented"
  Record will return error:
    "sound_StartRecording: snd_add_pcm_handler: Function not implemented"

The latest package is working via the OSS plugin, but doesn't seem like a long term / clean solution - or is it?

2. The midi stuff (lower priority, but a bug we'd love to squash)
We don't know of a good way to play midi sounds from the note / drum blocks in Scratch on Ubuntu.  In Windows and Mac, there are libraries we can call that will do it.  On Ubuntu it seems murkier - we've found a midi synthesizer package called timidity that we think might be the solution, but we're kind of hung up on how to get the midi commands to it. Here's how our lead programmer summed it up:

"Another issue that someone could work on would be to get Squeak to send MIDI commands to Timidity. Squeak is supposed to be doing that already, but there are apparently some issues with the port number, etc. Fixing this problem would probably involve patching the Squeak VM code (probably the ALSA plugin) and then getting Ian Piumarta to incorporate those patches into the Linux Squeak code base. This is lower priority than getting sound recording to work since many more kids use the sound recorder than use the note/drum blocks."

If you can help us solve these problems, we'd love to hear from you on this thread:

http://scratch.mit.edu/forums/viewtopic.php?id=21&p=3 

Thanks for reading! 


 

 

 



If you want to contribute your time and effort to port Scratch to Linux please let us know on this forum thread or e-mail us directly.
Tag page

Files 15

FileSizeDateAttached by 
 scratch-1.3.1-0.9-3.tar.gz
Linux Source Installer
31.28 MB12:17, 23 Feb 2009rezaiskandarActions
 scratch-1.3.1-0.9.tar.gz
Linux Source Installer
30.94 MB11:39, 6 Feb 2009rezaiskandarActions
 scratch-1.3.1_0.8-1_i386.deb
Linux Binary Installer for Ubuntu 8.10
30.48 MB17:45, 5 Feb 2009rezaiskandarActions
 scratch-1.3.1_0.9-1_i386.deb
Linux Binary Installer for Ubuntu 8.10
30.81 MB11:39, 6 Feb 2009rezaiskandarActions
 scratch-1.3.1_0.9-2_i386.deb
Linux Binary Installer for Ubuntu 8.10
31.02 MB07:00, 23 Feb 2009rezaiskandarActions
 scratch-1.3.1_0.9-3_i386.deb
Linux Binary Installer for Ubuntu 8.10
31.02 MB12:24, 23 Feb 2009rezaiskandarActions
 scratch-1.3.1_0.9-4_i386.deb
Linux Binary Installer for Ubuntu 8.10
31.02 MB18:11, 5 Mar 2009rezaiskandarActions
Scratch1.3.1Linux.tar.gz
with plugins compiled on Ubuntu 8.10 32-bit
31.45 MB19:53, 25 Nov 2008andresmhActions
 scratch_1.3.1-0.3_i386.deb
Third experimental version
30.8 MB04:36, 3 Dec 2008andresmhActions
 scratch_1.3.1-0.4_i386.deb
No description
30.8 MB10:18, 3 Dec 2008andresmhActions
 scratch_1.3.1-0.5.dsc
Source package description file.
485 bytes04:21, 18 Dec 2008adjActions
 scratch_1.3.1-0.5.tar.gz
The sources for the binary package.
31.46 MB04:21, 18 Dec 2008adjActions
 scratch_1.3.1-0.5_i386.changes
Source package changelog.
1308 bytes04:21, 18 Dec 2008adjActions
 scratch_1.3.1-0.5_i386.deb
Installable binary package for Ubuntu 8.10
34.25 MB06:09, 17 Dec 2008adjActions
 scratch_1.3.1-0.6_i386.deb
Installable binary package for Ubuntu 8.10
30.8 MB06:18, 18 Dec 2008adjActions
You must login to post a comment.