4

This answer for installing nautilus-compare on 20.04 didn't work for 22.04 because it has no release file for jammy.

But it seemed to work if I pointed it to the focal package instead:

sudo add-apt-repository ppa:boamaod/nautilus-compare
sudo sed -i 's/jammy/focal/g' /etc/apt/sources.list.d/boamaod-ubuntu-nautilus-compare-jammy.list
sudo apt-get install nautilus-compare

Is this the best way to install nautilus-compare on Ubuntu 22.04?

Mic
  • 244

3 Answers3

4

Here is how I installed nautilus-compare on 22.04:

Install direct from source is possible by doing the following:

Install the nautilus python3 bindings

sudo apt-get install python3-nautilus

Download the latest source

wget https://launchpad.net/~boamaod/+archive/ubuntu/nautilus-compare/+sourcefiles/nautilus-compare/1.0.0~focal1/nautilus-compare_1.0.0~focal1.tar.xz

tar -xvf nautilus-compare_1.0.0~focal1.tar.xz

Install the source files

cd nautilus-compare-1.0.0/src
sudo cp nautilus-compare.py /usr/share/nautilus-python/extensions/

sudo mkdir /usr/share/nautilus-compare sudo cp utils.py /usr/share/nautilus-compare sudo cp nautilus-compare-preferences.py /usr/share/nautilus-compare

Install any missing python3 modules

At this point, if the python source uses any modules you don't have installed, then you will need to install them too, for example using pip. I already had all the modules so didn't need to.

Then restart nautilus and the compare menu should now appear.

nautilus -q && nautilus &
Mic
  • 244
3

Reach Out to the Developer

The best way is to request the developers to provide a version pf the software for Ubuntu 22.04.

However, sometimes this is not possible, such as when the developer has stopped working on or abandoned the software.

Try to compile from the Source

If you know how, you may compile the source in your Ubuntu 22.04. This will make sure that all the dependencies are met.

Use the "Focal" PPA

This is the worst choice. How bad things can get will depend on what other software are in that PPA and the dependencies of those and the the installed software. This kind of mixing and matching can result into unresolvable dependency problems. Installing apps from another version or another distro can break your installation of the OS. In the worst case scenario your Ubuntu 22.04 can become completely unbootable.

There may be a technical reason why this software is not available for Ubuntu 22.04. If so there may be unpredictable issues now or later when you install some other software in your Ubuntu 22.04.

Hope this helps

user68186
  • 37,461
2

For 22.04, I downloaded https://launchpadlibrarian.net/471415152/nautilus-compare_1.0.0~focal1_all.deb and it works as expected.

It is only a couple of python files with very generic dependencies:

$ apt show ./nautilus-compare_1.0.0~focal1_all.deb
...
Installed-Size: 97,3 kB
Depends: nautilus, python3-nautilus, python3-xdg
Recommends: meld (>= 3.12.1)
Suggests: kdiff3 | kdiff3-qt, diffuse, kompare, fldiff, tkdiff, xxdiff
...

With this modest set of dependencies, I don't think this will cause any system problems, neither in 22.04, nor in any later release of Ubuntu.

It will, however, eventually stop working due to lack backward compatibility of both Python and GNOME. From nukkio's comment and this answer, it seems that, for later versions of GNOME (43+), you would need to change a few lines in nautilus-compare.py.