7

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.

  • I've looked in Edit->Preferences and there is no such option. So my guess is that the answer is "No". – Levon Haykazyan Sep 23 '11 at 12:52
  • I follow the LXDE dev blog. Options which aren't exposed via the GUI yet aren't unheard of in PCManFM. – ssokolow Sep 24 '11 at 2:28
  • 1
    The only answer I've found to this is to just recompile PCManFM with a parameter changed. I don't have the link handy, but I found it through Google on either the Crunchbang or Arch forums. – Chan-Ho Suh May 22 '12 at 16:51
4

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.

|improve this answer|||||
2

Edit this file (as root):

/usr/share/applications/pcmanfm.desktop

Look near the end of it for a line that says:

Exec=pcmanfm %U

Add the -n option to the command like this:

Exec=pcmanfm -n %U

Save the edited file, and thereafter, pcmanfm will always open in a new window unless you specifically tell it to open something in a new tab.

The feature to default to opening in a tab rather than a new window would be fine if it were workspace-aware. The difficulty that arises is that you may have pcmanfm open on some other desktop and you try to open a file and nothing (apparently) happens. If you hunt around on your other desktops, you'll find it, but it should default to opening in a new window if there is no open pcmanfm on the current desktop.

|improve this answer|||||
0

I've Fedora 20 with LXDE. If I do a right-click and go to Desktop preferencies or if you type the following command:

pcmanfm --desktop-pref

Under the tab Advanced there is the option "Open folders from desktop in new window" that resolve this problem.

|improve this answer|||||
0

I'm running Ubuntu LXDE, not Fedora.
That option for "pcmanfm --desktop-pref" does not work for me.
I got a couple of errors, including a pop-up that says "Desktop manager is not active."
The answer I provided previously (editing the pcmanfm.desktop file) does work for me.

In particular, I'm running a Ubuntu server install with LXDE added
manually after installation, rather than "Lubuntu", so it may be something
particular to my configuration that causes the error, or perhaps it's a
difference between Fedora and Ubuntu, I don't know.
I'm just reporting what works for me.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.