Using distrobox-assemble and icon is not exported

Up till now I always used distrobox-create and everything works fine also distrobox-export exports icon just fine.

But today I have learned from one other forum thread that is better to use distrobox-assemble, so container can always get recreated.

I decided to try to install Foliate book reader on my Blufin/stable:

  1. I created distrobox.ini file with content:

[foliate]
additional_packages=“foliate”
image=quay.io/toolbx/ubuntu-toolbox:24.04
init=false
pull=true
root=false
replace=true
start_now=true
exported_apps=foliate

  1. Then executed the command distrobox-assemble create to create container.
  2. After container created I have pressed Super key type in: foliate and I get:

I can start Foliate and it starts just fine. The only issue is all icons are “Ubuntu” icons, but I expect to see Foliate original icon:

Am I missing something?


NOTE: I know I can install Foliate from flatpak and that is recommended way, but above I am just using Foliate as an example, I could use something else for sample.

I now did several tests:

  1. rpm-ostree install foliate and rebootand Foliate icon appears.

  2. Remove rpm-ostree foliate package and reboot. Install Foliate as flapak:
    flatpak install com.github.johnfactotum.Foliate and icon Foliate appears.

  3. Remove Foliate flapak and install using distrobox-create:

    distrobox create --name ubuntu --image quay.io/toolbx/ubuntu-toolbox:24.04
    distrobox enter --name ubuntu
    sudo apt -y install foliate
    distrobox-export --app foliate
    

    and Foliate icon appears.

It looks like some issue related to using distrobox-assamble only (previous thread instructions) that Foliate icon does not appear.

Now I have found an “ugly” solution.

  1. I installed Foliate using “distrobox create” logic (from second forum’s post) and from .desktop file copied the syntax for “Icon” row text.
  2. I have remove container build with step 1.
  3. I have installed Foliate using “distrobox-assemble” (from first forum’s post) and there is Ubuntu icon like in post one of this thread. Still an issue as expected.
  4. Now the “ugly” fix replace Icon row from “distrobox create” string to “distrobox-assamble” .desktop file:
    sed -i 's:Icon=/var/home/user1/.local/share/icons/ubuntu.png:Icon=com.github.johnfactotum.Foliate:' $HOME/.local/share/applications/foliate-com.github.johnfactotum.Foliate.desktop

and problem is fixed.

I assume there must be some more elegant way of getting correct Icon line definition and so correct icon displayed. Any other idea?