Fedora Silverblue is an amazing operating system whose workflows are all centered around the immutable host system and the user's toolbox containers. As I have found it difficult to solve some of the issues I first encountered when dealing with it, I am going to document the best solutions I have devised for them so far.
Flatpak programs work well(?) when used standalone. If you want them to interact with other programs, you are better installing them in your home dir or inside a container. For instance, I am currently making usage of no flatpak programs.
At first, I have decided to create a toolbox container named main
in which I install the packages I need which are available directly
from Fedora repositories.
Whenever I felt the need to install an external package.rpm
, I
took advantage of the container-centric workflows and sandboxed it
in the following way:
- first, I create a container called
package
withtoolbox create package
- them, I enter the newly created container with
toolbox enter package
- finally, I install the package with
sudo dnf install package.rpm
In order to make it easy to execute a program which is installed
inside a container, I came up with this simple script which I call
run-inside
.
#!/bin/sh
toolbox run --container $1 bash -c "$2"
This way, it would be possible to run emacs
which is installed
inside the main
container with run-inside main emacs
. This
script ensures the execued program inherits the environment
variables set in .bashrc
. I have found this to be useful since I
have some toolchains installed directly in home, such as rustup
and node
.
Analogous scripts can be devised for the command line interpreter of your choice.
Gosh, that was no simple job. I am documenting it so I am not chasing instructions around the internet again.
- create a container for vscode with
toolbox create vscode
- enter the container with
toolbox enter vscode
sudo dnf install
these implicit dependencies:libxshmfence
,libX11-xcb
,google-droid-sans-fonts
- get the official VSCode rpm package from its site and
sudo dnf install
it - Now you shuld be able to call
code
from within the container andrun-inside vscode code
from outside