arduino command line open a file!!?!

Hi,

I know this thread is old but I'll just post this here for future reference because I couldn't find a post that answers this even though this is posted in the FAQ forum.
I'm a noob myself when it comes to Linux and to Arduino. I was looking for a way to accomplish this and ended up in this thread.

Here's what I ended up doing in the end:

I edited the file arduino (the script that launches the IDE). The last line in my script was:

java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base

I just added $1 at the end to make the script pass along the first parameter to the Java application. Like this:

java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base $1

I can now drag associate pde files with the Arduino IDE or create a launcher icon that I can drop files on.

To improve it fiurther I did the following modifications:

TEMPLATE="/somepath/mytemplate.pde"
OPENDOC=${1-$TEMPLATE}
java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base $OPENDOC

Unless a file has been passed to the script it now opens a template that I've created instead of a blank file.
i hope this helps someone. It would have helped me...

Cheers,
Per