Printrun

From RepRap
Revision as of 14:03, 9 October 2012 by Cefiar (talk | contribs) (Ubuntu)
Jump to: navigation, search

Printrun is a set of G-code sending applications, written by Kliment. It consists of printcore (dumb G-code sender), pronsole (featured command line G-code sender), pronterface (featured G-code sender with graphical user interface), and a small collection of helpful scripts. Together with skeinforge they form a pretty powerful softwarecombo.

Installation

GNU/Linux & Distros

Dependencies

Before installing Printrun, make sure to install a few required libraries for both pronterface and skeinforge.

Depending on your GNU/Linux distro, this can be done in several ways. The following is executed through the Terminal, often found under "Applications -> Accessories -> Terminal":

Debian

There are experimental packages for Debian (squeeze wheezy):

sudo echo "deb http://apt.ulrichard.ch/  squeeze main contrib non-free" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install printrun-gui

Fedora

There are also experimental packages for Fedora 17:

wget http://repo.hroncok.cz/reprap/reprap.repo
sudo cp reprap.repo /etc/yum.repos.d/
sudo yum install printrun

Any problems with this repo report please to [email protected]. Don't forget to add your user to the dialout group.

If you have any other version of Fedora or you just don't want to use the packages, install dependencies and follow instructions below.

sudo yum install git pyserial wxPython tkinter

Ubuntu

sudo apt-get install python python-serial python-wxgtk2.8 python-tk git-core

There are also experimental packages for Ubuntu (maverick natty oneiric precise):

sudo apt-add-repository ppa:richi-paraeasy/ppa
sudo apt-get update
sudo apt-get install pronterface

Note: The previous package, 'printrun-gui' is currently broken on Ubuntu 'precise', but may work on previous Ubuntu releases. Both are in the same repository.

Install & update script

Now you should install pronterface first, then skeinforge inside your pronterface installation directory.

This albeit little dirty but handy script does that for you!
(N.B it can also be used as a update script. Be sure to put your .stl-files etc outside of your Printrun directory)

BASEDIR="$HOME" #edit this is you don't want it installed in your home directory
PRINTRUNDIR="$BASEDIR/Printrun" #Defines where the 'Printrun' directory is located. But of course you can change this to say: "$HOME/Documents/Create/RepRap/Printrun".
SKEINFORGEDIR="$PRINTRUNDIR/skeinforge" #Defines where the 'skeisforge' directory is located in the 'Printrun' directory is located.

cd $BASEDIR #Change directory to the executing users home directory.
echo "Removing existing Printrun directory..." #Script being polite towards the user.
rm -rf $PRINTRUNDIR #Removes the defined Printrun directory and _everything_ that resides in and beneath its directory tree.

echo "Cloning Printrun..." #Script being polite towards the user.
git clone https://github.com/kliment/Printrun.git #See also: http://help.github.com/linux-set-up-git/
echo "Grabbing skeinforge..." #Script being polite towards the user.
wget -P /tmp http://fabmetheus.crsndoo.com/files/41_reprap_python_beanshell.zip #Uses good ol' wget for downloading skeinforge.
echo "Unzipping skeinforge into Printrun directory..." #Script being polite towards the user.
unzip -d $SKEINFORGEDIR /tmp/41_reprap_python_beanshell.zip #unzips the grabbed zip to ones defined skeinforge dir.
echo "Symlinking skeinforge inside Printrun directory..." #Script being polite towards the user.
ln -s $SKEINFORGEDIR/* $PRINTRUNDIR/ #Script makes a symbolic link.
echo "Cleaning up temporary installation files..." #Script being polite towards the user.
rm -rf /tmp/41_reprap_python_beanshell.zip #Removes tmp files.

Open a terminal window and copy the script above. Open nano by typing 'nano' in the windows prompt and hit return. Save the script in a file named say 'PrintrunUpdate', make any adjustments if you want/need to. (Be aware the 41_* skeinforge Version is from 2011. The most recent version is 50_* which is from March 2012. Just change 41 to 50 or the most recent version). Most likely you need to use the following: chmod +x PrintrunUpdate This will allow you to execute the script in the first place. If you were to do this in your filemanager (Nautilus etc) it will ask you if you want to run this script.

Mac OSX

To make it work on OSX: (it's similar to GNU/Linux in may ways, but different)

  • see instructions for Lion, and pre-Lion here

Windows

To make it work on Windows, get the following packages and install:

Or, use the ready-to-run version available at http://koti.kapsi.fi/~kliment/printrun/

Usage

With installation done, simply run the script, e.g.

python pronterface.py

Pronterface.png


CLI

You might also want to try a nice, unobtrusive command-line interface:

python pronsole.py

It features an online help function ("help" or "help <command>").

Troubleshooting

Good to know that the settings used by Pronterface are not stored in the app folder but in the user's folder (e.g : ~/.pronsolerc (GNU/Linux) C:\Users\yourname (Windows)).

'python goes SyntaxError'

Got an error similar to this?

[~] python pronterface.py
 File "pronterface.py", line 15
   print _("WX is not installed. This program requires WX to run.")
         ^
SyntaxError: invalid syntax

This can happen if you use a GNU/Linux distribution such as Archlinux.
You can easily solve this by executing the following instead:

python2 pronterface.py

Custom buttons don't appear

See also :