I know we’re not supposed to be using rpm-ostree install on the host, or only as a last resort.
But sometimes I want to work in the host on the command line and I don’t know the best way to get my favorite terminal apps installed, like say micro which is in the fedora repositories and mcfly which isn’t.
In my Fedora container, I used dnf to install micro. I also installed Homebrew, and then mcfly via homebrew.
I thought I would be clever and try “distrobox-export -a mcfly” but that fails with “/usr/bin/distrobox-export: line 240: CONTAINER_ID: unbound variable”. But anyway that’s a crutch – I do want to be able to install CLI apps in the host.
Use Nix, see How to install Nix on Fedora Silverblue though there is also a ujust option for it. I install what I want to use often via home-manager, the rest I just alias to nix shell -p <nixpkgs>.
That last one is probably what you want, as it just gives you the command. It’s wrapped in Nix, but otherwise it’s almost native.
ujust brew worked brilliantly, thanks @j0rge. Seems more approachable than Nix.
A few quick questions on this just so I understand –
brew and apps installed via brew appear not to be available when I change shell to fish. I must be missing something basic.
apps installed via brew on the host are not available on any containers, right? (I understand you wouldn’t want apps in containers available on other containers, but was wondering about host->container).
What about apps that need to run as root? If I install with brew, they go into my /home directory. But when I try “sudo app” it says not found. And if I try “sudo brew install app” it says brew is not found. So catch-22 there.
If I install apps in the host that differ from the container, and all have access to ~/.bashrc, I often have errors on startup that this or that is not available. Seems like I should have unique ~/.bashrc for every container/host (in addition to having something in common)?
In a rush so sorry for being curt. I think we only have zsh and bash right now. If you could file an issue here someone can take a look: Issues · ublue-os/config · GitHub
Right, decoupled from the host so if you want a tool inside the container you have to ensure it’s installed in there.
If you sudo -i you can do this (for example to use micro to edit a file in /etc), but maybe we can make this easier, can you file this as an issue also?
You can use the -h flag with distrobox to create a separate home directory for a container, this ensures that your boxes and your host don’t collide with shared dot files.
You could also add the packages you want to a distrobox.ini so that your containers always have the stuff you want inside of them, then you can just match what’s on the host. I’m sure others will have tips too.
What it be possible to copy whatever Bluefin-DX & Aurora-DX are doing?
I had the same problem as OP @chicagonyc regarding fish shell & brew on Bazzite.
On Aurora-DX it just worked out of the box.
I used ujust configure-shell to switch to fish shell and was able to access everything brew related.
Additionally I think it would be nice to add ujust configure-shell to Bazzite!
I don’t think so. GUI apps should work ok. I remember having Vivaldi browser and an email app running from distroboxes. You just have to share them with distrobox-export plus parameters. You can also export the GUI app from BuddyBox.
The only GUI app I had problem running it from distrobox is Gparted. But I think is related to permissions.