Bug 825 : can't launch pde from /usr/bin, but works fine from the processing directory
Last modified: 2009-08-13 14:52




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P5
Severity:
normal

 

Reporter:
mniss
Assigned To:
fry

Attachment Type Created Size Actions
Proposed solution text/plain 2009-08-10 05:25 1.46 KB
Processing start script for Linux text/plain 2009-08-11 02:22 2.50 KB

Description:   Opened: 2008-06-15 09:51
The Processing IDE works fine when I go into the processing-141 directory
(which I put in /usr/local), and run it, but when I tried to put a link to
it in usr/bin (so it would be on the default path), it gives the error

/usr/bin/processing: line 17: /usr/bin/java/bin/java: Not a directory

The same thing happens if I actually copy the executable into /usr/bin...

I gather I just have to add /usr/local/processing-141 to my path, but is
this normal? Forgive me if it is blindingly obvious as I am returning to
unix after 12 years in Windowsland, and everything has changed and I've
probably forgotten the rest...
Additional Comment #1 From mniss 2008-06-15 10:09
I tried putting the processing directory in my path, nd got aslightly
different error message:

/usr/local/processing-0141/processing: line 3: dirname: command not found
/usr/local/processing-0141/processing: line 17: /java/bin/java: No such
file or directory

>
> The Processing IDE works fine when I go into the processing-0141
directory
> (which I put in /usr/local), and run it, but when I tried to put a link to
> it in usr/bin (so it would be on the default path), it gives the error
>
> /usr/bin/processing: line 17: /usr/bin/java/bin/java: Not a directory
>
> The same thing happens if I actually copy the executable into /usr/bin...
>
> I gather I just have to add /usr/local/processing-0141 to my path, but is
> this normal? Forgive me if it is blindingly obvious as I am returning to
> unix after 12 years in Windowsland, and everything has changed and I've
> probably forgotten the rest...
>
>

Additional Comment #2 From fry 2008-06-15 10:20
i'd first try leaving the processing folder intact, and using a symlink in
/usr/bin

ln -s /path/to/processing-folder/processing /usr/bin/processing

assuming that's what you're already doing, i'd put a shell script in
/usr/bin that reads:

#!/bin/sh
cd /path/to/processing-folder && ./processing

and see if that works better.
Additional Comment #3 From fkasper 2009-08-10 05:25
edit]
Proposed solution

A modified processing script that can be called from any directory or GNOME
menu item. Tries to use a JDK that is already installed in the system, and
falls back to the JDK that comes with Processing. Tested on Ubuntu 8.10/amd64
with java-6-sun installed.
Additional Comment #4 From fry 2009-08-10 14:34
Thanks, this is very helpful. Would you mind modifying it to use the
included java folder by default, and use installed versions as a fallback?
The problem is that lots of Linux boxes are using something besides
sun-java, none of which work properly. If it uses the 'java' folder by
default, advanced users can be relied upon to read the Linux installation
notes (if that doesn't work), and we can tell them it's OK to remove the
'java' folder to use an installed version of sun-java.
Additional Comment #5 From fkasper2 2009-08-11 02:22
edit]
Processing start script for Linux
Additional Comment #6 From fkasper2 2009-08-11 02:32
(In reply to comment #4)
Sorry for being back under a different name, but that was the quickest way
for me to "fix" my broken email address.

> Thanks, this is very helpful. Would you mind modifying it to use the
> included java folder by default, and use installed versions as a fallback?
Done, and uplodaed as attachment to comment #5.

Users now have these options to run Processing under Linux:
1. Run as-downloaded ==> uses the JDK that comes with Processing
2. Remove <processing>/java subdirectory ==> uses the system JDK
3. Replace <processing>/java subdirectory with a symlink to a JDK home ==>
uses that JDK
Additional Comment #7 From fry 2009-08-11 10:15
Thanks so much, that's incredibly helpful. What's your name (or what name
would you like me to use) so we can cite you properly in the script?
Additional Comment #8 From fkasper2 2009-08-11 11:08
(In reply to comment #7)
> Thanks so much, that's incredibly helpful. What's your name (or
what name
> would you like me to use) so we can cite you properly in the script?
My pleasure; my name is Ferdinand Kasper from Vienna, Austria. I intend to
use Processing (running under Ubuntu) for an introductory programming
course later this year.
Additional Comment #9 From fry 2009-08-11 11:12
wonderful, thanks again. please keep us posted on how it goes with the
Linux release in the course. we haven't had anyone really tending to the
Linux release (much less someone doing intro programming), so input/help is
quite welcome.
Additional Comment #10 From fry 2009-08-11 11:13
fixed for the release that comes after 1.0.5, which will probably be 1.0.6.
Additional Comment #11 From fry 2009-08-13 14:52
*** Bug 981 has been marked as a duplicate of this bug. ***