[SOLVED]Open pcmanfm in a new window

The dedicated forum for PCMan File Manager - http://wiki.lxde.org/en/PCManFM
Locked
David
Posts: 15
Joined: Tue May 01, 2012 12:28 pm

[SOLVED]Open pcmanfm in a new window

Post by David »

Hi. I use Arch linux, LXDE, pcmanfm and openbox. If I had a pcmanfm window open and I run another 'pcmanfm' instance then a new window opens. It's fine for me.

However if I run the second item with some addition, for example 'pcmanfm menu://applications" or 'pcmanfm trash:///' then the applications menu or the trashcan don't open in a new window, they open as a new tab in the original pcmanfm instance, even if it's open in a different desktop. This is wrong for me, I like to make launchers of 'Applications' and 'Trash' in the desktop.

Is it possible to open 'pcmanfm menu://applications" or 'pcmanfm trash:///' in a new window? Thanks.

Edit: pcmanfm 1.1 includes a '-n' option to open in a new window
Last edited by David on Sat Nov 03, 2012 11:54 pm, edited 1 time in total.
seppalta
Posts: 449
Joined: Tue Sep 20, 2011 6:09 am
Location: USA
Contact:

Re: Open pcmanfm in a new window

Post by seppalta »

I'm unclear what you are asking. My pcmanfm opens new windows when trash or applications are clicked. In any case you can put launchers of anything just about everywhere in LXDE. See
http://lxlinux.com for recipes.
David
Posts: 15
Joined: Tue May 01, 2012 12:28 pm

Re: Open pcmanfm in a new window

Post by David »

Hi seppalta. Thank you for your answer, I'll try to clarify my question. Forget about the launcher, it's not important (*)

1- In my computer I open a terminal and type 'pcmanfm' (a new window open). Open another terminal and type 'pcmanfm' (a new window open). And so on. It doesn't matter if there's another pcmanfm instance, always a new window in the current desktop is opened. This is what I want.

2- I open a terminal and type 'pcmanfm menu://applications'. If there is not a pcmanfm instance running, then a new window is opened. But if there is a pcmanfm instance running, a new tab is opened in that pcmanfm instance, even if it is opened in a different desktop. This is 2hat I don't want, I want the same behaviout than in 1-

(*) My question arises because I want to create launchers in my desktop to use with only 1 click. For example for the applications

[Desktop Entry]
Type=Application
Icon=system-software-installer
Name=Menú
GenericName=Menú de aplicaciones
Categories=FileManager;Utility;Core;GTK;
Exec=pcmanfm menu://applications/
#Path=/
StartupNotify=false
Terminal=false

and for the trashcan something like

[Desktop Entry]
Type=Application
Icon=user-trash-full
Name=Papelera de reciclaje
Categories=FileManager;Utility;Core;GTK;
Exec=pcmanfm trash:///
StartupNotify=true
Terminal=false

Those launchers will be fine (only 1 click needed) if there is not any pcmanfm instance running. However if there is another pcmanfm running then applications or trash are opened as a tab in that instance (probably hidden in another desktop) and several clicks are needed to launch applications or trashcan.

I hope I've been more clear, English is not my native language (I'm Spanish)
seppalta
Posts: 449
Joined: Tue Sep 20, 2011 6:09 am
Location: USA
Contact:

Re: Open pcmanfm in a new window

Post by seppalta »

openbox.png
openbox.png (266.47 KiB) Viewed 11785 times
Got it, and your English is great. I seem to recall a problem with a desktop link with the .desktop file having exec=pcmanfm menu://applications. Sometimes it worked and sometimes it didn't, sometimes even freezing up pcmanfm. Don't remember a similar problem with trash but then I never used it - just tested it to see if it worked. I really wasn't interested in accessing a menu this way because there are other better ways in my opinion, so I didn't play with it very long.

[1] Use a keyboard binding to the main menu, action name="ShowMenu" . Keybindings are set, and can be, thus, edited in the rc.xml or lxde-rc.xml files contained in the 3 openbox directories: /etc/xdg/openbox, /usr/share/lxde/openbox, ~/.config/openbox . Usually super (Windows key) + space is the default setting for the main menu.

[2] Use the openbox menu already set up but not filled, that is, you have to add applications, etc. A right click anywhere on the desktop brings it up, and it has always been very reliable for me and is very easily edited. As a matter of fact, you can set up an editor right in the menu as the attached picture will show. The menu.xml is located in the same 3 directories just listed. If you want to try a menu.xml and rc.xml already set-up, then you can download mine from lxlinux.com by putting the following in terminal:

Code: Select all

wget http://lxlinux.com/menu.xml http://lxlinux.com/rc.xml
. They will be downloaded to the directory from which you issue the command, and, of course, you need to have wget installed on your computer. Just replace your copies by these and then edit menu.xml replacing my applications with yours where necessary. Just read rc.xml for my keyboard bindings, and, of course, you can change any of them to your preferences.

[3] Install and link to the desktop xfce4-appfinder. It presents a menu like the pcmanfm menu, and is stable with pcmanfm.

[4] Make up your own menu using the myStuff menu program, http://www.kornelix.com/mystuff.html, and link it to the desktop.
David
Posts: 15
Joined: Tue May 01, 2012 12:28 pm

Re: Open pcmanfm in a new window

Post by David »

Wow. I posted a problem and you answer 4 different solutions and add your own conf files. You're incredible, mate. Thanks a lot

As there's an easy 2-clicks solution (1 click to open pcmanfm, a second click in the left panel to open applications or trash) I'm only interested in 1-click solutions. Unfortunately my problem is a bit complex (I'm a difficult patient, Dr. seppalta :lol: ) because I'm using pcmanfm in a tablet, so I don't have mouse or keyboard. I use onboard as a virtual keyboard and easystroke to emulate mouse buttons, but several clicks or movements are needed.

[1]-[2] keyboard shortcuts, right, middle or double clicks are not 1-click solutions and are not useful for me.

[3] Great, I didn't know xfce4-appfinder and it seems just what I've looking for. However I need to double-click to open the apps (double-click is not easy on a touchscreen). I've checked the preferences, I've even installed thunar and configured it to single-click open, but I can't open with single-click in appfinder. If I solve the double-click behaviour it will be a perfect solution :cry:

[4] myStuff is a bit ugly, but it works. Icons are very small, I'll try to increase them.

I also found a kind of solution for the trash. Adding Path=$HOME/.local/share/Thrash/files in the launcher then pcmanfm opens in a new windows and in the trash directory. Unfortunately the 'Restore' option doesn't appear, maybe it is only shown in trash:///
seppalta
Posts: 449
Joined: Tue Sep 20, 2011 6:09 am
Location: USA
Contact:

Re: Open pcmanfm in a new window

Post by seppalta »

I'm using pcmanfm in a tablet
I guess that I am too old to help you :D , but thanks for giving me more reasons for not getting a tablet.

Good luck on changing icon size in myStuff. You could double (quadruple) each entry and line them up adjacent (square) for 24x48, 48x24 or 48x48. MyStuff automatically recreates 24x24 icons and stores them in ~/.myStuff, regardless of the place or size of the original icon in the menu icon box. I tried changing icon size for the icons in this directory to no avail. Also, it never removes unused icons, so it is worthwhile to stop by occasionally and clean out the unused ones. Cheers.
David
Posts: 15
Joined: Tue May 01, 2012 12:28 pm

Re: Open pcmanfm in a new window

Post by David »

OFFTOPIC
seppalta wrote:thanks for giving me more reasons for not getting a tablet.
I confess I didn't like tablets (moreover, I didn't like laptops, I always used desktop PC's). However this winter I suffer a serious problem in my neck ('slipped disc' in English?) which makes me lie in the bed for long time. I bought a tablet with a stand bag, and it allows me to work in my bed 'almost' if I had a PC. My tablet (a wetab/exopc) with Arch-lxde-openbox is quite fast and I can easily use the same programs I used in my desktop computer (wxmaxima, octave, xournal, texmaker...). I'm really happy with the linux in my tablet. Note that my problems are 'how to make in 1 click what I an easily make in 2 clicks', what a stupid problem is that? ;)

PD: and I must admit, playing World of Goo in a touchscreen is great :lol:

END OF OFFTOPIC
David
Posts: 15
Joined: Tue May 01, 2012 12:28 pm

Re: Open pcmanfm in a new window

Post by David »

The recent pcmanfm 1.1 includes a new '-n' option, so 'pcmanfm -n menu://applications' or 'pcmanfm -n trash:///' was just what I was looking for. Big thanks to the pcmanfm dev!!! :D
Locked