default filemanager - updated to 0.2

Stuff that has yet to be sorted into a category.
Message
Author
plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

default filemanager - updated to 0.2

#1 Post by plinej »

I know rox is very integrated into puppy but it's just not my file manager of choice. I need to have the dual paned emelmf2. I decided to make a script at /usr/local/bin/defaultfilemanager to handle many different filemanagers instead. I made a simple xdialog radiolist gui so you can select from 11 different filemanagers (emelfm, emelfm2, endeavour2, file runner, gentoo, midnight commander, rox, tux commander, uxplor, worker, & xfe) as your default. Now of course this won't do much on its own because none of the scripts call defaultfilemanager but insteade they call rox. I've edited mut.tcl & dotpuprox.sh from puppy 2.14 to reflect that change. I've also included dougal's and my revised pmount that hasn't been officially put into puppy yet (revised yet again changing rox to defaultfilemanager). Of course this is a little more complicated than the other default scripts because rox is not only a file manager but it controls the pinboard. The script basically converts the rox command line switches to switches that the selected file manager will understand (everything else will revert back to rox). I've tested it with all 11 filemanagers that I've included support for and it seems to work fine. I mentioned this to Barry so maybe it will be in the next version of Puppy.

0.2
added support for more file managers. Added the ability to enter your own file manager if it's not listed. Changed the HOME icon settings from rox to dfmh (script that executes defaultfilemanager $HOME).

This package includes:

default_filemanager (xdialog radiolist selector for default file manager)
defaultfilemanager (the bash script that the revised scripts will call on)
pmount (revised)
mut.tcl (revised)
dotpuprox.sh (revised)
Attachments
Default_filemanager-0.2.pet
(20.17 KiB) Downloaded 1167 times
Last edited by plinej on Tue 27 Feb 2007, 04:33, edited 1 time in total.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#2 Post by Nathan F »

Looks to be an interesting concept. I would like to see Thunar and Pcmanfm included in the list but probably not a biggie.

One thing I noticed, line 37 of defaultfilemanager calls mc without doing so in a terminal. This makes mc misbehave badly and peg the cpu to 100%. It should be rather 'xterm -e mc'.

Thank you for putting the configuration in $HOME rather than specifying /root or /etc, most Puppy coders aren't good with that concept yet. Personally I'd rather it went in $HOME/.config but no biggie.

Another nice touch might be to include a "custom" option in the radiolist, bringing up a simple text entry box for people who run something you might not have thought of, like Konqueror or Thunar.

Sorry I'm so full of suggestions but I've been working on something similar relating to browser, mail client, etc with a radiolist chooser and everything. Basically we've covered a lot of the same ground here already without knowing it.

Nathan
Bring on the locusts ...

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#3 Post by plinej »

Good ideas Nathan, I'll do an update tomorrow.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#4 Post by plinej »

if you know what the commands are for those other filemanagers to open a specified directory let me know and I'll revise the package. If not I'll see if I can't get them installed.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#5 Post by Nathan F »

For thunar and pcmanfm you should be able to just pass the directory name as the argument, nothing fancy.

Code: Select all

thunar /opt
would open thunar in /opt.

I'd actually like to see the idea of the customizable defaults applied elsewhere. People ask on a fairly regular basis how to change the default word processor to open office, or how to change the default browser to firefox. Why not have a control panel for selecting default programs. perhaps part of a larger control panel. The code isn't terribly complicated - like I said you and I have both been covering similar ground with it and come up with pretty similar implementations, mine just had to do with browser and email client rather than filemanager. Why not go ahead and revise the entire mime-handling scheme so the end user has a really easy way to choose which programs they want to use as defaults? I see a lot of potential to improve usability here.

Nathan
Bring on the locusts ...

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#6 Post by plinej »

I agree Nathan. Since I usually strip rox out of my version of puppy I don't usually have the desktop icons and some of those things don't really matter. Where does rox store the information for those icons? I forgot about that home directory icon, I could make that use the defaultfilemanager too.

User avatar
Colonel Panic
Posts: 2171
Joined: Sat 16 Sep 2006, 11:09

Linux file managers

#7 Post by Colonel Panic »

Some good choices there. There's also Linux Commander, which I've compiled and run before on a different distro, and Midnight Commander, a console-based file manager which nevertheless runs in a window and for which a dotpup exists.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#8 Post by plinej »

Midnight commander is already in the program but it needs to be fixed as Nathan stated above. I'll look into Linux Commander (haven't heard of that one). I'll do an updated version sometime today when I get a chance but have got some things to do right now.

User avatar
Colonel Panic
Posts: 2171
Joined: Sat 16 Sep 2006, 11:09

#9 Post by Colonel Panic »

Here it is;

http://www.algonet.se/~skeleton/linuxcmd/

There's also Tux Commander, for which I believe a dotpup also exists, ands I've also read about one called Sunshine Commander; great name, but I know nothing else.

Hope this helps.

Best,

Colonel Panic.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#10 Post by Nathan F »

ROX-Filer stores it's desktop configuration in an xml file. In Puppy it is by default located in /root/Choices/ROX-Filer/PuppyPin, although if you were to let ROX do it's thing the pinboard file would be in $HOME/.config/rox.sourceforge.net/ROX-Filer/pb_default, which is where I've moved mine to. In Puppy Barry just drug the file /usr/local/bib/rox to the pinboard and renamed it home - make sure you don't edit that file or rox won't start. Instead replace the pinboard entry with your script.

If you replace that entry you will also have to replace the icon or rox will default to the icon it uses for shell scripts, because the pinboard file only contains descriptions for the name of the file and the position on the pinboard. The icon information is stored in a file names globicons in $HOME/.config/rox.sourceforge.net/ROX-Filer. Or at least I think it's there, it could have moved. Another way to do it, since we now have rox-2.5, would be to use a .desktop file rather than the actual script, but it would have to have a full size icon (48x48) specified to look right.

Nathan
Bring on the locusts ...

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#11 Post by plinej »

Ok, I added konquerer, thunar, pcmanfan & sunshine commander. Still have to do linux commander. I fixed the midnight commander issue. I added the ability to select other and input your own filemanager if not supported. I changed the config file to be saved in $HOME/.config/dfm instead. I still have to work on the desktop icon and then I'll put up v0.2.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#12 Post by Nathan F »

Fantastic, you're one of the most flexible developers I know :D I'll stop adding feature requests now.

Nathan
Bring on the locusts ...

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#13 Post by plinej »

I definitely appreciate your input Nathan. How would I go about just making an icon automatically install for selected default filemanager? As you can see I know little about rox. I'll see if I can figure it out in the mean time.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#14 Post by Nathan F »

Just put the defaultfilemanager script in place of the existing home icon in the pinboard file, and set the icon for it.

Nathan
Bring on the locusts ...

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#15 Post by plinej »

I changed rox to defaultfilemanager in globicons & PuppyPin and it didn't do anything (even after restarting jwm) until I right clicked on the icon itself and changed rox to defaultfilemanager. It didn't matter much because it didn't make my default filemanager open up the home directory anyways. I'll have to work on it some more.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#16 Post by Nathan F »

I probably forgot to mention, the pinboard must be restarted for the changes to take place. Easiest way would be to log out of X and then back in again, but it can be done by passing rox an argument also.

Code: Select all

rox -p=[path_to_pinboard_file]
Or the way I do it, with the pinboard file where rox wants it:

Code: Select all

rox -p=default
The first way is the appropriate way for Puppy.

Nathan
Bring on the locusts ...

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#17 Post by plinej »

I revised my default_filemanager script to include the following:

Code: Select all

cat $HOME/Choices/ROX-Filer/PuppyPin | sed 's/\/rox/\/dfmh/g' > $HOME/Choices/ROX-Filer/PuppyPin
cat $HOME/Choices/ROX-Filer/globicons | sed 's/\/rox/\/dfmh/g' > $HOME/Choices/ROX-Filer/globicons
cat $HOME/.config/rox.sourceforge.net/ROX-Filer/globicons | sed 's/\/rox/\/dfmh/g' > $HOME/.config/rox.sourceforge.net/ROX-Filer/globicons
rox -p=$HOME/Choices/ROX-Filer/PuppyPin
dfmh is just a script that executes:

defaultfilemanager $HOME

Everything seems to work good except the HOME icon on the pinboard changes to what looks like a sheet of paper with a terminal on top. What do I do to maintain the correct HOME icon executing from within a script?

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#18 Post by Nathan F »

That sheet of paper is the default icon rox uses for a shell script. Your script missed the proper globicons file I think, it should be:

Code: Select all

cat $HOME/.config/rox.sourceforge.net/ROX-Filer/globicons | sed 's/\/rox/\/dfmh/g' > $HOME/.config/rox.sourceforge.net/ROX-Filer/globicons
This discrepency exists because we used to have an older version of rox that kept it's config files in $HOME/Choices. All 2.xx versions of rox use a moe freedesktop compliant location $home/.config/rox.sourceforge.net for config files. In Puppy we still have /root/Choices just because the old pinboard file has not been moved, and it is called with it's full path from within .xinitrc.

Nathan
Bring on the locusts ...

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#19 Post by plinej »

I already had that in the script. I saw both globicons and did the same to both (not knowing which one really matters). Not sure why I get the other icon.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#20 Post by Nathan F »

Just a shot in the dark, does your script reside in the exact same directory as rox, ie /usr/local/bin? The globicons file expects an absolute path.

Nathan
Bring on the locusts ...

Post Reply