Arquivos de Categoria: english

Novo site

Este post pretende ser o último por aqui, todo o material daqui vai para o novo site no domínio http://jetersilveira.com.br. Saudações!

Installing Pronterface on Ubuntu and the error: Not a directory: ‘/usr/share/printrun/pronterface.py’

Hello, people! Installing PRONTERFACE on my machine, when I tried to run it, I got the error Not a directory: ‘/usr/share/printrun/pronterface.py’. So I’ve created my workaround 😀 I decided to write a small step-by-step to explain how to install this software through the available repository and also solve this error. Let’s go. Open a terminal, and get it done:

sudo apt-get install python python-serial python-wxgtk2.8 python-tk
sudo apt-add-repository ppa:richi-paraeasy/ppa
sudo apt-get update
sudo apt-get install pronterface skeinforge

After running these commands, you’re going to have Pronterface installed. Open the terminal again e try to execute the command “$ pronterface” (whithout the $). You’ll probably get the following error:

OSError: [Errno 20] Not a directory: ‘/usr/share/printrun/pronterface.py’

Ok. Once this happened, let’s go to the next steps. You will edit the files pronterface.py and pronsole.py. You’ll find them at the directory /usr/share/printrun/.

Open each file, as a superuser, with your favorite text editor (like Vim).

If you use gedit, as a text editor, you can execute:

sudo gedit /usr/share/printrun/pronterface.py

Inside the file, look for this line (it should be next to 24):

os.chdir(os.path.realpath(__file__))

And replace for this one:

os.chdir(os.path.realpath(‘./’))

Save and close the file. Next, open the second file:

sudo gedit /usr/share/printrun/pronsole.py

And make the same change in the same line (it should be next to 30, on this file). Then, save and close the file. You have to make this change in both pronterface.py e pronsole.py. Actually, all you are going to do is replace  __file__  for ‘./’  on these lines.

Once you’ve done that, you can run pronterface:

pronterface

If necessary, as superuser:

sudo pronterface

And happy printing!  😀

pronter