User Tools

Site Tools


Installing Scratch on SuSE 13

These instructions are about installing the Scratch programming language in OpenSuSe 13.1 (bottle).

First step: install squeak

The first thing we need is squeak, the smalltalk virtual machine. I've tried to install it by downloading it from its website, but it doesn't have all the necessary modules, specially the sound modules. Try this link or try to search “squeak” in the Opensuse repository.

Second step: install scratch

I've tried to install the rpm package that comes in the scratch website, but it failed in my case. The thing is that I've probably tried this with the wrong version of the squeak virtual machine (see up), but at the end I not sure.

Instead of this, I've downloaded the deb package from the MIT site and afterwards I dissasembled it:

 ar -xvf ../scratch_1.4.0.6~dfsg1-2~ubuntu12.04.1_all.deb 

you will get three files:

  • debian-binary
  • control.tar.gz
  • data.tar.gz

Uncompress the later two:

tar -xzf control.tar.gz
tar -xzf data.tar.gz

The first one contains scripts of unstalling and postinstall, among other things. The data.tar.gz contains the scratch program.

As root user, I did the following:

# cp  bin/scratch /usr/local/bin/
# cp share/* /usr/local/share -R

After that, you are almost ready to run scratch in SuSE 13.

Third step: fix start script

The last step is to fix the start script, /usr/local/bin/scratch, I made the following changes (better to save a copy of the original):

# File:            scratch
# Description:     Script to start the Squeak VM binary with the scratch image
# Original Author: Bert Freudenberg
# Adapted by:      Miriam Ruiz, Raul Luna
VMOPTIONS="-encoding UTF-8 -vm-display-x11 -xshm -plugins /usr/lib/squeak/$VM_V

And this is it. If you want, you can do more fixings like creating a fancy starting icon, etc. But the hard stuff is already done.

Final step: put it in your local language

I've discovered that scratch didn't appear in the local language, but in english. Debugging the launching of the application, I've discovered that it keeps searching in the directory /usr/share/scratch despite it is installed in /usr/local/share/scratch. A symbolic link resolved the issue:

oktopus:/usr/share # ln -s /usr/local/share/scratch/ scratch

Further reading

Reading here and there, I've discovered that worth have a look to these projects related with scratch:

linux/installscratch.txt · Last modified: 2014/12/24 09:42 (external edit)