How can I use (activate) MELD in kate for a file compare?

Hello,

I’m wondering how can I use meld for a file compare of two open document in Kate?
I’m running Kate v25.04.0 (flatpak) on Linux Mint v 21.3.

  • Meld is installed on the system but it’s not registered as tool in Kate.
  • When selecting (right-click) a ‘non-active’ tab in the editor it shows two entries a) compare with active document and b) compare with active document Using .
    However, both options are greyed out (inactive).

How can I fix the problem?
Thanks for any suggestion.

flatpak version has difficulty with file access, so my guess would be a permissions thing.

have you gone into flatseal and lit up all the toggles for kate?

if that doesn’t work, then you will have to install the native .deb version if you can.

1 Like

The primary method for installing Kate in Linux Mint would be to use apt (or, for the enlightened, NALA).

sudo nala install kate

Then remove the flatpak.

Yes flatseal is granting Kate already access to the filesystem filesystem=host.
I think that can’t be teh reason.
Why are the actions greyed out (see my 1st post)?

And the version from the Mint repository is missing some (for me) important features and it’s therefore not an options.

the only other option is to try the appimage

you will need to make this executable to run it.

another thought occurs to me, you are not using a flatpak of meld, are you?

1 Like

Nope, meld is installed from the Mint repo.
I will pause this topic for a few days.
Cheers

I don’t know that it will help much, but if I understand correctly looking at what I think is the relevant code for Kate, it looks like it tries to find the tools in the PATH and if it doesn’t find them, the actions get disabled:

QList<std::pair<QString, QString>> KateFileActions::supportedDiffTools()
{
    // query once if the tools are there in the path and store that
    // we will disable the actions for the tools not found
    static QList<std::pair<QString, QString>> resultList{{QStringLiteral("kdiff3"), safeExecutableName(QStringLiteral("kdiff3"))},
                                                         {QStringLiteral("kompare"), safeExecutableName(QStringLiteral("kompare"))},
                                                         {QStringLiteral("meld"), safeExecutableName(QStringLiteral("meld"))}};
    return resultList;
}

Having said that, I’ve tried the Kate flatpak from Flathub and it doesn’t seem to disable any of the entries normally for me, and simply throws the error “The selected program could not be started. Maybe it is not installed.”. I even tried creating a shell script, naming the file meld, that runs flatpak-spawn --host meld $@, making it executable and overriding the flatpak path to point to the folder the script was in, but it didn’t help.

The only time the options showed as disabled was when I was trying to compare a currently empty/unsaved file against an existing saved file.

2 Likes

oh, this is a good point… both files must be saved for any of the compare features to work because they are comparing FILES, not what is saved in a buffer somewhere.