Ubuntu: Diff tool with file browser integration

Having installed a new Ubuntu VM (for testing purposes) I was looking for visual diff tool with nice UI integration.
Windows users: think of WinMerge being launched by selecting two files in Explorer and compare them from the context menu.

This is what I came up with:
Install Meld – a visual diff tool:

sudo apt-get install meld

To be able to launch Meld from the file browsers context menu install “Nautilus Actions” (Nautilus is the name of the Ubuntu file browser). Nautilus Actions is an extension to add custom entries to the context menu.
To install it type:

sudo apt-get install nautilus-actions

Launch it from System -> Settings -> Nautilus Actions
and add a new action with these settings:

  1. Label: Compare
  2. Icon: /usr/share/pixmaps/meld.png
  3. Path: /usr/bin/meld
  4. Parameters: %M
  5. Conditions tab: Group “Appears if selection contains” select “Both”
  6. check “Appears if selection has multiple files or folders”

Restart the file browser:

nautilus -q

Then you can select two files, right click, and select “Compare” and Meld will show you the differences between the selected files.

Advertisements
This entry was posted in Misc and tagged , , . Bookmark the permalink.

3 Responses to Ubuntu: Diff tool with file browser integration

  1. opticyclic says:

    Just what I was looking for!

    Is there anyway to script this?
    I like to have a series of scripts that I run when I install a new distro that quickly customises it for me.

  2. Manué says:

    Great! but…

    – Unbuntu does not have “System -> Settings -> Nautilus Actions”, at least in my computer. It has “Preferences -> Nautilus Actions Configuration” instead.

    – If you do not check “Appears if selection has multiple files or folders”, Meld will apply also to single folders having CVS, which comes really handy.

    Best regards.

  3. Roey Sagie says:

    Very useful.
    Can you give an example of how do the compare 2 files not in the same folder?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s