jaymesdec
Posts: 2
Joined: Wed May 01, 2013 6:35 pm

Running Scratch at Boot Up or Headless Start

Wed May 01, 2013 6:43 pm

My students made a handrail that plays the piano using MakeyMakey and Scratch.

Right now it is running on a laptop, but we want to run it off a Raspberry Pi so that we don't have to keep a laptop in the stairwell.

We have the program running fine on the Raspberry pi in the classroom on a monitor, but when we set it up in the hallway and then remote into the pi we can't get the Scratch program to work properly.

When we use VNC, the Scratch program starts, but only responds to key presses on the remote computer, not the pi.

When we use ssh, we get:
found gettext in path
/home/pi/Desktop
squeak: could not find any display driver

How do we get a scratch program running headless?
Or is there a way that we can get the program to start automatically when the pi boots up?

I've been searching all day for answers without any luck.

Thank you!

TRocket
Posts: 9
Joined: Mon Nov 26, 2012 8:54 am
Location: Somerset, UK

Re: Running Scratch at Boot Up or Headless Start

Wed May 01, 2013 7:26 pm

Try editing /usr/scratch and adding -headless to the VMOPTIONS. You can then use standard scratch command line to pass a project file.

jaymesdec
Posts: 2
Joined: Wed May 01, 2013 6:35 pm

Re: Running Scratch at Boot Up or Headless Start

Thu May 02, 2013 5:17 pm

Thank you! That worked...I think. At least it seems to start the scratch application.

I get:
Executing: /usr/lib/squeak/4.4.7-2357/squeakvm -headless -encoding UTF-8 -vm-display-x11 -xshm -plugins /usr/lib/scratch/plugins/:/usr/lib/squeak/4.4.7-2357/ -vm-sound-alsa /usr/share/scratch/Scratch.image /home/pi/Desktop/stairs.sb

But the sound does not work. Do I have to change one of the sound options?

TRocket
Posts: 9
Joined: Mon Nov 26, 2012 8:54 am
Location: Somerset, UK

Re: Running Scratch at Boot Up or Headless Start

Mon May 06, 2013 3:01 pm

try executing the command

Code: Select all

sudo amixer -cset numid=3 1] before you run the command to start the scratch project.

Return to “Scratch”