3D Viewing only working as root user in Ubuntu

I can’t seem to get 3D viewing to work unless I am a root user. I’m not sure where my permissions could be messed up . I am on Ubuntu 19.10 and KiCad version info is below. Any thought where I should look to modify permissions to get 3D to work as a non root user? Thanks.
Application: Pcbnew
Version: 5.1.6-c6e7f7d~87~ubuntu19.10.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.65.3 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.9.0/openssl/zlib nghttp2/1.39.2 librtmp/2.3
Platform: Linux 5.3.0-64-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.67.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.65.3
Compiler: GCC 9.2.1 with C++ ABI 1013
Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

It’s either read permissions to the 3d models or access rights to the 3D rendering

Does glxgears work. How did you install

Do you also have similar problems with other programs which are part of KiCad, or only the 3D viewer?

paul@medion:~$ which eeschema
/usr/bin/eeschema

paul@medion:~$ cd /usr/bin
paul@medion:/usr/bin$ ls -hl kicad eeschema pcbnew
-rwxr-xr-x 1 root root 728K Jul 17 17:35 eeschema
-rwxr-xr-x 1 root root 2,2M Jul 17 17:35 kicad
-rwxr-xr-x 1 root root 728K Jul 17 17:35 pcbnew

So these KiCad parts have root as owner.
Duh, I’m rambling. Of course they do. Stuff in /usr/bin is for all users to use, and indeed “group” and “other” have read and execute rights.
I would not even know the name of the 3D viewer.

A quick grep on the output of ps suggests that not even eeschema or pcbnew are run as separate processes when started from the KiCad project manager, but they only show up when run in “standalone” mode.

I only have this issue with the 3D viewer. Everything else seems to work fine.

You need to give us the story of how you installed KiCad and any other components like libraries. Typically when installed via official packages, permissions are set correctly so that any user can run them. However if you unpacked any archives as root manually including creating any directories as root, they may not have the correct permissions set. Are the 3D models from the official Ubuntu package?

In Unix/Linux, not just the permission of the file matters. The permissions of all directories to / have to allow to required access. For example, if you decided that you would keep a package of 3D models in /usr/local/lib/kicad3D, but you created this directory as root with 700 permissions, then ordinary users cannot access anything under that directory.

The packager may have screwed it up. Hard to say. It sounds like you might not be that familiar with Linux file systems. You should have a graphical file manager. Look under something like /usr/share/kicad for the libraries and you can see how they are set that way. Maybe even change them from the GUI.

First of all you need to define

There is a wide variety of reasons why it doesn’t work starting with “kicad crashes when I press 3d viewer button” down to “everything actually works but I can’t see the footprint models”. Each failure type will narrow the field of possible causes significantly and you are more likely to get helpful answer.

Here is a good read on how to report issues in a productive way and to make those that are trying to help you happy: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

1 Like

Thanks very much everyone for helping out with this issue. I discovered that my ~/.cache/kicad directory was set up with root privileges for some reason. This meant ~/.cache/kicad/3d wasn’t available to me as a user. Once that was fixed 3D viewing is working perfectly…

Jim

1 Like

That’s good. Sometimes going superuser makes a problem worse if one isn’t aware of the effect of permissions.

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