Page 1 of 1

Script to change default file manager

Posted: Tue 14 Sep 2010, 08:52
by esmourguit
Bonjour à tous,

Many new users coming from Windows, are baffled by ROX-Filer, the default file manager in Puppy.
Although it is extremely simple and powerful, some find it hard to understand and want to change the file manager anyway.
For now I only know three file managers that could please those regular users of the explorer of Windows: EmelFM2, Tux Commander and xfe.
To whom it may concern I created a script to simply change the default file manager. Unfortunately, I am not coder and I am sure it is possible to simplify the procedure of this very basic script.

First I created a file /usr/local/bin/defaultfilemgr which defines the default file manager, which is modified by various scripts in the directory /usr/local/changeFM.
Then we must change the file /usr/local/bin/drive_all so that the entry that determines the default file manager "rox" becomes "defaultfilemgr" : file Pinstall.sh in pet package.
And I created a simple gui that allows the choice of window managers.
This script is localized in English and French.
Tested only in 4.3.1

Cordialement ;)

Edit september 20, I deleted the package.

Posted: Fri 17 Sep 2010, 19:12
by technosaurus
rox is not the actual executable for ROX-Filer ...it runs /usr/local/apps/ROX-Filer/AppRun which is another script that runs the executable

for most things you can simply backup /usr/bin/rox and replace it with a symlink to /usr/local/bin/defaultfilemgr (or if necessary a script that parses out variables that may get passed to ROX-Filer - such as pinboard/session startup) This would prevent unwanted behavior in programs that you may not be aware of.

Posted: Sat 18 Sep 2010, 03:54
by esmourguit
Bonjour à tous,
Technosaurus, thank you for this information, so I will get back to work.
Cordialement ;)

Posted: Sat 18 Sep 2010, 05:08
by harii4
look into:
default filemanager-updated to 0.2 .pet by plinej


its in the unsorted - its old
it might help.

Posted: Tue 21 Sep 2010, 07:10
by esmourguit
Bonjour à tous,

@technosaurus,
Thank you for your advice.
I followed it and it works well.
There's no need to restart the PC, or even the X server to launch the new file manager.
There is however a slight problem that I do not deal : with a file manager other than ROX-Filer, desktop icons of disks/partitions do not change their status to indicate that the disk or partition is mounted or not.
I removed the package from the first post.

@ harii4
Thank you, I found the package, and I examined it, but there is a problem that has not been resolved : when the package is installed, the desktop is completely empty except one icon for home.
And it does not work with version 4.31.

Cordialement ;)

Posted: Tue 21 Sep 2010, 08:18
by technosaurus
good point - rox isn't just the file manager -- it also provides the desktop.

you probably just need a "rox" wrapper - something like

Code: Select all

#!/bin/sh
[ $1 == "-p" ] && /usr/local/apps/ROX-Filer/AppRun $@ || defaultfm $@
it may need more options - see the xterm wrapper for an example (ROX-Filer --help may indicate further wrapping is needed, but I think this should get your desktop working -not sure since I am guessing from a windows machine at the moment)

Posted: Wed 22 Sep 2010, 08:50
by esmourguit
Bonjour à tous,

@ technosaurus
Thank you very much for this command for a "rox" wrapper. That's fine, but ...

Test with xfe as an alternative file manager with the "rox" wrapper:
When the partition is not mounted, despite the "rox" wrapper, clicking on the desktop icons of disks/partitions, file manager opens first into a /root directory window, then closing that xfe /root directory window, new window appears displaying the selected partition or disk. That is not so bad
But still no change of status on desktop icon.
Unfortunately, I did not find any extra options in rox help.

Another thing, when you plug a USB stick for example, it automatically launches a /root directory window of xfe.
I think there is to do with pmount and pup_event manager

But it is much more difficult than this simple script.
When restarting X, i lost all of desktop icons. I had to change the defaultfilemgr line to a simpler command , removing the "rox" wrapper command.

So i give up, it's too much complicated for me.

Cordialement ;)

Posted: Wed 22 Sep 2010, 14:58
by technosaurus
examining one of my drive's folders

/root/.pup_event/drive_sda7/AppRun
/root/.pup_event/drive_sda7/Appinfo.xml

they use rox -x -d and -D

pup_event_frontend_d also uses rox -R (it is what sets up all of the drives above)

fyi - goingnuts did all of this as a tray using only jwm (no rox at all) and used jwm for the background as well.... good stuff you should checkout pupngo sometime