How to set default directory - AppImage installation

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!
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

How to set default directory - AppImage installation

Post by micksulley »

OS: Linux Mint 19 Tara
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13959 (Git) AppImage
Build type: None
Branch: master
Hash: 2f18182b6dff87f8857787c854e39ca4d441f993
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)

When I open FC and select File > Open it defaults to the directory /tmp/.mount_FreeCAgmU7Bw/usr Is there some way to set the default directory, I can't see anything in preferences. Not a big deal but would be nice to set it to a more convenient directory.
Mick
Last edited by micksulley on Mon Jul 23, 2018 7:36 pm, edited 1 time in total.
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: How to set default directory

Post by Bance »

My version remembers the last place a file was opened from and goes there to open, the next time 'open file' is called.

I think python writes that location to user.cfg which can be found in ~/.FreecCAD.... The first indented paragraph has the file save location. I suppose you could manually write your location there, if python isn't doing it for you. You would be wise to back up user.cfg before changing it manually.

HTH Steve
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

Re: How to set default directory

Post by micksulley »

There is something odd here. Just looked in user.cfg and I see a line
<FCText Name="FileOpenSavePath">/home/mick/Documents/Drawings</FCText>
which is the last location I saved to. Closed FC and reopened, File > Open defaults to /tmp/ again, although a slightly different directory. Looked in user.cfg again and it is still /home/mick/Documents/Drawings

Is this a limitation of running the AppImage I wonder?
Mick
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: How to set default directory

Post by GeneFC »

You can change the user.cfg entry, but it will not stick beyond the first use.

This subject has been a topic of debate, but the only choice in FreeCAD is a default of the most recent file location. I would like to see a solid "preference" for default opening location like exists in many programs, but others think this is incorrect.

Gene
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: How to set default directory

Post by Bance »

If you haven't modified your install you can safely delete user.cfg and system.cfg, they will be re-written the next time you open FC, it's possible they are corrupted somehow. I don't know if app image does things differently, sorry!

Steve
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

Re: How to set default directory

Post by micksulley »

Just tried deleting user.cfg & system.cfg FC does recreate them. I then created a new drawing, saving defaulted to the /tmp directory, I saved in my preferred directory then hit File > Open and it again defaulted to /tmp
I then closed FC, checked user.cfg and it does have
<FCText Name="FileOpenSavePath">/home/mick/Documents/Drawings</FCText>
but when I open it again and File > Open it still defaults to /tmp
Seem like it just ignores the setting in user.cfg

I have also installed FC 0.17 from the repository. On opening that defaults to my home directory, more sensible, then if I save something then next open defaults to the directory I used, again this is OK, and yes it saves this in user.cfg. Seems like a problem with AppImage

Mick
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: How to set default directory

Post by Bance »

Actually I have noticed that if I download a file from the forum and open it instead of saving it, then modify it as I usually would to help another user, then save it to re-post on the forum, it saves to /tmp/mozilla_bance0. It must be a firefox thing because the default directory for downloaded files is ~/Downloads.

Steve.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to set default directory

Post by NormandC »

Hi,

This seems relevant, but I didn't test any of it: https://discourse.appimage.org/t/portab ... data/105/6

Mick, since this issue is almost certain to be specific to the AppImage, would you mind editing your first post and add "AppImage" to the title? That would make future searches easier. Thanks.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: How to set default directory

Post by GeneFC »

Bance wrote: Mon Jul 23, 2018 5:32 pm Actually I have noticed that if I download a file from the forum and open it instead of saving it, then modify it as I usually would to help another user, then save it to re-post on the forum, it saves to /tmp/mozilla_bance0. It must be a firefox thing because the default directory for downloaded files is ~/Downloads.
That is because you are not "downloading" the file. Many programs, not just Firefox, use the temp folder for files that are not intended to be saved. When you select open or run instead of download the file ends up on your computer, but it is not placed in the download folder. If it was, a lot of people would be annoyed by stuff getting added to the download folder. And it is really a bad idea for any program to try to delete a file that it thinks is no longer needed.

Gene
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: How to set default directory - AppImage installation

Post by Bance »

Ahh OK, Thanks for clarifying that Gene.

Steve
Post Reply