Ubuntu – Is it possible to set the default behaviour of double clicking a folder to be “Open in New Window” with PCManFM

lxdepcmanfm

My mother uses separate desktops heavily and finds it very irritating when she accidentally double-clicks on a folder on her desktop rather than right-clicking and choosing "open in new window" as she's trained herself to usually do.

Is there a way to set PCManFM to default to opening in new windows rather than new tabs?

(She's using 12.04 (Precise Pangolin) at the moment)

Here's a very rushed screencast explaining the behaviour I'm talking about.

Best Answer

You can try to recompile PCManFM , I am running Lubuntu 12.04 with PCManFM 0.9.10 and these steps worked for me.

Follow these steps:

  1. Open a Terminal and install the necessary packages:

    sudo apt-get install apt-src build-essential
    
  2. Install the build dependencies:

    sudo apt-get build-dep pcmanfm
    
  3. Create a folder to download the source code:

    mkdir ~/Downloads/src
    cd ~/Downloads/src
    
  4. Download the source:

    apt-src install -b pcmanfm
    
  5. Edit the pcmanfm-0.9.10/src/pcmanfm.c file.

    leafpad pcmanfm-0.9.10/src/pcmanfm.c
    
  6. In Leafpad, search for the line fm_main_win_open_in_last_active(fi->path); (should be somewhere around line 420 and change it to fm_main_win_add_win(NULL, fi->path);. Save the changes and close the file. See the screenshots if it isn't clear:

    Before:

    code earlier

    After:

    code after editing

  7. Go to the pcmanfm-0.9.10/ folder to build the deb packages:

    cd pcmanfm-0.9.10/
    dpkg-buildpackage -rfakeroot -uc -b
    
  8. Now you can install the deb packages:

    cd ..
    sudo dpkg -i pcmanfm*deb
    
  9. Finally you can logout and Login to see the changes.


Reference: This post by ogilvierothchild in ubuntu forums.

Related Question