LibreOffice flatpak launch command needs improvement
I don’t think your issue is related to the command line. --file-forwarding allows file/URI arguments to be forwarded to the app via the document portal. With the LibreOffice flatpak’s broad file access (--filesystem=host), it isn’t needed, but this is a builtin feature that can’t be turned off, and it doesn’t do any harm anyway.
As per the Desktop Entry spec, the %U specifier must be removed by the launcher if the app is launched without any URIs, so the actual resulting command line would look like this:
flatpak run --branch=stable --arch=x86_64 --command=libreoffice --file-forwarding org.libreoffice.LibreOffice --calc @@u @@
With --file-forwarding, flatpak consumes the @@u and @@, and forwards any URIs between them (none in this case). Inside the sandbox, the LibreOffice binary would only receive --calc.
As a result, flatpak run org.libreoffice.LibreOffice --calc would be practically equivalent to launching LibreOffice Calc from your desktop shell.
Are you using a Wayland or X11 session? It shouldn’t be trying to use X11 if you’re on Wayland, and by default would be unable to do so.
Discussion in the ATmosphere