This Nautilus extension allows us to easily compare files and directories using the Meld comparison tool directly from the Nautilus context menu. The extension adds new menu items that let us set a "left" file or directory for comparison and then compare a "right" file or directory against it.
- Set a file or directory as the "left" item for comparison.
- Compare another file or directory as the "right" item against the previously set "left" item.
- Directly compare two selected files or directories.
- Ubuntu (or any GNOME-based Linux distribution)
- Nautilus File Manager
- Python 3.x
- Meld
- Nautilus Python bindings (Install with
apt install python3-nautilus
) - For newer Ubuntu releases (e.g., 23.10): Modify the signature of
get_file_items
fromget_file_items(self, window, files)
toget_file_items(self, files)
for compatibility. Reference
- Download the
nautilus-meld-compare-extension.deb
package. - Install the package:
sudo dpkg -i nautilus-meld-compare-extension.deb
- You may need to resolve dependencies:
sudo apt-get -f install
- Restart Nautilus to apply the changes:
(Alternatively, you can restart Nautilus manually at your convenience.)
nautilus -q && nautilus --no-desktop
- Right-click on a file or directory and choose "Set as Left File to Compare" or "Set as Left Directory to Compare."
- Right-click on another file or directory to see an option to compare it to the previously set "left" item.
- Right-click on two files or two directories to compare both.