Open .pde files with Arduino IDE in Linux
After I installed the Arduino IDE I found out that I could not run "arduino test.pde" to open an existing sketch. The previous command would just open a blank sketch.
To fix this problem you have to edit the Arduino startup script, which in my case is located at "/usr/share/arduino/arduino". The last line of this file looks like this:
java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base
and it needs to be changed to this:
java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base "$*"
Finally I had to change my "/usr/bin/arduino" from:
/usr/share/arduino/arduino
to
/usr/share/arduino/arduino "$*"
Now you should be able to associate .pde files with the Arduino IDE and have them automatically open.




June 13th, 2011 - 01:44
Instead of $1 try “$*” (Quotes are important). It will pass ALL command line arguments including files names with spaces
June 13th, 2011 - 07:10
Thanks for that. Updated the post to reflect the change.