Allowing flatpak apps to access toolbox applications

Hi there,
If I install an application via flatpak that needs to access tools that I’ve installed in a toolbox, what is the idiomatic way to achieve that in Silverblue?

My concrete example is that I’ve installed the IntelliJ IDE from flatpak, but it needs access to some compiler tools that I’ve installed only in a toolbox. Separately these appear to be the recommended way to do things in Silverblue.

Should I be launching my flatpak app from inside the toolbox? If so, is there an easy way to make launcher icons for that or do I need to do that from a command line?

4 Likes

You currently have two options:

1 Like

Thanks, I’ll try the flatpak-spawn poral thing, as that means I can keep my flatpak IntelliJ.

Just to be clear, is running the already installed flatpak version of IntelliJ from inside toolbox not an option?

1 Like

Flatpaks are run in their own root filesystem just like toolboxes so they can not easily access each others system installed binaries. They only get access to shared content from the user home directory.

So using flatpak-spawn in this case doesn’t seem to be compatible with IntelliJ’s Rust plugin. The configuration for that plugin expects to be pointed at the rust installation folder (see screenshot below). I could try creating a folder containing scripts with the same names as regular rust binaries that each try to call flatpak-spawn, but that doesn’t seem straight forward.

In this particular case of the rust toolchain there are plenty of workarounds (such as installing using rpm-ostree, or manually into my home directory), but it’s a shame that I cannot easily use my toolbox environment from the IntelliJ flatpak app.

Thanks for all the help though!

Installing Rust in your home dir via rustup might be the easiest option in your case.

Edit: VSCodium is using the Flatpak SDK extension to get access to Go & .NET. Maybe you could reuse that to get access to Rust.

There is a Rust extension for Flatpak, the real question is does IDEA use it?

CLion uses an SSH server for WSL. I reused the approach to connect to Toolbox from VS Code; you might be able to get it to work with IntelliJ, too.

3 Likes