Right click files to meld

Here's a slightly different approach that works great for me. (I'm using Nemo on Ubuntu 13.10).

  1. Select two or more text files (any extension. Say foo.php , bar.py, abc.txt)
  2. Right click on them. Goto properties.
  3. Under the "Open With" tab. Select "Show other Applications".
  4. Select Meld from the list and Add. (Don't make it the default application)
  5. Close the dialog box.

From now on, whenever you need to compare 2 or more files, select the files, right click on them, and select 'meld' listed under "Open With". Meld will open with the diff.

I dig this setup. Keeps the Right click context menu cleaner and also gets meld working from inside Nemo, without installing anything new.

Caveat: Doesn't work for folders. However, comparing folders is anyway a rarely used action. I'm happy to use the Terminal for doing that. i.e. by doing this from the shell prompt: meld folder1 folder2

P.S. -- This trick is also great for setting the default applications to be used for opening different types of files.


Install Nautilus actions.

sudo apt-get install nautilus-actions

System > Nautilus Actions

Define new action:

Label: Meld..
Icon: /usr/share/pixmaps/meld.png
Path: /usr/bin/meld
Parameters: %M
Conditions : check “Appears if selection contains”    

Then restart nautilus

nautilus -q

Here is an updated version of @darthvader's answer for Ubuntu 13.10 with screenshots:

Install Nautilus Actions and open the application.

Under the Action tab, use the icon path: /usr/share/app-install/icons/meld.svg

enter image description here

Under command, use meld with %F

enter image description here

And under the environment tab, set the Count to be strictly greater than 1.

enter image description here

Tags:

Ubuntu

Meld