Qubes-core-agent-thunar integration broken

Hi, in some of my VMs, integration between Qubes and Thunar doesn’t work. What I mean by that is, while right clicking on the files in Thunar there are no Qubes specific options anymore - copy to VM, move to VM etc. The packages version between these working and broken templates are the same:

libqubesdb                           4.1.16-1+deb11u1
libqubes-rpc-filecopy2               4.1.19+deb11u1  
pulseaudio-qubes                     4.1.27-1+deb11u1
python3-qubesdb                      4.1.16-1+deb11u1
python3-qubesimgconverter            4.1.19+deb11u1  
qubes-core-agent                     4.1.40-1+deb11u1
qubes-core-agent-networking          4.1.40-1+deb11u1
qubes-core-agent-passwordless-root   4.1.40-1+deb11u1
qubes-core-agent-thunar              4.1.40-1+deb11u1
qubes-core-qrexec                    4.1.20-1+deb11u1
qubesdb                              4.1.16-1+deb11u1
qubesdb-vm                           4.1.16-1+deb11u1
qubes-gui-agent                      4.1.27-1+deb11u1
qubes-img-converter                  1.2.15-1+deb11u1
qubes-utils                          4.1.19+deb11u1  
qubes-vm-dependencies                4.1.20-1+deb11u1
xserver-xorg-input-qubes             4.1.27-1+deb11u1
xserver-xorg-qubes-common            4.1.27-1+deb11u1
xserver-xorg-video-dummyqbs          4.1.27-1+deb11u1

Any ideas what is going on, how to debug, and how to fix?

You have this problem with VMs that have some specific template? Or even with the same template some AppVMs are working fine and some AppVMs have this problem?

Have you tried reinstalling related packages? What’s your template derived from?

Thanks for reply. Good question, I just tested that and it turned out that with the same template some VMs have broken integration and some don’t.

I haven’t try reinstalling, yet. It’s debian-11. It looks like in some VMs it works fine and it’s broken in others

Check logs for errors with journalctl in terminal for AppVM with this problem.

Can you confirm that you shut down these qube, changed the template, and
then started them up again?

Is there anything common to these qubes? Did you (e.g.) customise the
look of thunar in them, but not in others?

I never presume to speak for the Qubes team. When I comment in the Forum or in the mailing lists I speak for myself.

Just checked, on regular user and with sudo. Nothing unusual there.

I changed the template, restarted, the same problem persists.

The problematic ones, are the ones that I created most recently. VM from scratch, they share the same template though.
The configuration is the same for all of them. Just copied few files to change the theme to dark to ~/.config/.

I have one more which use different template, it’s disp template. Both the app disp template and generated disps have the same issues.

I just checked ~/.cache, ~/.config, ~/.local for any hints but nothing unique there.

In /var/log/messages I found this, maybe related:

qubes.StartApp+qubes-open-file-manager-dom0: Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

but TBH VM that works also have it.