Scratch in a network environment

I have been running a Code Club at my local Primary School for a while now, and thought it was about time I put details of a few tweaks I’ve made to the default Scratch install to make things easier. So here goes:

With the default install of Scratch (on Windows) projects are saved to the C: drive. For a network environment, with pupils work stored on a network drive so they always have access whichever machine they sit at, this isn’t exactly helpful. It also isn’t ideal that they can explore the C: drive in spite of profile restrictions (although it isn’t the end of the world as there is little they can do from Scratch).

save-orig

After a bit of time with Google I found the answer, and since it didn’t immediately leap out at me when I was searching I thought I’d post it here (perhaps my Google Fu was weak that day). It is actually quite simple, especially for the average Code Club volunteer I should imagine; just edit the scratch.ini file. This is, as would be expected, located in:

C:\Program Files\Scratch\Scratch.ini

Initially it looks like this:

ini-orig

Pretty standard stuff, but unfortunately no comments to indicate what else you can do with it. As it happens you can add the following two lines (for example):

Home=U:
VisibleDrives=U:

To get this:

ini-new

They do exactly what is says on the tin. If you click on the Home button in a file dialogue box then you only get the drive(s) specified. You can also put a full path in if you want to put the home directory further down the directory structure.

save-new1

The VisibleDrives option restricts what you can see if you click on the Computer button in a file dialogue box. If you want to allow more visible drives then separate them with a comma.

save-new2

You can do the same with a Mac (for the home drive), just use the appropriate directory format (i.e. no drive letter and the opposite direction slash).

There is more that you can do, so take a look at the Scratch documentation here. For example if you use a * in the directory path it is replaced by the name of the currently logged on user.

Depending on your network environment it may be handy for your Code Club to put the extra resources on a shared network drive and open up an extra drive in the VisibleDrives. One I haven’t tried yet it is the proxy setting, which I hope will allow me to upload projects to the Scratch website. It goes something like:

ProxyServer=[server name or IP address]
ProxyPort=[port number]

Code Club Christmas Capers

There have been a couple of false starts in publishing the Christmas special Code Club project, Christmas Capers, this year. Since I am planning to use it at my last Code Club of this term, which is on Tuesday (much to the disappointment of my ‘Codeclubbers’), I have been keen to get it tested. Unfortunately, although the course notes were circulated, the resources haven’t quite made it yet, so I decided to see what I could do.

First thing I noted, having gone through my past emails, was that it was used last year as well (unfortunately I don’t seem to have a copy). The link on the original Code Club blog is no longer working sadly, however there was hope that resources would be out there somewhere. After a bit of searching I found a copy on the Scratch website that someone had uploaded, so I grabbed the resources from that and tested it so I was sure everything was there. I had a slight issue with the Jingle_Bells.mp3 file not being a supported format, but this seems to be down to something missing on my netbook as all is fine under both Windows 7 and Ubuntu Linux on my main machine.

So, for anyone looking for the resources, they are here in a full package including a copy of the project and course notes.

Keep up the good work fellow Code Club volunteers, and if anyone would like to pop along and encourage my Code Club recruits to blog a bit more, we are here. As a school governor with an interest in literacy as well as computing I’m trying to make it a bit cross curricular 😉

Oh, and if there is anyone in the Portsmouth and surrounding area interested in meeting up, I’m hoping to get my act together and do something in the new year. Do get in touch.

Windows is weird

I’ve just been putting together a post about some modifications to Scratch for use in a school environment that I have used for the Code Club that I run. Everything went well on the school computers, but when I tried to do the same on my own Windows 7 desktop to get some screenshots things went a little weird.

First off, it is a pain to edit the required .ini file. Right click and edit doesn’t give you administrator privileges so you can save it. My first thought was to run Explorer as administrator, but sadly the administrator privileges don’t extend to Notepad when you right click and choose edit. As it happened I was only going to use Notepad for the screenshots, so I took them and then used Notepad++ to do the actual edit. A quick right click and “Edit with Notepad++” followed by closing it and opening it again with administrator privileges did the trick.

This is where things went from slightly annoying (isn’t Windows always!) to weird. When I ran Scratch my edits to the .ini file didn’t appear to have taken, so I checked the file – fine, nothing wrong there. So this being Windows I decided to try a logout and login just to be sure there wasn’t anything odd going on there. No joy. So I decided to check from the command line with Edit. For some reason when I opened the .ini file up in Edit the extra two lines I had added were missing, so I checked in both Notepad and Notepad++ and they were there. I double checked I was working on the same file and there had been no name change for some strange reason and all was well – or at least I confirmed I was working on the same file.

At this point I realised that the command line I was using wasn’t running as administrator, so I opened up an administrator command prompt and headed to the same directory to edit the file there. The only issue was that when I open it in Edit the two lines I had added were there. This would seem to imply that there are two versions of the file, one for the administrator with the edits and one for my user account without. Although then again, not, since when I edited in the GUI with Notepad or Notepad++ either as administrator or my standard user I did have the edits! This didn’t make much sense. For a moment it looked as though I was going to have to mess around with changing the permissions to work out what was going on. Anyway, I switched to the non-administrative command prompt to edit the file, only to find that my changes have magically appeared (and I hadn’t messed with the permissions yet)! So I tried Scratch again and there we go, the changes are working.

So it would appear that, for some reason, the edits I made to the file (using administrative privileges) took a few minutes and a logout and back in again to be visible to my user account! …and some people wonder why I prefer using Linux!!