Wikia

Open Open University Wiki

M366

Talk1
30pages on
this wiki

Natural and artificial intelligence

ApplicationsEdit

NotesEdit

M366 uses a specialized software to make additional course resources available.

First of all, copy the DataFiles directory from the CD-ROM into your desired m366 directory.

Now we need to fix some files used by JavaNNS. We need to make them have the proper end of line characters, or JavaNNS will complain. Navigate into the DataFiles directory, make sure you have sed installed and execute the following in a terminal:

sed -i 's/\r//g' programs/patterns/*.pat

Note: Whenever you download JavaNNS pattern files for a TMA, you first need to fix them.

Now, still in DataFiles directory, execute the following:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

All the resources shown by the software we're about to install are available within this very DataFiles directory. In theory, you don't need the course software at all - you can just open all the files by navigating the DataFiles directory, which has a pretty clean structure. If you want to have the course software nonetheless, read on - but it's a slightly complicated process.

To use the course software, you first have to install Java 5 JRE and JMF 2.1.1e.

As you may have guessed, one of the problems is case sensitivity. I just hate this part. Navigate into the DataFiles directory and execute the following, this should make the software find everything:

mv text/Help text/help
mv text/About text/about
mv text/help/Intro.txt text/help/intro.txt
mv text/about/Intro.txt text/about/intro.txt
mv audio/in_our_time.mp3 audio/IN_OUR_TIME.mp3
mv text/Block3/Unit2/Computer\ Exercise\ 2.1/Computer\ exercise\ 2.1.txt text/Block3/Unit2/Computer\ Exercise\ 2.1/Computer\ Exercise\ 2.1.txt 
mv text/Block3/Unit2/Computer\ Exercise\ 2.2/Computer\ exercise\ 2.2.txt text/Block3/Unit2/Computer\ Exercise\ 2.2/Computer\ Exercise\ 2.2.txt 
mv text/Block3/Unit2/Computer\ Exercise\ 2.3/Computer\ exercise\ 2.3.txt text/Block3/Unit2/Computer\ Exercise\ 2.3/Computer\ Exercise\ 2.3.txt 
mv text/Block3/Unit2/Computer\ Exercise\ 2.4/Computer\ exercise\ 2.4.txt text/Block3/Unit2/Computer\ Exercise\ 2.4/Computer\ Exercise\ 2.4.txt 
mv text/Block3/Unit2/Computer\ Exercise\ 2.5/Computer\ exercise\ 2.5.txt text/Block3/Unit2/Computer\ Exercise\ 2.5/Computer\ Exercise\ 2.5.txt 
mv text/Block3/Unit2/Computer\ Exercise\ 2.6/Computer\ exercise\ 2.6.txt text/Block3/Unit2/Computer\ Exercise\ 2.6/Computer\ Exercise\ 2.6.txt 
mv text/Block3/Unit3/Computer\ Exercise\ 3.1/Computer\ exercise\ 3.1.txt text/Block3/Unit3/Computer\ Exercise\ 3.1/Computer\ Exercise\ 3.1.txt 
mv text/Block3/Unit3/Computer\ Exercise\ 3.2/Computer\ exercise\ 3.2.txt text/Block3/Unit3/Computer\ Exercise\ 3.2/Computer\ Exercise\ 3.2.txt 
mv text/Block3/Unit4/Computer\ Exercise\ 4.1/Computer\ exercise\ 4.1.txt text/Block3/Unit4/Computer\ Exercise\ 4.1/Computer\ Exercise\ 4.1.txt 
mv text/Block4/Unit1/Computer\ Exercise\ 1.2/Computer\ Exercise\ 1.2.txt text/Block4/Unit1/Computer\ Exercise\ 1.2/Computer\ exercise\ 1.2.txt 
mv text/Block4/Unit2/Computer\ Exercise\ 2.1/Computer\ exercise\ 2.1.txt text/Block4/Unit2/Computer\ Exercise\ 2.1/Computer\ Exercise\ 2.1.txt 
mv text/Block4/Unit2/Computer\ Exercise\ 2.2/Computer\ exercise\ 2.2.txt text/Block4/Unit2/Computer\ Exercise\ 2.2/Computer\ Exercise\ 2.2.txt 
mv text/Block4/Unit2/Computer\ Exercise\ 2.3/Computer\ exercise\ 2.3.txt text/Block4/Unit2/Computer\ Exercise\ 2.3/Computer\ Exercise\ 2.3.txt 
mv text/Block4/Unit2/Computer\ Exercise\ 2.4/Computer\ exercise\ 2.4.txt text/Block4/Unit2/Computer\ Exercise\ 2.4/Computer\ Exercise\ 2.4.txt 
mv text/Block4/Unit2/Computer\ Exercise\ 2.5/Computer\ exercise\ 2.5.txt text/Block4/Unit2/Computer\ Exercise\ 2.5/Computer\ Exercise\ 2.5.txt 
mv text/Block4/Unit3/Computer\ Exercise\ 3.1/Computer\ exercise\ 3.1.txt text/Block4/Unit3/Computer\ Exercise\ 3.1/Computer\ Exercise\ 3.1.txt
mv text/Block4/Unit3/Computer\ Exercise\ 3.2/Computer\ exercise\ 3.2.txt text/Block4/Unit3/Computer\ Exercise\ 3.2/Computer\ Exercise\ 3.2.txt 
mv text/Block4/Unit4/Computer\ Exercise\ 4.1/Computer\ exercise\ 4.1.txt text/Block4/Unit4/Computer\ Exercise\ 4.1/Computer\ Exercise\ 4.1.txt 
mv text/Block4/Unit4/Computer\ Exercise\ 4.2/Computer\ exercise\ 4.2.txt text/Block4/Unit4/Computer\ Exercise\ 4.2/Computer\ Exercise\ 4.2.txt 
mv text/Block4/Unit4/Computer\ Exercise\ 4.3/Computer\ exercise\ 4.3.txt text/Block4/Unit4/Computer\ Exercise\ 4.3/Computer\ Exercise\ 4.3.txt 
mv text/Block4/Unit4/Computer\ Exercise\ 4.4/Computer\ exercise\ 4.4.txt text/Block4/Unit4/Computer\ Exercise\ 4.4/Computer\ Exercise\ 4.4.txt

But I can't guarantee it will. As of writing this, this seem to be all the case sensitivity problems, but the DataFiles supplied on your CD-ROM may differ.

To work around that, open the course software in a terminal (the ./m366 script introduced later) and look for "java.io.FileNotFoundException" messages on the command line when opening a file. It will tell you what was expected and you can rename the actual file to fullfil this.

Note: As of writing this, I wasn't able to make the images, which should be visible in some excercises and activities, show up - I doubt it's a case sensitivity issue. I also wasn't able to make video files play within the course software, but I had no problems watching them directly from the DataFiles directory, which has a very clear structure - it shouldn't be a problem to locate the relevant video files.

Now you have to take the write access away from your own user. Otherwise, the slightly crazed M366.jar software will arbitrary delete stuff. Go into the DataFiles directory and execute:

chmod u-w -R .
chmod u+w -R programs
chmod u+w -R results

Now copy M366.jar and icon.bmp from the CD-ROMs Software directory into your m366 directory.

Create a file named data_path.ini, make it point to the copied DataFiles directory, e. g.:

<path=/files/open university/m366/DataFiles/>

Right there, create a file named m366 with the following content and make it executable:

#!/bin/sh
cd "`dirname "$0"`"
PATH=.:$PATH
# Has to be copied every time, because the jar will delete it for some reason
cp data_path.ini path.ini
java -jar M366.jar

M366.jar tries to use cmd.exe, which is not available on Linux. If you are using a desktop environment, we can work around this, using xdg-open. Create a file named cmd and make it executable, paste the following into it:

#!/bin/bash
# The first three parameters are not of interest
shift
shift
shift
eval xdg-open "$*" &

Now you can launch the course software with ./m366.

If you would like a Desktop Entry, create one named m366.desktop, with the following content (altering the path to the script):

[Desktop Entry]
Name=Open University Course Software for M366
Exec=/files/work/open\ university/m366/m366
Icon=/files/work/open university/m366/icon.bmp
Terminal=false
Type=Application
StartupNotify=true
Categories=Education;ComputerScience

To open NetLogo directly from the course software, you will need to associate .nlogo with the application. Feel free to add instructions for specific desktop environments.

Note: In GNOME, using the right click->properties->open with way won't work, because the file type is determined by mime type. Since our NetLogo lessons have the plain/text mimetype, changing the open with program to NetLogo would make all plain text files open in NetLogo. You probably don't want that.

Around Wikia's network

Random Wiki