PDA

View Full Version : [SOLVED] How to use processing.org's Processing-1.0.9 as an Application


rjames
1st March 2010, 10:20 AM
New to Fedora (from Windows), I am up and running ok with packages from the repository but only half ok with Processing, the Java graphics programming front end from processing.org.
Their download gave me a .tgz file which Package Manager extracted for me into a location of my choice and where there is now a "processing" shell script.
This works ok and I have managed to create a launcher on the desktop. That starts ok but always with processing's default action of giving you a new and automatically named work file.
In Windows an existing Processing file (.pde file) could be "opened-with" Processing.
Trying to do similar in Fedora I find that I am expected to nominate an Application to open with but Processing has not installed as an application.
I guess the question is how do I promote Processing to be an Application?
Or is there a different approach?

Dies
2nd March 2010, 01:36 AM
Your best bet, or at least the way I would do it, is to move the folder you extracted to /opt/, then symlink the "processing" script to /usr/bin/, update the launcher you created and move it to /usr/share/applications.

Now right-click a .pde file and select "Properties" then click on the "Open with" tab select to add an application and choose your "processing" script from the list.

That last part assumes you're using Gnome, though even if you're using KDE the process is very similar.

rjames
2nd March 2010, 10:58 PM
Thanks for the quick response and the suggestion that looks as if it is going to each me a lot.
Today's problem is that I am not familiar with symlink.
I guess that is the command line equivalent of the File Browser's right-click Make Link, could not find any useful docn on that and used 'link filename linkname' instead. I got into a deeper and deeper muddle after that and left it until I find out more about symlink.
Meanwhile however I did try just moving my existing launcher into /usr/share/applications, saw 'processing' as an application and was able to have pde files cause 'processing' to start up. It does always start with its auto-named new file rather than the one I have invoked but that is pretty clearly an issue for processing.org rather than Fedora.
If you could help me with the symlink question that would be great, otherwise I think I am near-enough there thank you.

Dies
3rd March 2010, 08:09 AM
If you could help me with the symlink question that would be great, otherwise I think I am near-enough there thank you.
Sure.
I guess that is the command line equivalent of the File Browser's right-click Make Link
Exactly. What you would think of as a "shortcut" in Windows.

For the manual page just type
man ln
But for the most part you only need to know one switch, the '-s' switch which stands for symbolic. ;)

To make a symbolic link or shortcut just do

ln -s /path/to/somefile /path/to/shortcut

So let's say you wanted to symlink /opt/processing/processing.sh to /usr/bin, you would just do
ln -s /opt/processing/processing.sh /usr/bin/
and that would create /usr/bin/processing.sh which is just a shortcut to the real file.


By the way the purpose of placing a shortcut into /usr/bin is to put that program in your path, so that you can just type processing.sh instead of having to type out the full path "/opt/processing/processing.sh" or whatever every time you want to run it.


Hope that helps. :)

rjames
3rd March 2010, 10:31 PM
Great! - Problem solved - Finding the way around Linux much improved.
Halfway to solving the problem of opening with the selected file have found that java processing can take a filename argument - just a question of getting an environment variable in there.
Many thanks, Kind regards, Jim