Hi! I am also a silverblue user doing development, let me try to explain the different options you have and what I am personally using. Development on silverblue is different than what most linux users are doing (installing things on the host) so it can be somewhat difficult to find information. It works great once everything is setup though.
flatpak
So from your post I get that you tried installed your IDE (vscode) using flatpak. After installing the IDE you need to install python and node inside the flatpak or integrate the IDE with toolbox (see bottom of this post). It is not possible to use the installation on the host: flatpak is a sandbox. This is also the advantage of flatpak because you can keep your host system clean of development files if you configure the sandbox correctly.
To make node and python available inside the flatpak there are 2 options: install flatpak extensions or use mise. Flatpak extensions are the simpelest option when available. Open a terminal and search for your node version. Then install the found extension. Note that the extension should be targeting the branch of the installed freedesktop SDK version that your IDE uses. Currently that is 23.08
for most IDE’s.
$ flatpak search node | grep 23.08
Node.js 20.x JavaScript runtime built on V8 JavaScript engine org.freedesktop.Sdk.Extension.node20 20.12.1 23.08 flathub
Node.js 18.x JavaScript runtime built on V8 JavaScript engine org.freedesktop.Sdk.Extension.node18 18.18.1 23.08 flathub
$ flatpak install org.freedesktop.Sdk.Extension.node18
...
After executing the above commands tell your IDE to use the extensions: flatpak override --user --env=FLATPAK_ENABLE_SDK_EXT=* com.visualstudio.code
. This is also explained in visual studio code flatpak readme.
Using mise is another way to install node / python into the flatpak. This is the best option if you want to install python inside the flatpak because there is no flatpak extension. This is what I am using for go, node and java but might be a bit difficult if you are just getting starting with development. See the mise documentation how to get started, then point your IDE to the node / python installation installed by mise.
toolbox
Another option is installing the IDE inside toolbox. This will give a more traditional way of setting up an environment. To create a toolbox do toolbox create
and then do toolbox enter
to open a shell inside the toolbox. From there use normal dnf
commands to install and launch the IDE. See the toolbox documentation for more info. The advantage of this option is that it is possible to completely automate the setup using Dockerfiles.
flatpak with toolbox integration
The option I recommend to you is installing the IDE using flatpak and then using toolbox to install python / node. This is probably the easiest to setup and works great with visual studio code. Might not be a valid option for other IDE’s.
The most important step to getting this working is creating a fake podman/docker binary inside the flatpak container that ‘proxies’ the commands to podman. This can be done by executing the following commands on the host, which will create a ~/.bin directory with an executable ‘proxy’ script called docker. Then it will add this directory to the PATH
of the visual studio code flatpak.
$ mkdir ~/.bin
$ cat > ~/.bin/docker << \EOF
#!/bin/sh
flatpak-spawn --host podman "$@"
EOF
$ chmod +x ~/.bin/docker
$ flatpak override --user --env=PATH=/app/bin:/usr/bin:$HOME/.bin com.visualstudio.code
After executing this restart the IDE. Now install the Dev Containers
extension published by microsoft and open the Remote Explorer side menu. Assuming that you have created a toolbox and everything is working you should see your toolbox in the Other Containers block. Click on the arrow to attach the container on the toolbox. Then do the things you would normally do, install python and node using dnf, install the extensions etc…
Yes I uploaded the video to a random git repo because it is not possible to upload video’s to this website ;(
conclusion
So I think these are the 3 options you have. The last one is probably the best, but not available for every IDE. If you get stuck setting up your environment I would be more than happy to clarify.