Results 1 to 4 of 4

Thread: pcmanfm command line option to open new window?

  1. #1
    Join Date
    May 2009
    Beans
    15

    pcmanfm command line option to open new window?

    Hey nix-users!

    I'm stumped on this one... what is the option for opening a new window with pcmanfm command? I tried $man pcmanfm and $pcmanfm --help but no luck. The closest I found was opening a new tab with '-t' option. For example to open trash window as a new tab in existing window:
    Code:
    $pcmanfm -t trash:///
    I can open new window with CTRL + N if my memory is correct. I'm away from my computer at this moment. I hope I can achieve this thru command line.

    Thanks!

  2. #2
    Join Date
    Jan 2012
    Beans
    13

    Re: pcmanfm command line option to open new window?

    Wouldn't it just be pcmanfm without any options??

    I've never used it but some applications are setup to allow multiple instances, and some aren't.

  3. #3
    Join Date
    May 2009
    Beans
    15

    Re: pcmanfm command line option to open new window?

    Without any options pcmanfm opens new tab by default.

    Is there such a command where you can invoke CTRL + N?

  4. #4
    Join Date
    Aug 2010
    Beans
    11

    Re: pcmanfm command line option to open new window?

    Quote Originally Posted by sideburn View Post
    Hey nix-users!

    I'm stumped on this one... what is the option for opening a new window with pcmanfm command? I tried $man pcmanfm and $pcmanfm --help but no luck. The closest I found was opening a new tab with '-t' option. For example to open trash window as a new tab in existing window:
    Code:
    $pcmanfm -t trash:///
    I can open new window with CTRL + N if my memory is correct. I'm away from my computer at this moment. I hope I can achieve this thru command line.

    Thanks!
    I didn't find any solution other than doing

    Code:
    sudo aptitude install apt-src build-essential
    sudo aptitude build-dep pcmanfm
    mkdir ~/src
    cd ~/src
    apt-src install -b pcmanfm
    
    gedit pcmanfm-0.9.10/src/pcmanfm.c
    Now I use emacs for my editor, but the point is, change line 421 in pcmanfm-0.9.10/src/pcmanfm.c from
    Code:
    gboolean pcmanfm_open_folder(GAppLaunchContext* ctx, GList* folder_infos, gpointer user_data, GError** err)
    {
        GList* l = folder_infos;
        for(; l; l=l->next)
        {
            FmFileInfo* fi = (FmFileInfo*)l->data;
            fm_main_win_open_in_last_active(fi->path); 
        }
        return TRUE;
    }
    to
    Code:
    gboolean pcmanfm_open_folder(GAppLaunchContext* ctx, GList* folder_infos, gpointer user_data, GError** err)
    {
        GList* l = folder_infos;
        for(; l; l=l->next)
        {
            FmFileInfo* fi = (FmFileInfo*)l->data;
            //fm_main_win_open_in_last_active(fi->path); // new-win fix 
    	fm_main_win_add_win(NULL, fi->path);         // new-win fix
        }
        return TRUE;
    }
    Save and exit your text editor. Back at the shell, type:
    Code:
    cd pcmanfm-0.9.10
    dpkg-buildpackage -rfakeroot -uc -b
    cd ..
    sudo dpkg -i pcmanfm*deb
    Now you can kiil and restart pcmanfm, or just logout/login.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •