Printrun

From RepRap
(Redirected from Pronterface)
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 or Slic3r they form a powerful printing toolchain.

Installation

GNU/Linux & Distros

Dependencies

Before installing Printrun, make sure to install a few required libraries for both pronterface and skeinforge. These are just informational links, the install instructions individual linux distributions are below.

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

You can run Printrun directly from source, as there are no (official) packages available yet. Fetch and install the dependencies using:

sudo apt-get install python-serial python-wxgtk2.8 python-pyglet

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

Printrun is in official Fedora repositories starting with Fedora 17.

sudo yum install printrun # for the whole package, or:
sudo yum install pronsole # or plater or pronterface

Any problems with these packages, report to Bugzilla. Don't forget to add your user to the dialout group.

If you have older 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 python-pyglet python-psutil python-numpy

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

This script gives somehow the impression Printrun has to go through a complex installation. The most simple case is to meet the prerequisites above, then grab a copy from Github and run it with python pronterface.py right where you downloaded it:

git clone https://github.com/kliment/Printrun.git 
cd Printrun
./pronterface.py

For a more comfortable installation, you should install pronterface first, then skeinforge inside your pronterface installation directory.

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

#!/bin/sh

BASEDIR="$HOME/RepRap" # 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 'skeinforge' directory is located in the
                                # 'Printrun' directory is located.

SKEINFORGEBASEURL="http://fabmetheus.crsndoo.com/files/"
SKEINFORGEFILENAME="50_reprap_python_beanshell.zip"

mkdir -p "$BASEDIR"
cd "$BASEDIR"  # Change directory to the executing users home directory.

echo "Moving existing Printrun directory..."
mv "$PRINTRUNDIR" "$PRINTRUNDIR.old.$$"  # save old installation

echo "Cloning Printrun..."
git clone https://github.com/kliment/Printrun.git # See also: http://help.github.com/linux-set-up-git/

echo "Grabbing skeinforge..."
wget -P /tmp "$SKEINFORGEBASEURL$SKEINFORGEFILENAME" # download skeinforge zip

echo "Unzipping skeinforge into Printrun directory..."
unzip -d "$SKEINFORGEDIR" "/tmp/$SKEINFORGEFILENAME" # unzips the grabbed zip to ones defined skeinforge dir.

echo "Symlinking skeinforge inside Printrun directory..."
ln -s "$SKEINFORGEDIR/"* "$PRINTRUNDIR/" # Script makes a symbolic link.

echo "Cleaning up temporary installation files..."
rm -rf "/tmp/$SKEINFORGEFILENAME" # Removes tmp files.

Open a terminal window and copy the script above.

Create a directory in your Home directory named RepRap

Open nano by typing 'nano' in the windows prompt and hit return.

Save the script in a file named 'PrintrunUpdate', make any adjustments if you want/need to. (If a new software version comes out, you will have to change the 50_ (which is the current version since March 2012) into the correct version number).

You need to make the script executable and run it, using the following commands:

chmod +x PrintrunUpdate
./PrintrunUpdate
cd ~/RepRap/Printrun
./pronterface.py

This will set permission to allow you to execute the script.

If you were to do this in your filemanager (Nautilus etc) it will ask you if you want to run this script.

NOTE: There is an error installing on ubuntu and using this script. One method of install results in a link in the applications menu, which links to pronterface fils in usr/bin/ and the file in usr/share. Another method results in files in the users' home directory. Which is the recommended method and proper location to install? Neither method leads to successful installation at this point.

Mac OS X

By far the easiest option for OS X is to download the pre-built Mac Pronterface application. As of January, 2013 it can be found at this location. If you're running 10.7 or later you should already have Python and all the necessary libraries to run Pronterface-Mac, but if for some reason Pronterface-Mac won't run, you may have to go through a few extra steps. Instructions to set up OS X for Printrun (both pre-Lion and post-Lion) are posted at Printrun's GitHub project page.

Windows

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

Or, use any one of the following ready-to-run packages:

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

Connection with printer failed

With some GNU/Linux distros, the python library used to connect to the printer doesn't accept some custom baudrates. To fix this issue, you must apply a patch to this library, following this steps:

Open a terminal window, and activate the pyserial library folder as current directory:

cd /usr/lib/python2.7/dist-packages/serial/

Download the patch in this directory (you must be root, or use the "sudo" command):

sudo wget http://sourceforge.net/p/pyserial/patches/_discuss/thread/ed3fb0de/f4fd/attachment/pyserial.patch

Apply the patch (the original file will be automatically saved):

sudo patch -b serialposix.py pyserial.patch

Restart Pronterface, now the printer should connect.
Sources: http://sourceforge.net/p/pyserial/patches/28/ and https://groups.google.com/forum/#!searchin/ultimaker/pyserial/ultimaker/BNjPpoJpfrE/gGSKAdhY5VwJ

Custom buttons don't appear

See also :

Unofficial Associated Projects