KiCad-Nightly over zealous folder creation

I thought a change occured recently setting the minimum python to py3.8 for nightlies (or at least the plan for V6)

That was for Windows only

It’s not even a requirement. It’s just for MSVC builds we are going with python3.9 due to other package interdependencies I wasn’t going to unwind. If someone wants to build kicad for windows with python < 3.9 they are more to free to themselves.

Python3.9 will be required for macOS to support Big Sur however. (First official big sur supporting release)

Python 3.6 is obsolete come December 31st anyway so it’s not that far off to go latest

As a Mac user, I do find it annoying when an app gratuitously creates a folder in ~\ or ~Documents\ for its internal support files, so I am thankful for how the support and documents directories are handled on the macOS version of KiCAD.

(I also want to give a huge THANK YOU to the dev team for continuing to make a proper version of KiCAD for the macOS platform rather than the approach taken by a competing product!)

I think that the topic has diverged a little bit from the point but if I must give my humble opinion, I really don’t like to have random folders from apps messing around with my user files. The standard de facto in linux no matter the distro is to use dotted files for app files at user home and it is what has being done for many decades (2 at least since I started to use linux), so whatever was the origin of dotted files it looks to me a pretty long standing standard

Perhaps even if it could be easy for basic users to use non-doted folders, mixing apps files with user files can lead to even bigger confusion.

Then we could think on the chances of someone that can not find a hidden folder to mess with plugins and the user target gets close to 0…

On the other hand if you want to know what a non hardcore linux user is going to think when this app is installed just read the first message in this thread…

Of course it is your call to fix this but one of the advantages of open source communities is to get feedback and I don’t see a single linux user telling that it is right to use non doted folders to store the app files on their homes…

1 Like

Linux distributions didn’t have Documents or Downloads folders either in the past, but now many distros do that now, matching user expectations who are coming from Windows and Mac, and also providing a better organization for the home folder (in my opinion, at least)

Unfortunately since some Linux distributions have not decided to follow that convention, we can’t assume that Documents dir exists, and have to do something else. Dotted dirs are not preferable because they are hidden by default in many file managers, and we don’t want these files to be hidden. But, we will use dotted dirs as a fallback (most likely ~/.kicad/). I’m guessing any Linux user who is using one of the, shall we say “less user friendly” Linux distros that does not provide ~/Documents by default, will also be okay with turning on “show hidden files” in the file explorer.

(In case it wasn’t clear, I am a Linux user. I just happen to use a Linux distro that is using the XDG standard and provides a Documents dir.)

1 Like

A ok I got lost in the thread then, to use as fallback .kicad sounds perfect, at least allows to have an option of hide the app folder in somehow.

Perhaps I would suggest to made this path configurable, on the app on with a environment variable this would be suitable to any OS, and would suit any user preference.

It is configurable :slight_smile: we’re just talking about the default now

Configuring stuff like this should be for advanced users only, so whatever the default is with no configuration should be the most straightforward thing for non-advanced users. This means using a non-hidden folder if possible (i.e. using the Documents dir if it exists) in my mind.

Hurl then I was completely lost :smile:. That sounds reasonable then

1 Like

~/Documents/appname is the wrong place for it anyway. That is for, well, documents that the users consult or modify in the course of work or play, and are not as frequently used as stuff in ~/Desktop. The things you list are consulted by the application most of the time, access should be mediated by application helpers, and only people in the know poke there directly. Let’s look at the contents of a couple of app specific directories on my system.

$ ls -1 .ssh
authorized_keys
config
connections
id_dsa
id_dsa.pub
id_ed25519
id_ed25519.pub
identity
identity.pub
id_rsa
id_rsa.pub
known_hosts

So, configuration, keys, and a subdirectory for named pipes for reusing the session connection.

Another one:

$ ls -1 .local/share/digikam
cameras.xml
kipiplugin_acquireimagesui.rc
kipiplugin_advancedslideshowui.rc
kipiplugin_batchprocessimagesui.rc
kipiplugin_calendarui.rc
kipiplugin_debianscreenshotsui.rc
kipiplugin_dlnaexportui.rc
kipiplugin_dngconverterui.rc
kipiplugin_dropboxui.rc
kipiplugin_expoblendingui.rc
kipiplugin_facebookui.rc
kipiplugin_flashexportui.rc
kipiplugin_flickrexportui.rc
kipiplugin_galleryexportui.rc
kipiplugin_googledriveui.rc
kipiplugin_googleservicesui.rc
kipiplugin_gpssyncui.rc
kipiplugin_htmlexportui.rc
kipiplugin_imageshackexportui.rc
kipiplugin_imageviewerui.rc
kipiplugin_imgurexportui.rc
kipiplugin_ipodexportui.rc
kipiplugin_jalbumexportui.rc
kipiplugin_kioexportimportui.rc
kipiplugin_kmlexportui.rc
kipiplugin_kopeteui.rc
kipiplugin_metadataeditui.rc
kipiplugin_panoramaui.rc
kipiplugin_photolayoutseditorui.rc
kipiplugin_picasawebexportui.rc
kipiplugin_piwigoexportui.rc
kipiplugin_printimagesui.rc
kipiplugin_rajceexportui.rc
kipiplugin_removeredeyesui.rc
kipiplugin_sendimagesui.rc
kipiplugin_shwupui.rc
kipiplugin_smugui.rc
kipiplugin_timeadjustui.rc
kipiplugin_videoslideshowui.rc
kipiplugin_vkontakteui.rc
kipiplugin_wikimediaui.rc
kipiplugin_yandexfotkiui.rc
QtWebEngine

Configuration and customisation for the app and plugins. The QtWebEngine is for the Qt part of the app.

Another thing about ~/Documents is that many applications default to putting working documents there, e.g. LibreOffice. If the user sees something in ~/Documents they don’t recognise they might delete it and damage ensues.

Eh, these are all things people should regularly know

No damage here, the content of these folders is knowingly user generated.Nothing gets saved anywhere without the user being prompted for a destination.

You’re still thinking of savvy users that know about these folders. Have a look at applications like arduino where people install libraries and toolkits in ~/.arduino15 using the library and board managers in the app. Or look at the Rust development system where crates are installed in ~/.cargo. Or even firefox which uses ~/.mozilla/firefox. Why should users have to know about these locations or how they are organised to be able to do useful work? What if in future people are able to install KiCad plugins from a central repository? Or import templates.

1 Like

I think the target platforms are too many to find an automatic solution. So I guess it would be better to find the “best” folder for that particular setup and offer it to the user in the first run specifically displaying why is that needed.

A newbie could press “OK” to accept the offered default easily or an advanced user can change it via a simple “change” button which opens a folder dialog to choose. As now this environment variable is already implemented in nightly, this would become a seamless transition for all of us.

I’m just against automatic operations. Just give us a chance to choose.

Just take the default for the 3 platforms (Lin/Win/Mac) in question. People who really want different can set an environment variable. It sounds good and democratic to offer an interactive choice but it does not contribute to better user experience, it just adds another complication. It can also complicate version upgrades later. Imagine the mess if every common Linux application were to ask on first use do you want to create .mozilla/firefox or .gimp or .ssh or whatever.

2 Likes

well no matter the decision, someone won’t like it.

~/.config/kicad should be where global kicad settings are stored so… one option could be do what other software does that requires not only config data but user data

Program launch

  1. Check ~/.config/kicad (or reg on windows). If locations do not exist for version: create with skeleton information.
  2. Check what ~/.config/kicad/$VER has for user locational information
    2a) if a directory is stated and directory structure exist proceed (ie previous launch)
    2b) if a directory is stated but the directory structure does not( ie delete ) prompt the user as to where and update global config
    2c) if no directory stated prompt user where they would like to store

thing is 99% of people will probably choose ~/Documents :wink:

It is now changed to ~/.local/share/kicad. There won’t be any other changes here in V6 unless some critical issue is found.

4 Likes

I can both confirm that the latest V5.99:

  1. Does not make a ~/kicad anymore.
  2. It makes a ~/.local/share/kicad.

Thanks yet again for fixing such things so promptly. The KiCad “design team” are a bunch of amazing folks!

time to execute ln -s ~/.local/share/kicad ~/Documents/kicad :wink:

I wonder if there’s an wxwidgets api to automatically create that symlink on kicad startup

The ~/Desktop and ~/Documents names depend on the language the user is using. They might be ~/Bureaublad and ~/Documenten on systems of Dutch users.