Integration help with flatpack apps

I’m new to the atomic image world, and haven’t used fedora for so long it might as well be never. After installing a flatpack app it’s not available in terminal. What’s the standard way of fixing that?

For instance: meld launches fine from app menu but not terminal:

❯ flatpak list |grep meld
    61:	Meld	org.gnome.meld	3.22.2	stable	x86_64	flathub	system

~ 
❯ meld
bash: meld: command not found

~ 
❯ locate meld
/sysroot/ostree/deploy/default/deploy/07aa527aa39c75c39203ae00e828242526f9d34869539d95d1e81916337b2a7a.0/usr/libexec/git-core/mergetools/meld
/usr/libexec/git-core/mergetools/meld
/var/home/matt/.cache/gnome-software/icons/12627a6340d33c1a6429c784f962c796be69647e-org.gnome.meld.desktop.png
/var/home/matt/.cache/gnome-software/icons/353ba98565e2321f1b351c5ff78ad4e15c7aaf79-org.gnome.meld.desktop.png

~ 
❯ usr/libexec/git-core/mergetools/meld
bash: usr/libexec/git-core/mergetools/meld: No such file or directory

What is the actual command to run meld? What is the idiomatic way of figuring this out?

flatpak run org.gnome.meld

thank you!

Is there a standard method for “enable cmd line for my flatpack apps”? I mean I know that armed with the above I can add alias meld='flatpack run org.gnome.meld' to .bashrc, but is that an expected app-by-app user task or is there a general solution/setting I just haven’t run across yet?

Unfortunately not. The best you can do is add /var/lib/flatpak/exports/bin to your $PATH so that you can instead just type org.gnome.meld into terminal.

For the apps I want easily typable into terminal, I have function in my system setup script that goes flatpak_run_wrapper "io.neovim.nvim" "nvim" that will create the following file called nvim in ~/.local/share/bin the following contents.

#!/usr/bin/env sh
flatpak run io.neovim.nvim $@

2 Likes

Any reason launching flatpaks from terminal?

  1. Press Windows key.
  2. Type in e.g. meld
  3. Right mouse click
  4. Select Pin to Dock.

By the way, be careful if typing, because official name is flatpak, not flatpack.

Good catch on the spelling.
I need terminal because the goal is to use with git, which I discovered needs path to executable and won’t work with an alias.

I created a bin script like @that_leaflet showed, buuutt unfortunately that doesn’t work because of something to do with temp files. That’s not part of this thread though.

That’s strange. You can also try going to /var/lib/flatpak/exports/bin and copy the contents of those files into your ~/.local/bin.

I found a solution: Using flatpak version of Meld as an external git diff tool fails · Issue #1423 · flatpak/flatpak · GitHub. Messy looking but works. Meld needs to be told not to use /tmp with --filesystem flag. Hat tip to tulip in universal-blue discord channel for pointing it out.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.