This is very much a “Windows thing” to do but I would like to preload a Distrobox on system start.

The benefit is that distrobox enter BOXNAME or launching a binary or app from distrobox-export is way faster.

On Fedora Kinoite (Atomic KDE) with Podman, I use this:

cat ~/.config/autostart/preload-BOXNAME.desktop <<EOF
[Desktop Entry]
Type=Application
Name=Preload the Distrobox container BOXNAME
Exec=/usr/bin/podman start BOXNAME 
EOF

This is a KDE specific workaround, as only “Applications” reliably autostart.

In the app menu enter “Autostart” and go to the settings page, the box should appear there.

Log out and back in, go to the same settings page to verify.

  • boredsquirrel@slrpnk.netOP
    link
    fedilink
    arrow-up
    2
    ·
    7 days ago

    Okay true, a systemd service would also work.

    Having it as a user service in ~/.config/systemd/user/ would also work without privileges (as that is one part of Atomic OSses)