mihnea-radulescu / imagefanreloaded

ImageFan Reloaded is a cross-platform, light-weight, tab-based image viewer, supporting multi-core processing.
https://flathub.org/apps/io.github.mihnea_radulescu.imagefanreloaded
GNU General Public License v3.0
43 stars 2 forks source link

XOpenDisplay failed error with Flatpak #4

Closed andersrh closed 4 months ago

andersrh commented 4 months ago

I have tried to install the Flatpak, which is available on Flathub, but I get the following error, when I'm running the application:

flatpak run io.github.mihnea_radulescu.imagefanreloaded Unhandled exception. System.Exception: XOpenDisplay failed at Avalonia.X11.AvaloniaX11Platform.Initialize(X11PlatformOptions) at Avalonia.AppBuilder.SetupUnsafe() at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder, String[], Action``1 ) at ImageFanReloaded.Program.Main(String[]) in /home/mihnea/Repositories/ImageFanReloaded/ImageFanReloaded/Program.cs:line 10

I'm running Fedora 39 (Kinoite) with KDE Plasma 5.27.11 on Wayland.

mihnea-radulescu commented 4 months ago

Hi @andersrh,

Thank you for raising this issue!

Could you please check if the default (non-flatpak) version of the application produces the same error on your system: https://github.com/mihnea-radulescu/imagefanreloaded/releases/tag/1.2024.05.05?

andersrh commented 4 months ago

Hi @mihnea-radulescu

Yes it works, when I run it on my system as non-flatpak (tested in a Fedora 39 container with access to the host's Wayland and XWayland).

andersrh commented 4 months ago

Hi again @mihnea-radulescu

I saw that an update just came out for the application on Flathub. After installing the update I can now open the application.

andersrh commented 4 months ago

but I think that the application doesn't work that well on a 4K display with scaling enabled. It seems like it doesn't apply the scaling set in KDE's settings.

In the screenshot below, you can see how it looks like:

Screenshot_20240510_081319

mihnea-radulescu commented 4 months ago

Hi @andersrh,

Thank you for the update!

I have published a revised version of the application on:

Please let me know if the Flatpak version of the app can now properly execute on your system.

Regarding the scaling, as the application is based on .NET 8 and the Avalonia UI framework, it is mostly agnostic of the desktop environment settings, beyond getting the dark vs light theme setting. I will create an issue on the Avalonia UI GitHub, maybe there are future plans for better integration with the DE.

andersrh commented 4 months ago

Hi. It worked with the new version. closing this issue. thanks a lot for the quick update :-)