I was using kicad nightly for a while and now that 6.02 is in testing I want to switch to that branch.
I am using Ubuntu and so I did apt-get remove --purge kicad-nightly, added the testing PPA, and installed kicad.
The versions on the installed software are all correct, but the environmental variables are all being set to nightly. Because of this all the libraries are confused. I cannot figure out where this configuration file might be, how can I fix this?
I’m hoping that if I get the path set to the correct one things might work okay, I’m trying to get projects to work on both a Windows and Ubuntu computer using 6.02. That’s a pretty big deal, hopefully I don’t need to do some kind of network drive based libraries! =)
So hopefully this is just easily solved with a fix to the environmental variables.
[edit: I did also delete the local configuration files, or at least I thought I did]
If you really have deleted the local configuration, KiCad should start from scratch. Sometimes the term “environment variable” is used with a confusing meaning when we talk about KiCad: do you mean the path variables defined in the UI or real environment variables from the OS environment?
I can find them in the path setting from the UI. When I try to modify them by deleting the -nightly part it warns me that they were set by the OS and that the changes will be reverted (and they are, of course).
I did delete the configuration directory in my local user folder as well as uninstalling them with --purge so I don’t know where these old things are being set. I tried to grep in the configuration folder for these variable names but came up empty.
I really just want the official footprint, symbol, and 3d package libraries to show up, right now using the default set (top radio button) is greyed out because the path to them is invalid. And when I do the purge and reinstall it does ask me if I want to import settings from a previous version (I say to start from scratch). It seems to think it’s starting from scratch with 6.0.2 but retaining these old variable values.
For a while the nightly versions on Ubuntu and some other distros were using a wrapper script around kicad that set some environment variables before running the actual executable… is it possible that’s still the case with the 6.02 build you have installed? It shouldn’t be, I don’t think, but it sounds like it might be the case based on your statement:
When I try to modify them by deleting the -nightly part it warns me that they were set by the OS and that the changes will be reverted (and they are, of course).
Can you do a which kicad and then look at whatever that outputs to see if it’s the real kicad executable or a wrapper script?
edit: @MitjaN’s suggestion is a more plausible explanation for what I described
Take a look into /etc/profile.d/ if there is a kicad-env.sh which sets any other environment variables. IIRC nightly installer might put something here
Thanks for the thoughts! What a fantastic forum community!
I can’t say which thing it was for sure, but after another purge and installation and deleting of the config directory and reboot the paths seem to be correct.
I’m going to chalk it up to weird Ubuntu quirks for now and see if I can actually make a PCB . I am sharing the project file through dropbox to a Windows computer and am now thrilled that I can see the same PCB on my home and work computers. Very nice, I know that must have been very tricky.
I can also now edit the paths from the UI without getting a warning about the OS setting it.
I have a question about how to best make my own custom parts and organize them into the kicad libraries shared between multiple computers. It seems like a sane solution might be to set the paths to a dropbox folder with the shared libraries. Is it possible to add a third search path to custom libraries in addition to the project folder (since I share libraries between projects) and the default libraries?
Is there a better way to manage shared personal libraries? I noticed KiCad Libraries · GitLab in the documentation, does it make the most sense to just fork the official git repository as in your linked post above? I don’t want to make a huge headache for myself later for sure, I suppose the way to avoid trouble is to not touch the libraries that are there to avoid git conflicts when the developers update them?
Sure. You can add any libraries to your library table. You don’t have to use an environment variable to set the path, you can just add the path directly if you want. In other words, it’s not a requirement that you first define a path variable in the Configure Paths dialog, and then reference the library relative to that path variable. You can do this if you’d like, though.
This can work. One potential issue with using Dropbox or similar to sync libraries is that the sync happens automatically in the background, so at unpredictable times if things are modified in various places.
The way I prefer is to create dedicated Git repositories for my libraries, hosted on GitHub or GitLab. This is not the same as the official KiCad libraries – it is not recommended to fork those and add your personal parts to them (unless you are trying to contribute your parts to the official libraries).
With the Git approach, personal libraries are checked out to a folder on each computer – it doesn’t really matter which folder – and then added to the global library tables. Then the synchronization is done manually, i.e. when I change or add something, I do an explicit commit and push, and then on other machines I do an explicit pull to update the working copy. I prefer having this control over when updates are sent to and received from the server.
This is a really complicated issue and if you ask three people you’ll get at least four different ways of handling this.
There are a lot of factors affecting this. One of them is the environment. If this is small office situation, placing them on a network shared drive might be an option. But concurrent read/write access is a PITA. You can have multiple users having read access and one person (office librarian) having write access, but this can be awkward if more users want to add assets to library or if the librarian will be overwhelmed by library edit requests.
git offers a solution for some of this issues. As craftyjon, I also use git to manage libraries, but I think that this is a viable option only if all users are either familiar with git or can be persuaded to get familiar with it.
Also if you plan to contribute assets to KiCad’s official library you’ll have to use git for libraries so this might push you to the use of git.
FWIW, I’ve used Git at several companies to manage EE libraries and designs, and none of the engineers had trouble with this workflow even though many of them were not software engineers or familiar with software development processes/tools.
This is really mostly just for me to use on multiple computers (so only really one possible editor at a time thankfully). A separate git repository for just my libraries sounds pretty reasonable, and if I can contribute parts to the official libraries I will. I know it will take a lot of practice to do them well enough to be worthy, though I did find the official design guide so that will help a lot.