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.
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.
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.
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.