Creating a custom context menuitem for FreeFileSync not working in Linux. How to get it working?

Get help for specific problems
Posts: 29
Joined: 17 Nov 2022

FreeFileLove

I want to add a `Compare` context menu to FreeFileSync in Linux Mint.

To do this, I read:
https://freefilesync.org/manual.php?topic=external-applications

In the "Customize context menu" section of the "Options" dialog box of FreeFileSync 13.5, I then created the following custom context menu:
kompare -c "%local_path%" "%local_path2%"
However, when I try to use this command from within FreeFileSync, FreeFileSync always issues the error message:
/bin/sh: line 1: kompare: command not found
If I manually run the command in the Linux terminal (replacing the variables/macros appropriately), it works correctly.

I tried using other commands, but FreeFileSync issues the same error message. I also tried specifying the full path to the command's executable, but the error persisted.

In Linux Mint (which is based on Ubuntu & Debian), how does one successfully create a custom context menuitem in FreeFileSync?
Posts: 948
Joined: 8 May 2006

therube

Without knowing Linux or specifics thereof, see if perusing these gets you going?
And I'll assume that your "terminal" is using a shell other then sh?
Likewise, if you ran sh, then (at this point in time) typed in, kompare, you would get the very same "command not found".

https://askubuntu.com/questions/322772/how-do-i-add-an-executable-to-my-search-path
https://askubuntu.com/questions/1331401/how-to-run-an-executable-from-any-directory-in-terminal-by-setting-path
https://forums.linuxmint.com/viewtopic.php?t=310784
https://phoenixnap.com/kb/linux-add-to-path
User avatar
Site Admin
Posts: 7061
Joined: 9 Dec 2007

Zenju

I wasn't able to test on Mint, but FWIW your command line does work on Kubuntu.
Posts: 29
Joined: 17 Nov 2022

FreeFileLove

Without knowing Linux or specifics thereof, see if perusing these gets you going?
And I'll assume that your "terminal" is using a shell other then sh?
Likewise, if you ran sh, then (at this point in time) typed in, kompare, you would get the very same "command not found".

https://askubuntu.com/questions/322772/how-do-i-add-an-executable-to-my-search-path
https://askubuntu.com/questions/1331401/how-to-run-an-executable-from-any-directory-in-terminal-by-setting-path
https://forums.linuxmint.com/viewtopic.php?t=310784
https://phoenixnap.com/kb/linux-add-to-path therube, 08 May 2024, 15:01
Thank you for the links. Yes,
kompare
is definitely in the path, so I'm not sure why it's not working within FreeFileSync. And, of course, the issue isn't limited to Kompare.

If I run `sh` from a bash terminal, and then run
kompare
it works correctly. But FreeFileSync can't find it for some odd reason.
Posts: 29
Joined: 17 Nov 2022

FreeFileLove

I wasn't able to test on Mint, but FWIW your command line does work on Kubuntu. Zenju, 08 May 2024, 17:20
Thanks for checking on Kubuntu. Did you need to use any quotation marks different than in the string I used?

Linux Mint uses bash for the shell. What does Kubuntu use? If it's different, could FreeFileSync somehow have an incompatibility with bash?
User avatar
Site Admin
Posts: 7061
Joined: 9 Dec 2007

Zenju

In my test, Kubuntu was using dash.
Yes,
kompare
is definitely in the path, so I'm not sure why it's not working within FreeFileSync. FreeFileLove, 09 May 2024, 04:39
This might or might not be true. But it can be tested as follows:

Add a new context menu option in FreeFileSync, give it some name e.g. "env" and the following command line:
env; exit 1

Or even more succinct:
echo $PATH; exit 1
Posts: 29
Joined: 17 Nov 2022

FreeFileLove

In my test, Kubuntu was using dash... Zenju, 09 May 2024, 08:45
Thanks. I'm 99% sure I figured out what's happening and why. I'm using the flatpak packaging of FreeFileSync. This automatically sandboxes FreeFileSync from /usr/bin, which is where kompare is located. I just noticed the workaround on that page, and will try it.
Posts: 29
Joined: 17 Nov 2022

FreeFileLove

Okay, that was it.

May I recommend adding the helpful tip from https://flathub.org/apps/org.freefilesync.FreeFileSync to your FAQ?

Thank you again for your help.
User avatar
Posts: 2303
Joined: 22 Aug 2012

Plerry

> May I recommend ...

You are allowed to recommend anything you like.
But it is not realistic to assume Zenju will add FAQ items in support of unofficial distributions of his software, that are possibly even in conflict with the distribution conditions.
Posts: 29
Joined: 17 Nov 2022

FreeFileLove

> May I recommend ...

You are allowed to recommend anything you like.
But it is not realistic to assume Zenju will add FAQ items in support of unofficial distributions of his software, that are possibly even in conflict with the distribution conditions. Plerry, 09 May 2024, 18:04
Clearly it's also not realistic for someone to post a simple thoughtful question without you falsely claiming that they made an assumption about what someone will or will not choose to do. I asked a simple question and made no assumption, despite your false claim to the contrary. You misrepresented what I wrote, and I ask you, kindly and directly, to never engage in such untoward conduct in the future.
User avatar
Posts: 2303
Joined: 22 Aug 2012

Plerry

I only wrote "it is not realistic to assume ...".
Nowhere do I write that YOU assume anything, despite your false claim to the contrary.
So, I did not misrepresent what you wrote and I ask you, kindly and directly, to never engage in such untoward conduct in the future.

Despite that, I wonder why someone recommends to add something to the FAQ if that person does not hope/expect/assume that it will be added ...