LibreOffice flatpak fails to launch in Kinoite after upgrade to 44

Though everything else seems fine, LibreOffice flatpak launch fails after upgrading Kinoite to version 44. From the command line rather than Plasma launcher, this error is thrown:
Failed to open display
/app/libreoffice/program/soffice.bin X11 error: Can’t open display:
Set DISPLAY environment variable, use -display option
or check permissions of your X-Server
(See “man X” resp. “man xhost” for details)

The fix seems to be adjustment of the launch command. Failed, original command was:

flatpak run --branch=stable --arch=x86_64 --command=libreoffice --file-forwarding org.libreoffice.LibreOffice --calc @@u %U @@

Adding --display :0 led to the new error message:

{home directory path}/%U does not exist.

Removing the @@ %U @@ resolved that, and function is now restored.

This research and manual intervention should not be required, of course. One can blame flathub/flatpak, I suppose, but as this occurred with a mainstream application after a Fedora upgrade, I felt it made sense to post about it here.

By the way, my declaration of success was premature. The revised command line is unreliable and may only work after a fresh reboot.

At times since my “fix”, launching produces only the LibreOffice splash screen, and the Plasma taskbar shows an unexpected X11 icon. I wonder if further messing with the command line with --socket=wayland or --nosocket=x11 would be relevant. Most likely, there’s some other problem that, if resolved, would eliminate the need to mess with the command line produced by flatpak installation.

I can run LibreOffice as a snap until this gets figured out.

Here on my Kinoite 44 and also on Kinoite 45 it just works OotB when I start it using the item in the KDE Plasma launcher. No changes needed in the startup line, which is: /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=libreoffice --file-forwarding org.libreoffice.LibreOffice --calc @@u %U @@

Using your way of starting it from a terminal however does not start and I get this error:

Failed to open display
/var/home/jan/%U does not exist

At the moment I use:

But why do you want to start a GUI program from a terminal when it comes with entries in the Plasma launcher, which you can also pin to your panel?
Okay, it should work, I agree to that, but it seems so useless to first open a terminal, write or copy/paste the line and press enter to make the program start.

The only reason I ever launch GUI apps from a terminal is debugging: to try to find out why I could not launch from the Plasma Application Launcher. There may be something quirky about my Kinoite setup that causes this problem. Or maybe the upgrade process has a glitch?

I started with Kinoite 43, and all was fine. The problem occurred when I upgraded to 44. Launching from the command line revealed error messages that helped guide me to the workaround of adding --display :0.

I wonder if your Kinoite 44 was an upgrade from 43, or was a fresh install. The problem does not occur in a fresh VM install.

The part about the %U in the tail end of the command line was a distraction caused by testing from the command line – it works fine from the Launcher. But for unknown reasons, I still need --display :0.

I did not think about that: starting a program in terminal for debugging. That is the way to get info about what is happening.

I never do upgrades, I like to install the new version to get a working distro. I have had bad experiences with upgrades, not with Fedora but with another distro, so I avoid them.

But I have a different way of doing things than most people (I guess) :slight_smile:
I use manual partitioning with an EFI, a BOOT, a ROOT and a HOME partition. The first three are formatted in the installer to create new empty ones without leftovers from the previous distro, the HOME partition is kept alive. This means I still have all my data, including the flatpaks data, plus I install the flatpaks with the option --user which lets me keep all the programs as well since they are installed in my HOME partition. All KDE settings are there as well.
I install the base, I connect my Nas, I create a container and in there I install programs like htop and inxi, plus I found a nice script to install mscorefonts. That’s it.
I have a new distro without the problems you might get when doing an upgrade. I deliberately waited a while to do this after I saw the problems others had with doing the upgrade here in the forum.
This all means I am ready way within an hour and it just works.

I do wonder, since Kinoite is an atomic distro, if there is a better way of doing this by using the rebase command, or that it makes no difference with a clean install.

Major upgrades (also called rebase) work like normal updates on Kinoite so you would not have to re-install.

For what it’s worth: my workaround (adding --display :0 to the Plasma launcher command line) is durable. I tried to launch without it after a Kinoite update, but it still failed. After a failed launch, I must reboot to regain the ability to launch with the workaround.

Unless I can find and fix the problem, it seems I’ll be stuck with my workaround until a completely fresh Kinoite install, which would be a substantial task :frowning_face_with_open_mouth:. So far, no one here or at flathub has offered any hints or suggestions.