Adding Gnome Tweaks as a Toolbox application
Toolbox is an application to provide the traditional command line tools within Fedora Silverblue. Most of the time, you will want to install desktop applications as flatpaks and command line tools in a toolbox. However, there are instances when a flatpak has not been developed, you may may just want a quick way to access an application. In those scenarios, you can often install the application in your toolbox. This quick guide takes you through the steps to complete that. For this example we will use gnome-tweaks app.
We will start by entering the toolbox and installing gnome-tweaks:
$ toolbox enter
$ sudo dnf -y update
$ sudo dnf -y install gnome-tweaks
Once the application is installed, you can launch it from the command line like this:
$ gnome-tweaks &
You can also start an application that lives inside your toolbox from the host machine by using the "run" option. To do this, first exit your toolbox, and then run a command like...
$ toolbox run gnome-tweaks
You can add a application shortcut to the host system for this app by creating an icon shortcut like this (note, this following command should be copy/pasted as one entire paragraph):
cat >> ~/.local/share/applications/GnomeTweaks.desktop << EOF
[Desktop Entry]
Type=Application
Name=Gnome Tweaks (toolbox)
Exec=/bin/toolbox run gnome-tweaks
Icon=org.gnome.Settings
Terminal=false
EOF
In this example with Gnome Tweaks, you will notice that some themeing is not recognized by the applications that live inside your toolbox. This is because your toolbox, being a command line tool, does not include themes installed by default. Secondly, toolbox does not have access to your host systems /usr folder where themes reside.
To overcome this, you can copy the theme folder to your toolbox.
From the host system (not inside toolbox), copy system themes to a location in your home folder:
$ sudo cp -r /usr/share/themes ~/Documents
Enter your toolbox and copy the themes folder into the appropriate location:
$ toolbox enter
$ sudo cp -r ~/Documents/themes /usr/share
Done! Now Gnome Tweaks has access to the same themes available on the host system, and graphical applications in toolbox can respect the host system preferences.