Page 1 of 1

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

Posted: Mon Aug 02, 2021 8:57 pm
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.

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

Posted: Fri Aug 13, 2021 4:46 pm
by lphilpot
Is this not currently possible?

Thanks.

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

Posted: Thu Jun 05, 2025 2:22 pm
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.

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

Posted: Thu Jun 05, 2025 7:50 pm
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