SSH into a Toolbox

I tried VSCode as a layered RPM, as a Flatpak, and installed as an RPM inside a toolbox.

The first two options have issues with some extensions needing native programs (such as jshint/webhint related things needing binaries on the system).

The Flatpak approach needs a workaround to launch a container using a special flatpak-spawn --host toolbox enter -c container-name-here command deep in VSCode’s configs, as seen elsewhere in this forum. Even still, it execs commands in the Flatpak instead of in the container. (Perhaps there’s a workaround for this too.) And there’s a small, but noticable performance hit.

For me, at least, running inside a toolbox itself is the best way to run VSCode… and then you don’t have to do anything special. The built-terminal will be in the container already and so will all the commands it might want to run.

The only downside to running the RPM’d version of VSCode in a toolbox that I haven’t been able to get apps in toolboxes to launch with custom desktop files. (That is: a desktop file in ~/.local/share/applications/ with something like Exec=toolbox run -c container-name app-name %f to launch the app inside the container. I think it should work… but doesn’t.)

So right now, I either open my terminal with the development container profile I made (which automatically runs toolbox enter) and type code to launch VSCode or do toolbox run code in my terminal’s system profile.

Also, if you have multiple toolbox containers, you might also need to have VSCode in each one… unless you have a main dev container and just access the directory from the other.

I’d love to be able to launch it like any other app, even if it’s inside a container.

4 Likes