Sketchbook directory in linux

Hello. I'm running Arduino 0015, in Kubuntu 8.04.
It runs and works correctly, except for one annoying detail: when I go to open a new sketch, the file dialog defaults to the directory the arduino program is in, not my sketchbook directory.
When I save, or 'save as', a current sketch, it starts out in my sketchbook directory

preferences.txt points the sketchbook to /home/username/sketchbook, which I have set up correctly.

any ideas?

Hi Yen1,
this is hardcoded in ArduinoIDE sources, there is nothing you can do about it, sorry.

Eberhard

In File/Preferences you tell the IDE your sketchbook location.
It works perfectly on my PC running Ubuntu, with the sketchbook in my home directory

Hi, I have no problems either with 9.04 (32bits) / 0015...

Hi,
I think we were talking about the
File->Sketchbook->Open
menu, and this starts up in the Arduino-application directory by default.
This is different from
File->Save
or
File->Save as...
which correctly starts up in the Sketchbook-dir that was set in the preferences.

Eberhard

this is hardcoded in ArduinoIDE sources, there is nothing you can do about it, sorry.

Hmm. In that case, I'm thinking of digging through the code and recompiling my IDE. :slight_smile:

Should I start out by just suggesting the change (in a the software/suggestions thread), or by writing a patch, or what?

Hi,
the fix is easy:
In file Sketchbook.java
you simply have to uncomment line No. 322
change
//fd.setDirectory(getSketchbookPath());
to
fd.setDirectory(getSketchbookPath());
and the OpenDialog starts in the Sketchbook folder.
I'll see this gets on the todo list for the next release.
Thanks for pointing this out. I never really realized this strange behaviour but I think you are totally right that this should be fixed.

Eberhard