How to Use a Custom Home Directory per Box in Distrobox

https://discussion.fedoraproject.org/t/toolbox-how-to-use-a-custom-home-directory-per-box/120400/5

Toolbox: how to use a custom home directory per box? Ask Fedora atomic-desktops toolbx bug-reported distrobox Jun 2024 Sep 2024 3 months later richiedaze Sep 2024

I am thinking about switching from Distrobox to Toolbox, as it is faster and more minimal.

But the biggest feature of Distrobox I miss is using a different home dir per container, automatically.

~ ❯❯❯ cat /etc/distrobox/distrobox.conf
DBX_CONTAINER_HOME_PREFIX=$HOME/distrobox

When creating a box it will automatically use ~/distrobox/BOXNAME as homedir. This prevents dotfile issues, especially when using different distros in the box than on the host.

Is this possible for Toolbox?

Yes it is, I have successfully created toolbox containers using alternate home directories for a while now.

Distrobox has a shortcut for updating all containers using their individual package managers

    ???

while the binary export may be strange, the app export works really well and is really not complex

    I have a script for app export task and use aliases for my toolbx binaries

distrobox allows distrobox assemble to build a container with a containerfile

    I use a systemd unit or a quadlet to build my toolbx images and containers on the fly.

toolbox said “my container image is too old” when it didnt recognise its id. Like… hardcoded breakage? This was ublue-distrobox and updated yesterday

    My container gets rebuilt on login, podman auto-update, or systemd --user restart my-container.

Also, the biggest issue with real usage for installing apps is: there is no normal way to upgrade the distro, so you need to use a rolling release or rebuild the container. [/quote]

rebuild the container

:eyes: at this quadlet example.

Bind Home directory onto the container.

1. Bind default home directory.

Use home directory normally. (toolbox default)

#Volume=%h:%h:rslave

2. Bind overlay on custom skeleton directory.

2a. Temporary (volatile overlayer).

Use a new overlayered skeleton directory every time.

#Volume=%E/skel:%h:O

2b. Permanent (non-volatile overlayer).

Use saved overlayered skeleton directory.

Volume=%E/skel:%h:O,upperdir=%S/%j/%p%h,workdir=%S/%j/%p/workdir/6

3. Bind extra home directories

Volume=%h/.local/src:%h/.local/src:rslave

Updated: