Score:2

How to open an image with a flatpak image viewer application using terminal commands?

mx flag

I'm using Ubuntu 21.10 and uninstalled the GNOME's default image viewer (eog). I installed the gThumb image viewer flatpak app instead.

What i want to achieve - What terminal commands should i use to open a particular image present in my pwd with the gThumb flatpak app?

What i tried - I found out that i could run the gThumb app using flatpak run org.gnome.gThumb but how do i append the image-file name in this command? I tried to pipe it with xargs but it didn't work.

I could open an image using eog <image name> earlier, how do i achieve something similar with the gThumb flatpak app?

Score:1
zw flag

You are trying to overcome unneeded problems. It is probably possible as with LibreOffice case with command like

flatpak run org.gnome.gThumb image-photo.png

But to keep it simpler - remove flatpak 3.12.0 version and install deb 3.11.2 version instead by using commands below

flatpak remove org.gnome.gThumb
sudo apt-get install gthumb
skekmal avatar
mx flag
Tried it. Running `flatpak run org.gnome.gThumb <image.jpg>` didn't open the image file. It launches the gThumb app though.
Score:0
cn flag

Flatpaks in general are run with a command

flatpak run <Application ID> <Arguments|Options>

You can see the Application ID in the output of

flatpak list --app

(the option --app will restrict the output to apps only, and not include runtimes)

So you can open a graphic file in eog with a command like:

flatpak run org.gnome.gThumb /path/to/graphic/file.png

For installed applications, wrapper scripts are provided in /var/lib/flatpak/exports/bin. This directory is not by default included in your PATH, but you could include it by appending a line

PATH="$PATH:/var/lib/flatpak/exports/bin"

to your ~/.profile. Then, you could run the flatpak of eog with the command

org.gnome.gThumb /path/to/graphic/file.png
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.