You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
||9 months ago|
|README.txt||9 months ago|
|getprojectlist.py||9 months ago|
|logo.png||9 months ago|
|manage.py||9 months ago|
|tuxpnt.project.sh||9 months ago|
|xmlrpc.server.py||9 months ago|
Note: This code is old. ~ 2005.
My kids' school uses gnu/linux in the classrooms.
The teachers want the children to learn that sharing is not a bad thing.
Tuxpaint is cool.
Tuxpaint-config has an option that causes drawings to be saved as a new drawing.
When teachers encourage students to build upon existing drawings, each drawing
becomes a 'fork' and art evolves in many directions.
-Projects are a way of grouping drawings together under the same theme or subject.
-Teachers can create and delete projects.
-Teachers can copy, move and delete drawings within the projects.
-All projects are available to all students.
-All students can create new drawings.
-All students can open any drawing and build upon it.
-Students cannot modify or delete drawings.
-Students cannot create or delete projects.
These scripts rely on tuxpaint's 'save as new' option. It must be set in the tuxpaint configuration.
If it is not set, modifications to any drawing will simply not be saved.
Drawings are saved on a samba server. Projects are, in reality, samba shares.
There are only use two users, 'teacher' and 'student' on the samba server.
Teachers create and delete projects (via web).
Students easily join projects via a Zentiy dialog. (mount.cifs ~/.tuxpaint/saved)
The fact that all students access the projects using the same username
means a malicious student could fill projects with rubbish.
However, we wanted to at least try an open environment based on trust and respect.
Projects are available to children of the same class, the same age, school wide, etc.
-Installation on the server
-Installation on the client
1. Students' computers
-A GNU/Linux operating system.
-Zenity. Comes with Gnome, Xfce. If you're using KDE you may need to install it.
-Python and xmlrpclib. Test you have it installed like this.
>>> import xmlrpclib
2. A network. PC's that run tuxpaint need to be on the LAN.
3. A server.
-It doesn't need to be a new machine.
-It must have a static IP.
4. You might consider a backup system (it would be terrible to loose all those drawings)
Installation on the server
These are Debian orientated instructions.
Do a minimal installation and then..
--Create user accounts.
Only two users are used. A generic user used by all teachers,
and a generic user used by all students.
If you choose different usernames you will have to adjusts the configuration(easy to do).
adduser --shell /bin/false teacher
adduser --shell /bin/false student
apt-get install samba
Create the base share directory where all projects will be saved.
Samba will import the users 'teacher' and 'student'.
If you wish to change the passwords.
Note: You may wish to remove [homes] and other things in /etc/samba/smb.conf
apt-get install apache
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.orig
Now edit /etc/apache2/sites-available/default (you can copy/paste the example below).
and restart apache.
If you are not using Debian, you may need to modify the cgi-bin path.
If you have chosen a username different than 'teacher', you must change the line:
'require user teacher'
Redirect /index.html /cgi-bin/manage.py
Options Indexes FollowSymLinks MultiViews
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AuthName "Enter in Tuxpaint Management"
##### Change user name if not using 'teacher' ####
require user teacher
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Allow from all
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
Options Indexes MultiViews FollowSymLinks
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
---The project management page is password protected.
Create the htaccess password file with the teacher's username and password.
htpasswd -c /usr/local/apache2/passwords teacher
---Create a directory to ease installation at the client.
cp tuxpnt_project.sh getprojectlist.py /var/www/download
Now edit the two files..
changing the first few lines to fit your configuration.
---Create a directory for the logo
cp logo.png /var/www/images
---Install xmlrpc server.
cp xmlrpc.server.py /usr/local/bin/
chmod u+x /usr/local/bin/xmlrpc.server.py
Edit usr/local/bin/xmlrpc.server.py and change the first
few lines to fit your configuration.
Automatically start the xmlrpc server when the server boots.
In Debian, you can paste this line into /etc/rc.local
/usr/bin/nohup /usr/local/bin/xmlrpc.server.py </dev/null >&/dev/null &
Now start the xmlrcp server
The script manage.py belongs in the cgi-bin directory defined in the
default apache site config file.
cp manage.py /usr/lib/cgi-bin/
chown www-data.root /usr/lib/cgi-bin/manage.py
chmod go-rwx /usr/lib/cgi-bin/manage.py
chmod u+x /usr/lib/cgi-bin/manage.py
Edit /usr/lib/cgi-bin/manage.py and change the first
few lines to fit your configuration.
Installation on the client
--Install the scripts
Open a web browser and download the two scripts
Then move them.
mv tuxpnt.project.sh getprojectlist.py /usr/local/bin
chmod a+x /usr/local/bin/tuxpnt.project.sh
The client PC needs to mount and umount samba shares.
Open a terminal and identify a group with the command:
Let's say you choose the group 'cdrom'.
Now (as root) add a line to this end of the sudo file
%cdrom ALL = NOPASSWD: /sbin/mount.cifs, /sbin/umount.cifs
--set some permissions
chmod u+s /sbin/*cifs
--Create a launcher.
The students need to run /usr/local/bin/tuxpnt_project.sh
Create a launcher that makes it easy for them.
Only the teacher can create and delete projects.
1. Open a web browser and go to http://your_tuxpnt_server_ip/
2. Enter the teacher username and password.
3. Create a project
--Using the project.
Students can now select the project.
1. Students run /usr/local/bin/tuxpnt_project.sh (launcher makes this easy).
2. Select a project
3. Open Tuxpaint (if not already open)
All drawings are saved on the samba share.
Students can change from one project to another at any time by
running the tuxpnt_project.sh script.
--Manipulating projects and project content.
Teachers can browse the shares from Nautilus.
Hint: The 'Connect to Server' option is helpful.
Students cannot delete either drawings or projects.
A teacher can delete an _empty_ project via the web inteface.
The teacher can copy, move, and delete drawings from a project by
browsing the shares from Nautilus.
I live in Barcelona, Spain.
The scripts in this tar are licensed under the GPL3 or later.