How to configure "Open with..." for flatpak app?

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
lphilpot
Posts: 89
Joined: Wed Oct 05, 2016 2:49 am

How to configure "Open with..." for flatpak app?

Post by lphilpot »

XnView MP Linux
Version 0.98.4 64bits (May 31 2021)
Libformat version 7.81
Xubuntu 18.04

When I was using GIMP installed from a PPA, the binary was just '/usr/bin/gimp' (in my $PATH) so that worked as the command line to open an image in GIMP. Now that I'm using a flatpak-ed GIMP, I can't get the syntax right to open an image with the GIMP flatpak. The full (working) command line from the system launcher is:

Code: Select all

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=gimp-2.10 --file-forwarding org.gimp.GIMP @@u %U @@
I've tried putting 'flatpak' as the command and the rest (run...) as the parameter, I've tried putting the entire command line as the parameter, etc. But it never launches.

So, what's the correct way to configure this? Also, if the first parameter is indeed 'flatpak', that makes it look (in XnView) like I'm opening the image in flatpak. Is there a way to make "GIMP" the display (only) name?

Is there an XnView app log somewhere?

Thanks.
Len Philpot
User avatar
lphilpot
Posts: 89
Joined: Wed Oct 05, 2016 2:49 am

Re: How to configure "Open with..." for flatpak app?

Post by lphilpot »

Is this not currently possible?

Thanks.
Len Philpot
User avatar
RayCulp
Posts: 3
Joined: Thu Jun 05, 2025 1:57 pm

Re: How to configure "Open with..." for flatpak app?

Post by RayCulp »

This question is old, but it hasn’t been answered yet, so here is a workaround that works for me.

Create a bash script with the following command:

Code: Select all

#!/bin/bash
flatpak run org.gimp.GIMP "$1"
In XnView, configure a new "Open with" program that points to this script. The path to the script is sufficient. No additional arguments need to be provided.

I hope this helps.

Code: Select all

If Program.IsBroken Then
   Program.Debug
Else
   Program.DoNotTouch
EndIf
User avatar
lphilpot
Posts: 89
Joined: Wed Oct 05, 2016 2:49 am

Re: How to configure "Open with..." for flatpak app?

Post by lphilpot »

Thanks for the update. However, the following year (2022) I bought a new laptop with Windows installed and that's what I've been running since. And my patience with GIMP finally ran out so I've switched to Affinity Photo, so ...

But again. thanks.

:D
Len Philpot
Post Reply