How to start a program to make it run from within in a Toolbox?

I start my conkies with a startup script. This script, some other scripts and the conky text files are all placed in a folder conkyscripts. In this script I set some values for the different conkies and start with conky …

Now I have installed conky in a toolbox container called Programs and want to start it using the startup script so I have all my settings as wanted.
In the startup script I use:

toolbox run --container Programs conky

followed by the name of the conky and its position on screen.

This works, I see most of my info, but some special entries don’t. For example I can’t get info from nvidia-smi in the folder /usr/bin. I still have nvidia installed by using rpm-ostree install, so not in a toolbox. How do I address the nvidia-smi program from within a container?
I tried it with

${color1}Nvidia Driver           ${color3}${alignr 0}${exec /usr/bin/nvidia-smi | grep SMI | cut -c 14-19}

but that doesn’t work, at least I don’t get to see the info I want to see.

Who can help me with this?

Removed nvidia

Added atomic-desktops, toolbx

Added toolbox-drivers

Removed toolbox-drivers

Have you installed this application in your toolbox as well?

Yes, I did install Conky in the toolbox. If it works I will uninstall the one which I installed with rpm-ostree to reduce the amount of programs which are layered.
I can start Conky inside the toolbox, I get 90% of the system-info but what does not work is the Nvidia-smi program which is installed in the base software with rpm-ostree.
Should I install it as well in the toolbox and use that version? How about the Nvidia driver, can I also use it from inside a toolbox?

Either install nvidia-smi in the toolbox or call it from the host using flatpak-spawn --host nvidia-smi.

The kernel can not load kernel drivers from toolboxes.

1 Like

nvidia-smi is a command that is installed when the xorg-x11-drv-nvidia-cuda package is installed so it may require having that package installed both within the toolbox and layered on the OS. I am not even sure it could function from the toolbox environment when the cuda driver is active on the OS.

Thank you Timothée, it works. I now use the program Conky which is installed in the toolbox, the conky files which are in somewhere in my user directory and through your instruction

flatpak-spawn --host nvidia-smi

I use nvidia-smi which is installed in the host.
Now I can uninstall Conky in the base install, giving me one less layered program.

Thank you very much.