Closed mdeweerd closed 2 years ago
Hi @mdeweerd !
I don't know how Docker works on Windows. The first thing that comes to my mind is to check the owner and permissions for /home/$USER/.config/kicad
, /home/$USER/.cache/kicad
, /home/$USER/
, etc.
If KiCad can't create files it will most probably die with a Segmentation fault
, I reported some bugs about the lack of checks in KiCad.
The fact that you can run it as root suggests this is a permission issue. Also: the docker images can be used to run KiCad interactively only for debug purposes, but the normal usage is running all as root. You basically provide a copy of your project (i.e. doing a git clone
) and just don't worry about using root
.
I understand that when you run it interactively and share your $HOME
you won't want to run it as root, but again, the interactive stuff is just to debug things, not for normal KiBot runs.
Is interesting for running old KiCad versions without installing them in the host system.
Ok, its just that the 'run.sh' script provided gets the user id and group and propagates that.
/home/${USER} is owned by root:root and only writable by root. .config
and .cache
are also owned by root but writeable for everybody (including subdirs).
Anyway, I (more or less) understand the reason:
One would need to create the user on the host vm to ensure access rights.
The solution is therefore to run as root and to not map the passwd and shadow files.
Il'll remove that from my script and update in my initial post.
(Now I still have to find how 'kibot' should be run with the docker VM).
Closing this as the cause is clear, the solution is to run this as root on windows.
Now going to check kibot which is another docker image based on this one... .
I updated the script again, when setting the user to root, the home directory has to be /root, not /home/
I got the demo working - I am going to propose a change there.
I am working on setting kibot up under windows. The 'kibot" script is provided further below.
I installed VcXsrv . When in interactive mode, I can run
kicost
and I get thekicost
UI from the docker VM, but when runningkicad
as a non-root user, I get aSegmentation fault
. When setting user and group toroot
, I get the kicad UI.I tried both dev and the release mentioned in the script.
I run
make KIBOT=./kibot
where kibot is in the current directory.I tried the
kibot_variants_arduprog
demo project. I always end up with an interactive shell, which may be my script (I am working on it).The core issue is the Segmentation fault for a non-root user in the Docker VM.
Script (with root as user, not the current user name):
If the above script is called './kicad_auto' then you can launch kicad using:
It's not that complex to adapt that script to a windows bat script (quoting the arguments seems to be the hardest part).