Right click files to meld












7















I have installed meld in Ubuntu 10.10. Is there any way I can get something like "Select left to compare" and "Compare with" context menu for files that is there in Beyond Compare.










share|improve this question













migrated from stackoverflow.com Jul 8 '11 at 0:34


This question came from our site for professional and enthusiast programmers.




















    7















    I have installed meld in Ubuntu 10.10. Is there any way I can get something like "Select left to compare" and "Compare with" context menu for files that is there in Beyond Compare.










    share|improve this question













    migrated from stackoverflow.com Jul 8 '11 at 0:34


    This question came from our site for professional and enthusiast programmers.


















      7












      7








      7








      I have installed meld in Ubuntu 10.10. Is there any way I can get something like "Select left to compare" and "Compare with" context menu for files that is there in Beyond Compare.










      share|improve this question














      I have installed meld in Ubuntu 10.10. Is there any way I can get something like "Select left to compare" and "Compare with" context menu for files that is there in Beyond Compare.







      ubuntu meld






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 21 '11 at 5:07









      NemoNemo

      13613




      13613




      migrated from stackoverflow.com Jul 8 '11 at 0:34


      This question came from our site for professional and enthusiast programmers.






      migrated from stackoverflow.com Jul 8 '11 at 0:34


      This question came from our site for professional and enthusiast programmers.
























          6 Answers
          6






          active

          oldest

          votes


















          5














          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





          share|improve this answer





















          • 2





            b0rked in 11.04. now use: /usr/share/app-install/icons/meld.png for the icon and %F for the parameters.

            – wim
            May 26 '11 at 3:59











          • You should just type meld for the icon, otherwise it won't use the themed icon.

            – Drew Chapin
            yesterday



















          6














          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.






          share|improve this answer



















          • 1





            This is a slightly better answer than the accepted one, as it's more version independent.

            – John T
            Oct 4 '14 at 12:15






          • 1





            With Ubuntu 18.04.1 LTS, I could directory(folder) comparison using this method(skip step 2)

            – itsoft3g
            Nov 28 '18 at 6:21



















          2














          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






          share|improve this answer































            1














            If you use Thunar file manager, then:



            Works comparing files and also comparing directories.
            I have spanish version, sorry :)



            1) Open Edit > Configure custom actions:



            enter image description here



            2) Click on Add icon (the green plus one)



            enter image description here



            3) Fill the form...



            enter image description here



            enter image description here



            4) Accept and check the result...



            enter image description here



            5) Finish!



            enter image description here






            share|improve this answer































              1














              What I like to do is:




              1. add two thunar custom actions "meld left" and "meld right" which call "your_util_path/set_left.sh %F" and "your_util_path/compare_to_left.sh %F", respectively. Then,



              2. set_left.sh contains:



                echo $1 > your_util_path/MELD_LEFT_FILE




              and





              1. compare_to_left.sh contains:



                echo $1 > your_util_path/MELD_RIGHT_FILE



                meld $(head -n1 your_util_path/MELD_LEFT_FILE) $1




              I use this because often the two paths you want to compare are in different tabs or windows.






              share|improve this answer































                0














                I've been looking for a way to do this since leaving DiffMerge in Windows. I got it working in Fedora 29 with help from other answers, including @Jose's. The method should be very similar for Ubuntu. This method is useful if you need to compare files/folders from arbitrary locations.



                Add the following two scripts to ~/.local/share/nautilus/scripts:



                Note that the names are literally 'Compare Left' and 'Compare Right' so they appear naturally in the context menu.



                Compare Left



                #!/bin/bash

                if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]
                then
                echo -e "$NAUTILUS_SCRIPT_CURRENT_URI" > /tmp/MELD_LEFT_FILE
                else
                echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" > /tmp/MELD_LEFT_FILE
                fi


                Compare Right



                #!/bin/bash

                if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]
                then
                echo -e "$NAUTILUS_SCRIPT_CURRENT_URI" > /tmp/MELD_RIGHT_FILE
                else
                echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" > /tmp/MELD_RIGHT_FILE
                fi

                meld $(head -n1 /tmp/MELD_LEFT_FILE) $(head -n1 /tmp/MELD_RIGHT_FILE)


                Don't forget to make both scripts executable:



                chmod +x 'Compare Left' 'Compare Right'


                To add key bindings for the above add the following to ~/.config/nautilus/scripts-accels (be careful not to add empty lines or add lines with whitespace):



                F3 Compare Left
                F4 Compare Right


                You will need to restart nautilus for the key bindings to work (nautilus -q)






                share|improve this answer

























                  Your Answer








                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "3"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f307927%2fright-click-files-to-meld%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  6 Answers
                  6






                  active

                  oldest

                  votes








                  6 Answers
                  6






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  5














                  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





                  share|improve this answer





















                  • 2





                    b0rked in 11.04. now use: /usr/share/app-install/icons/meld.png for the icon and %F for the parameters.

                    – wim
                    May 26 '11 at 3:59











                  • You should just type meld for the icon, otherwise it won't use the themed icon.

                    – Drew Chapin
                    yesterday
















                  5














                  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





                  share|improve this answer





















                  • 2





                    b0rked in 11.04. now use: /usr/share/app-install/icons/meld.png for the icon and %F for the parameters.

                    – wim
                    May 26 '11 at 3:59











                  • You should just type meld for the icon, otherwise it won't use the themed icon.

                    – Drew Chapin
                    yesterday














                  5












                  5








                  5







                  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





                  share|improve this answer















                  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






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Aug 22 '16 at 8:43









                  thegreendroid

                  21538




                  21538










                  answered Jan 21 '11 at 5:25









                  darthvaderdarthvader

                  1,769205482




                  1,769205482








                  • 2





                    b0rked in 11.04. now use: /usr/share/app-install/icons/meld.png for the icon and %F for the parameters.

                    – wim
                    May 26 '11 at 3:59











                  • You should just type meld for the icon, otherwise it won't use the themed icon.

                    – Drew Chapin
                    yesterday














                  • 2





                    b0rked in 11.04. now use: /usr/share/app-install/icons/meld.png for the icon and %F for the parameters.

                    – wim
                    May 26 '11 at 3:59











                  • You should just type meld for the icon, otherwise it won't use the themed icon.

                    – Drew Chapin
                    yesterday








                  2




                  2





                  b0rked in 11.04. now use: /usr/share/app-install/icons/meld.png for the icon and %F for the parameters.

                  – wim
                  May 26 '11 at 3:59





                  b0rked in 11.04. now use: /usr/share/app-install/icons/meld.png for the icon and %F for the parameters.

                  – wim
                  May 26 '11 at 3:59













                  You should just type meld for the icon, otherwise it won't use the themed icon.

                  – Drew Chapin
                  yesterday





                  You should just type meld for the icon, otherwise it won't use the themed icon.

                  – Drew Chapin
                  yesterday













                  6














                  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.






                  share|improve this answer



















                  • 1





                    This is a slightly better answer than the accepted one, as it's more version independent.

                    – John T
                    Oct 4 '14 at 12:15






                  • 1





                    With Ubuntu 18.04.1 LTS, I could directory(folder) comparison using this method(skip step 2)

                    – itsoft3g
                    Nov 28 '18 at 6:21
















                  6














                  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.






                  share|improve this answer



















                  • 1





                    This is a slightly better answer than the accepted one, as it's more version independent.

                    – John T
                    Oct 4 '14 at 12:15






                  • 1





                    With Ubuntu 18.04.1 LTS, I could directory(folder) comparison using this method(skip step 2)

                    – itsoft3g
                    Nov 28 '18 at 6:21














                  6












                  6








                  6







                  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.






                  share|improve this answer













                  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.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 18 '14 at 6:12









                  Nitin NainNitin Nain

                  19113




                  19113








                  • 1





                    This is a slightly better answer than the accepted one, as it's more version independent.

                    – John T
                    Oct 4 '14 at 12:15






                  • 1





                    With Ubuntu 18.04.1 LTS, I could directory(folder) comparison using this method(skip step 2)

                    – itsoft3g
                    Nov 28 '18 at 6:21














                  • 1





                    This is a slightly better answer than the accepted one, as it's more version independent.

                    – John T
                    Oct 4 '14 at 12:15






                  • 1





                    With Ubuntu 18.04.1 LTS, I could directory(folder) comparison using this method(skip step 2)

                    – itsoft3g
                    Nov 28 '18 at 6:21








                  1




                  1





                  This is a slightly better answer than the accepted one, as it's more version independent.

                  – John T
                  Oct 4 '14 at 12:15





                  This is a slightly better answer than the accepted one, as it's more version independent.

                  – John T
                  Oct 4 '14 at 12:15




                  1




                  1





                  With Ubuntu 18.04.1 LTS, I could directory(folder) comparison using this method(skip step 2)

                  – itsoft3g
                  Nov 28 '18 at 6:21





                  With Ubuntu 18.04.1 LTS, I could directory(folder) comparison using this method(skip step 2)

                  – itsoft3g
                  Nov 28 '18 at 6:21











                  2














                  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






                  share|improve this answer




























                    2














                    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






                    share|improve this answer


























                      2












                      2








                      2







                      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






                      share|improve this answer













                      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







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jan 2 '14 at 20:59









                      MendhakMendhak

                      1306




                      1306























                          1














                          If you use Thunar file manager, then:



                          Works comparing files and also comparing directories.
                          I have spanish version, sorry :)



                          1) Open Edit > Configure custom actions:



                          enter image description here



                          2) Click on Add icon (the green plus one)



                          enter image description here



                          3) Fill the form...



                          enter image description here



                          enter image description here



                          4) Accept and check the result...



                          enter image description here



                          5) Finish!



                          enter image description here






                          share|improve this answer




























                            1














                            If you use Thunar file manager, then:



                            Works comparing files and also comparing directories.
                            I have spanish version, sorry :)



                            1) Open Edit > Configure custom actions:



                            enter image description here



                            2) Click on Add icon (the green plus one)



                            enter image description here



                            3) Fill the form...



                            enter image description here



                            enter image description here



                            4) Accept and check the result...



                            enter image description here



                            5) Finish!



                            enter image description here






                            share|improve this answer


























                              1












                              1








                              1







                              If you use Thunar file manager, then:



                              Works comparing files and also comparing directories.
                              I have spanish version, sorry :)



                              1) Open Edit > Configure custom actions:



                              enter image description here



                              2) Click on Add icon (the green plus one)



                              enter image description here



                              3) Fill the form...



                              enter image description here



                              enter image description here



                              4) Accept and check the result...



                              enter image description here



                              5) Finish!



                              enter image description here






                              share|improve this answer













                              If you use Thunar file manager, then:



                              Works comparing files and also comparing directories.
                              I have spanish version, sorry :)



                              1) Open Edit > Configure custom actions:



                              enter image description here



                              2) Click on Add icon (the green plus one)



                              enter image description here



                              3) Fill the form...



                              enter image description here



                              enter image description here



                              4) Accept and check the result...



                              enter image description here



                              5) Finish!



                              enter image description here







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Oct 12 '16 at 8:12









                              KatapofaticoKatapofatico

                              1112




                              1112























                                  1














                                  What I like to do is:




                                  1. add two thunar custom actions "meld left" and "meld right" which call "your_util_path/set_left.sh %F" and "your_util_path/compare_to_left.sh %F", respectively. Then,



                                  2. set_left.sh contains:



                                    echo $1 > your_util_path/MELD_LEFT_FILE




                                  and





                                  1. compare_to_left.sh contains:



                                    echo $1 > your_util_path/MELD_RIGHT_FILE



                                    meld $(head -n1 your_util_path/MELD_LEFT_FILE) $1




                                  I use this because often the two paths you want to compare are in different tabs or windows.






                                  share|improve this answer




























                                    1














                                    What I like to do is:




                                    1. add two thunar custom actions "meld left" and "meld right" which call "your_util_path/set_left.sh %F" and "your_util_path/compare_to_left.sh %F", respectively. Then,



                                    2. set_left.sh contains:



                                      echo $1 > your_util_path/MELD_LEFT_FILE




                                    and





                                    1. compare_to_left.sh contains:



                                      echo $1 > your_util_path/MELD_RIGHT_FILE



                                      meld $(head -n1 your_util_path/MELD_LEFT_FILE) $1




                                    I use this because often the two paths you want to compare are in different tabs or windows.






                                    share|improve this answer


























                                      1












                                      1








                                      1







                                      What I like to do is:




                                      1. add two thunar custom actions "meld left" and "meld right" which call "your_util_path/set_left.sh %F" and "your_util_path/compare_to_left.sh %F", respectively. Then,



                                      2. set_left.sh contains:



                                        echo $1 > your_util_path/MELD_LEFT_FILE




                                      and





                                      1. compare_to_left.sh contains:



                                        echo $1 > your_util_path/MELD_RIGHT_FILE



                                        meld $(head -n1 your_util_path/MELD_LEFT_FILE) $1




                                      I use this because often the two paths you want to compare are in different tabs or windows.






                                      share|improve this answer













                                      What I like to do is:




                                      1. add two thunar custom actions "meld left" and "meld right" which call "your_util_path/set_left.sh %F" and "your_util_path/compare_to_left.sh %F", respectively. Then,



                                      2. set_left.sh contains:



                                        echo $1 > your_util_path/MELD_LEFT_FILE




                                      and





                                      1. compare_to_left.sh contains:



                                        echo $1 > your_util_path/MELD_RIGHT_FILE



                                        meld $(head -n1 your_util_path/MELD_LEFT_FILE) $1




                                      I use this because often the two paths you want to compare are in different tabs or windows.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Apr 20 '18 at 16:55









                                      JoseJose

                                      111




                                      111























                                          0














                                          I've been looking for a way to do this since leaving DiffMerge in Windows. I got it working in Fedora 29 with help from other answers, including @Jose's. The method should be very similar for Ubuntu. This method is useful if you need to compare files/folders from arbitrary locations.



                                          Add the following two scripts to ~/.local/share/nautilus/scripts:



                                          Note that the names are literally 'Compare Left' and 'Compare Right' so they appear naturally in the context menu.



                                          Compare Left



                                          #!/bin/bash

                                          if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]
                                          then
                                          echo -e "$NAUTILUS_SCRIPT_CURRENT_URI" > /tmp/MELD_LEFT_FILE
                                          else
                                          echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" > /tmp/MELD_LEFT_FILE
                                          fi


                                          Compare Right



                                          #!/bin/bash

                                          if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]
                                          then
                                          echo -e "$NAUTILUS_SCRIPT_CURRENT_URI" > /tmp/MELD_RIGHT_FILE
                                          else
                                          echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" > /tmp/MELD_RIGHT_FILE
                                          fi

                                          meld $(head -n1 /tmp/MELD_LEFT_FILE) $(head -n1 /tmp/MELD_RIGHT_FILE)


                                          Don't forget to make both scripts executable:



                                          chmod +x 'Compare Left' 'Compare Right'


                                          To add key bindings for the above add the following to ~/.config/nautilus/scripts-accels (be careful not to add empty lines or add lines with whitespace):



                                          F3 Compare Left
                                          F4 Compare Right


                                          You will need to restart nautilus for the key bindings to work (nautilus -q)






                                          share|improve this answer






























                                            0














                                            I've been looking for a way to do this since leaving DiffMerge in Windows. I got it working in Fedora 29 with help from other answers, including @Jose's. The method should be very similar for Ubuntu. This method is useful if you need to compare files/folders from arbitrary locations.



                                            Add the following two scripts to ~/.local/share/nautilus/scripts:



                                            Note that the names are literally 'Compare Left' and 'Compare Right' so they appear naturally in the context menu.



                                            Compare Left



                                            #!/bin/bash

                                            if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]
                                            then
                                            echo -e "$NAUTILUS_SCRIPT_CURRENT_URI" > /tmp/MELD_LEFT_FILE
                                            else
                                            echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" > /tmp/MELD_LEFT_FILE
                                            fi


                                            Compare Right



                                            #!/bin/bash

                                            if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]
                                            then
                                            echo -e "$NAUTILUS_SCRIPT_CURRENT_URI" > /tmp/MELD_RIGHT_FILE
                                            else
                                            echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" > /tmp/MELD_RIGHT_FILE
                                            fi

                                            meld $(head -n1 /tmp/MELD_LEFT_FILE) $(head -n1 /tmp/MELD_RIGHT_FILE)


                                            Don't forget to make both scripts executable:



                                            chmod +x 'Compare Left' 'Compare Right'


                                            To add key bindings for the above add the following to ~/.config/nautilus/scripts-accels (be careful not to add empty lines or add lines with whitespace):



                                            F3 Compare Left
                                            F4 Compare Right


                                            You will need to restart nautilus for the key bindings to work (nautilus -q)






                                            share|improve this answer




























                                              0












                                              0








                                              0







                                              I've been looking for a way to do this since leaving DiffMerge in Windows. I got it working in Fedora 29 with help from other answers, including @Jose's. The method should be very similar for Ubuntu. This method is useful if you need to compare files/folders from arbitrary locations.



                                              Add the following two scripts to ~/.local/share/nautilus/scripts:



                                              Note that the names are literally 'Compare Left' and 'Compare Right' so they appear naturally in the context menu.



                                              Compare Left



                                              #!/bin/bash

                                              if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]
                                              then
                                              echo -e "$NAUTILUS_SCRIPT_CURRENT_URI" > /tmp/MELD_LEFT_FILE
                                              else
                                              echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" > /tmp/MELD_LEFT_FILE
                                              fi


                                              Compare Right



                                              #!/bin/bash

                                              if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]
                                              then
                                              echo -e "$NAUTILUS_SCRIPT_CURRENT_URI" > /tmp/MELD_RIGHT_FILE
                                              else
                                              echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" > /tmp/MELD_RIGHT_FILE
                                              fi

                                              meld $(head -n1 /tmp/MELD_LEFT_FILE) $(head -n1 /tmp/MELD_RIGHT_FILE)


                                              Don't forget to make both scripts executable:



                                              chmod +x 'Compare Left' 'Compare Right'


                                              To add key bindings for the above add the following to ~/.config/nautilus/scripts-accels (be careful not to add empty lines or add lines with whitespace):



                                              F3 Compare Left
                                              F4 Compare Right


                                              You will need to restart nautilus for the key bindings to work (nautilus -q)






                                              share|improve this answer















                                              I've been looking for a way to do this since leaving DiffMerge in Windows. I got it working in Fedora 29 with help from other answers, including @Jose's. The method should be very similar for Ubuntu. This method is useful if you need to compare files/folders from arbitrary locations.



                                              Add the following two scripts to ~/.local/share/nautilus/scripts:



                                              Note that the names are literally 'Compare Left' and 'Compare Right' so they appear naturally in the context menu.



                                              Compare Left



                                              #!/bin/bash

                                              if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]
                                              then
                                              echo -e "$NAUTILUS_SCRIPT_CURRENT_URI" > /tmp/MELD_LEFT_FILE
                                              else
                                              echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" > /tmp/MELD_LEFT_FILE
                                              fi


                                              Compare Right



                                              #!/bin/bash

                                              if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]
                                              then
                                              echo -e "$NAUTILUS_SCRIPT_CURRENT_URI" > /tmp/MELD_RIGHT_FILE
                                              else
                                              echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" > /tmp/MELD_RIGHT_FILE
                                              fi

                                              meld $(head -n1 /tmp/MELD_LEFT_FILE) $(head -n1 /tmp/MELD_RIGHT_FILE)


                                              Don't forget to make both scripts executable:



                                              chmod +x 'Compare Left' 'Compare Right'


                                              To add key bindings for the above add the following to ~/.config/nautilus/scripts-accels (be careful not to add empty lines or add lines with whitespace):



                                              F3 Compare Left
                                              F4 Compare Right


                                              You will need to restart nautilus for the key bindings to work (nautilus -q)







                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Jan 9 at 20:24

























                                              answered Jan 4 at 13:58









                                              ChrisChris

                                              11




                                              11






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Super User!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f307927%2fright-click-files-to-meld%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  How to make a Squid Proxy server?

                                                  第一次世界大戦

                                                  Touch on Surface Book