EEschema - How to modify Library Symbols

Lubuntu 20.04 LTS, KiCAD 5.1.6

I’d like to add or modify symbols in the Libraries, but am faced with the problem that saving changes isn’t possible.
On inspection, this seems to be due to the Libraries being owned by root:root with rights rw-r–r--
As a normal user, I’m not allowed to save my changes then.
Creating a local library with just my user-defined parts doesn’t work, KiCad doesn’t find the library.

I see two options:

1: make a local (and user owned) copy of the Libraries and use those as default. I have bad experiences with doing this, as KiCAD always insists on using its own paths instead of user-defined ones.

2: change the Library access rights to root:root rw-rw-rw (using chmod), this would then allow all users to change the Library.

Is there a third way? Or which solution would you recommend?

Thank You.

Third way is to keep the official libraries where they are and set up parallel personal libraries. Put your modifications and new parts in your parallel personal libraries.

Check out this FAQ entry about KiCad 5’s library philosophy. It has some suggested (but by no means mandatory, at the end of the day use what works for you) configurations setups for libraries.

1 Like

Thank You.
Yes, I read that FAQ as well and that’s the idea I like the best, but real life thwarted me. A Library that I defined could not be found by KiCAD. Modifying the path to user libraries is not possible (it shows as “read only information”)

Hmmm? Can you show us a screenshot from the Library Manager where it disallows you from having your own library with a path that doesn’t have any environment variables? Personal libraries work fine for me. In fact I not only have my own library but a whole bunch of Sparkfun and Digikey libraries in my directories.

Incidentally I prefer not to copy the system library wholesale but only add created or modified symbols to my own library.

Gaaah! I just now found out that you need to have an active (dummy) project created/open before changing paths and libraries. And then the settings suddenly work globally, not just with the project!

Wow! Someone at the KiCAD team has a really strange approach to user interface.

I’ve now copied the complete library to $HOME/.local/share/kicad/library and changed the path in KiCAD.

OK, it apparently works for me now. Otherwise: “I’ll be back”

If you would not be able to add a library to:
from within the KiCad project manager if no project is open, I would consider it a bug and worth reporting (if it’s not already on

So I just started KiCad 5.1.6 with no active project ( kicad from commandline) (Apparently you can not close a project from within the project manager, so I started a non -existent project).

Then I added the “-cache.lib” of another project to to the symbols lib table, exit Kicad and:
paul@zacate:~/.config/kicad$ less sym-lib-table

The library was added as expected.
So for now I’ll file it as beginners struggles.
Please let us know if you encounter further problems.

That’s fine for me.

My idea was to have the library under /usr/share to be the default and to have an additional library under $HOME/.local/share for my specific parts. This did NOT work.

My hypothesis is, that once KiCAD finds a suitable library directory (under /usr/share) it stops looking further, so any user libraries are never loaded.
The documentation says nothing about this (as it says nothing about a lot of other things).

My workaround is to copy the complete library folder from /usr/share to $HOME/.local/share and set this as default library, and add parts to this as needed.
Downside is that I have to do this for every user, and that coherency is gone.

But OK, “it’s a feature.”

That KiCad needs any open project to be able to modify the settings is another feature I guess.

Nope. Every .lib file named is loaded. You can see all of them listed in $HOME/.config/kicad/sym-lib-table and you can modify this list with Preferences > Manage Symbol Libraries. In the screenshot below you can see the ones I’ve added.

Thanks. Perhaps my brain is defective. Or KiCAD is designed by geeks who have reversed brains.

I’m simply not able to add/modify user parts unless I have a full local library.
Just this screen drives me up the wall. I’d expect a user library path to be possible:

Stop thinking library paths. There are no library paths. There is however an environment variable substitution for KICAD_SYMBOL_DIR which is the directory containing the system supplied libraries. That’s all it is. You don’t have to mess with the paths in that dialog.

In 5.1 a library is actually a pair of files, a .lib, and a .dcm which is a table of contents for the former. To create a library from nothing, use the Symbol Editor and File > New Library. Then add symbols to it and when you save the library it will give you the choice of where to save, and adding to the project specific list or the global list. You can also import pre-populated libraries from say DigiKey using File > Add Library.

PS: By global I mean global for that user, not for all users on the machine. That is to say for all projects of that user.

1 Like

Thanks. I understand what you’re saying. But the symbol Editor does not allow me to create a new library, just to select an existing one. Great!
So I can select a part that I’ve exported from the main library and add it to a user library containing one part. Breathtaking.
It will actually appear in the global library listing at the end as a solitaire part that doesn’t belong to a higher level anywhere. Grouping parts/symbols in a “folder” (like 4xxx) is not possible it seems.

My idea of just working with a local copy of the main library folder works best until now, but is far from satisfying.

If you look at my screenshot you will see that I have my own library called Ken which certainly contains not just one symbol (part). And obviously I created that library from zero. Explore some more.

Yes, I noticed that. I’m still exploring with a feeling that I’m back in the DOS 3.1 days. Incredibly, KiCAD is not able to show hidden folders like $HOME/.local

UPDATE: OK, this is even more incredible: I’ve finally managed to create a new user symbol library, but I’m not able to add symbols to it!
My user library is in $HOME/.local/share/library and there’s no way in KiCAD to navigate to hidden directories!!! WTF??? I can’t even enter the path manually, there’s no field in which to do it.

$HOME/.local/share is the most used directory for user conf and library files, and KiCAD doesn’t allow this?
Please tell me there’s a setting to override this. Please. Please!

Hmm, strange, I do have a Location: box in my dialog panel and I am able clear it and type . in it and it then shows me a list of completions starting with .

You may have stumbled upon a bug which is due to the OS defaults set for file browser dialogues for the widgets used by KiCad, wxWidgets.

What was the operation you selected? It looks like you selected File > Add library. That’s for importing whole libraries like a DigiKey library. Normally to copy a symbol I open the symbol I want then Save As, and then it presents me with the names of the libraries, not their paths.

KiCad uses wxWidgets library which handles file open dialogs and other UI. There should be some way to turn hidden files on, but it doesn’t depend on KiCad. These kinds of things are problems for all cross-platform applications, not just for KiCad.

Any particular reason you want to store such data in a hidden directory?

Why not ~/Documents/KiCAD_libs

It’s visible, less likely to forget during key backups and doesn’t run into the benefits of dotfiles (or hidden).

1 Like

It looks like GTK on Linux. Click context (RMB) menu on the file list and it should show options where you can turn hidden files on.

Mainly success.
The key was kenyapcomau’s identification of me using “Add Library” instead of the correct “New Library”. KiCAD is still not able to show hidden paths, but in the “New Library” screen I’m at least able to type in the path/file manually, thus circumventing the problem.

I’ve now created a new (local) library visible in the global library. By right-clicking on it in the Symbol Editor I’m able to import symbols.
This will only apply to the current user, which is fine. Every user should maintain her/his own libraries.

@Naib: yes, there are several reasons for using $HOME/.local for libraries and configuration files.

Thank You to All.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.