Startup directory should be current working directory

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
bgoodr
Posts: 131
Joined: Sat Jun 14, 2014 9:40 pm

Startup directory should be current working directory

Postby bgoodr » Sat Jun 14, 2014 9:55 pm

Hi,

I built FreeCAD built from Git sources today (2014-06-14) on a 64-bit Debian Linux system.

I changed current working directories to a directory where I want to store FreeCAD files into.

I executed FreeCAD using a fully qualified path to it (without changing directories).

I clicked on "Create a new Empty document".

I selected the Part workbench.

At this point my filename is "Unamed : 1". I have not added any objects.

First thing I want to do is save that file. I clicked File menu then Save,

The dialog box I see displayed is not in the directory I was in when I invoked the executable, but in my home directory.

How do I get FreeCAD to use the current working directory at time of invocation instead of the HOME directory? The Files/Preferences did not show any way to specify this.

Thanks!

Build info:

Code: Select all

OS: Debian GNU/Linux 7.4 (wheezy)
Word size: 64-bit
Version: 0.14.3677 (Git)
Branch: master
Hash: 07c64e206d05ae662ba40ae125ba991cced7cc9e
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.2
csmith
Posts: 15
Joined: Sun Jun 15, 2014 6:05 pm

Re: Startup directory should be current working directory

Postby csmith » Thu Jun 19, 2014 11:43 pm

I too noticed this today when I thought I'd lost all the working copies I had saved. I found them, thankfully, in my home directory, but this is very unusual and unexpected behaviour. You just expect files to be saved to the directory you were in - same for loading, unless you navigate to a different directory and perform a file operation there, in which case applications generally default to that new location.

I would guess this is a bug (or more likely an requirements oversight...). In terms of priority though, I imagine quite low down the list of things to fix ;-)
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Startup directory should be current working directory

Postby jmaustpc » Fri Jun 20, 2014 6:17 am

Hi bgoodr and csmith

FreeCAD is not supposed to work the way you two are talking about here, it is a feature that FreeCAD does not work that way. :)

You can run multiple versions of FreeCAD and they all default to the same config file. The pre-compiled zipped versions are made as a convenience for users who don't compile their own, FreeCAD is not designed around being primarily used/installed that way. Many of us compile and/or run many different FreeCAD versions. No matter which one I start the "recently used list" will be the same.

Honestly if it worked the way you two have asked, it would be a real pain to use when changing between different instances of FreeCAD.

It is not generally best practice to have executable files in data directories, most non-windows platforms would have issues with that. Although viruses love to be able to work that way! :-)

You should be saving your files into somewhere logical in your data directory structure that also makes sense to you. e.g. perhaps if you had a few house designs you might create home/user/documents/CADprojects/house designs or whatever makes sense to you and on your O/S, and put you fcstd files in there.

One of you said you thought you had lost your files....did you go file menu...recent files ...? If you go to the edit menu...preferences...on the first page the is an option to set the number of items to be listed in your recent used file list. By default, from memory, the value is 4....but if like me, you want a longer list then increase this value.

Then whatever version of FreeCAD you open will now have the longer "recently used" list. You will not need to open every FreeCAD version just top change the one setting.

Jim
User avatar
yorik
Site Admin
Posts: 11567
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Startup directory should be current working directory

Postby yorik » Fri Jun 20, 2014 1:30 pm

Indeed that won't work at the moment, but I agree that it would be a proper and more unixish way to work (the default save directory is the current working directory, that is, the directory you started freecad from).

Feel free to open a feature request on the tracker... Might take a bit of time to get implemented (not a very high priority), but so it won't be lost...
User avatar
bgoodr
Posts: 131
Joined: Sat Jun 14, 2014 9:40 pm

Re: Startup directory should be current working directory

Postby bgoodr » Sat Jun 21, 2014 1:43 pm

yorik wrote:Feel free to open a feature request on the tracker... Might take a bit of time to get implemented (not a very high priority), but so it won't be lost...
http://www.freecadweb.org/tracker/view.php?id=1588 posted.
User avatar
bgoodr
Posts: 131
Joined: Sat Jun 14, 2014 9:40 pm

Re: Startup directory should be current working directory

Postby bgoodr » Sat Jun 21, 2014 1:49 pm

jmaustpc wrote: You can run multiple versions of FreeCAD and they all default to the same config file.
I've written up my mantis report so as to to not inhibit running multiple versions of FreeCAD.
jmaustpc wrote: It is not generally best practice to have executable files in data directories, most non-windows platforms would have issues with that. Although viruses love to be able to work that way! :-)
Agreed. I should clarify that the FreeCAD executable is not in my data directory. I've built FreeCAD from sources and have it installed in a installation directory that just so happens not to be under root ownership, and my "data" directory is in a separate directory. My focus here is that I might have many different projects, and I expect FreeCAD, on Linux, to respect that initial startup directory at invoke. And the behavior should dovetail well with the Recent Files List as given in my ticket at http://www.freecadweb.org/tracker/view.php?id=1588