Ssh -X remote; flatpak run org.gimp.GIMP

Ubuntu 18.04 LTR
GIMP 2.10, installed w/flatpak on both local and remote

local% flatpak run org.gimp.GIMP // works

local% ssh -X remote
remote% flatpak run org.gimp.GIMP // console shows running but no display

Are flatpak apps compatible with this approach (running them over the network with X-forwarding)?
If so, is there something I as a user need to configure?
If not, is it something the packager needs to do at packaging time?

I was disappointed to find out that Ubuntu offers only GIMP 2.8 from its apt store, then excited to learn 2.10 could be had from flatpak, then disappointed again to find it can’t be run in my accustomed way. (The more powerful server does not have a “seat” in front of it.)

Thank you.

I did try using the --env argument:

remote% flatpak --env=DISPLAY=local:0.0 run org.gimp.GIMP

which didn’t work, but ssh -X documentation already warned that explicitly setting DISPLAY will break its X-forwarding and must be left to ssh.

Indeed:
remote% env|grep DISPLAY
shew it set to localhost:10.0 (i.e., the 10th localhost display on remote) so ssh had anticipated the need to set it.

Directly from the FAQ:

[quote]### Can Flatpak be used on servers too?

Flatpak is designed to run inside a desktop session and relies on
certain session services, such as a D-Bus session bus and, optionally, a
systemd --user instance. **This makes Flatpak not a good match for a **
server.

However, the build features of Flatpak run fine outside a session, so
you can build things on a server.[/quote]

Well. That’s clear enough.[1] Love the idea. Need the server. Checking back later.

Looking forward to it.

Thank you.

[1] Clearer than figuring out how to format it in the post…