open containing folder from firefox in ROX-filer

Booting, installing, newbie
Post Reply
Message
Author
darwinev0lved
Posts: 83
Joined: Tue 29 Jul 2008, 12:19

open containing folder from firefox in ROX-filer

#1 Post by darwinev0lved »

Hi there, I often want to use the option of opening a folder from Firefox's Downloads window but can't. I've done some research and apparently ROX can't handle opening file urls.
Is there anyway to fix this?

I found this

http://www.void.gr/kargig/blog/2009/05/ ... file-urls/

and this

http://lovingthepenguin.blogspot.com/20 ... ining.html

but both are way above my non existent linux competence. Can anybody offer any hand-holding advice on how to get ROX to do what I want it to do that.
Many thanks,
Jon.

fernan
Posts: 449
Joined: Tue 23 Jan 2007, 13:56
Location: Buenos Aires

#2 Post by fernan »

Hello,

I will try to translate this tutorial http://lovingthepenguin.blogspot.com/20 ... ining.html to a beginner language.

As I understand, following this directions you will end with a script called "rox-open-url" that you need to set in Firefox as the command to use to open containing folders.

To do what the tutorial explains, create a text file in GEANY, copy the script from here, and paste the script inside the text file.
#!/bin/bash

# Opens input argument in rox, where input argument is assumed to be a URL
# of the form file://<path-to-file>

# Mithat Konar 17 Aug 2008

# Requires sed and /usr/local/share/rox-open-url/urldecode.sed

##############################################################

# strip away file:// prefix and decode remaining characters
thePath=`echo "$1" | sed 's/^[fF][iI][lL][eE]:\/\///' | sed -f /usr/local/share/rox-open-url/urldecode.sed`

rox "$thePath"

Save the file as "rox-open-url" inside the folder "/usr/local/bin/"

To make it "executable", you can open a terminal, and give appropiate permissions to the file. Do this:
In a terminal, type the following command:

Code: Select all

chmod +x /usr/local/bin/rox-open-url
Then, you need to create another text file required by the script, called "urldecode.sed". To do that, create a text file in GEANY, copy the text from here and save it as "urldecode.sed" inside the folder "/usr/local/share/rox-open-url/" (actually, in linux many times you refer to files with it's absolute path,
so save it as /usr/local/share/rox-open-url/urldecode.sed)
I think you' ll need to create the "rox-open-url" folder.
s/%08/\\b/g
s/%09/\\t/g
s/%0[aA]/\\n/g
s/%0[dD]/\\r/g
s/%20/\ /g
s/%21/\!/g
s/%22/\"/g
s/%23/\#/g
s/%24/\$/g
s/%25/\%/g
s/%26/\&/g
s/%27/\'/g
s/%28/\(/g
s/%29/\)/g
s/%2[aA]/\*/g
s/%2[bB]/\+/g
s/%2[cC]/\,/g
s/%2[dD]/\-/g
s/%2[eE]/\./g
s/%2[fF]/\//g
s/%30/0/g
s/%31/1/g
s/%32/2/g
s/%33/3/g
s/%34/4/g
s/%35/5/g
s/%36/6/g
s/%37/7/g
s/%38/8/g
s/%39/9/g
s/%3[aA]/\:/g
s/%3[bB]/\;/g
s/%3[cC]/\</g
s/%3[dD]/\=/g
s/%3[eE]/\>/g
s/%3[fF]/\?/g
s/%40/\@/g
s/%41/A/g
s/%42/B/g
s/%43/C/g
s/%44/D/g
s/%45/E/g
s/%46/F/g
s/%47/G/g
s/%48/H/g
s/%49/I/g
s/%4[aA]/J/g
s/%4[bB]/K/g
s/%4[cC]/L/g
s/%4[dD]/M/g
s/%4[eE]/N/g
s/%4[fF]/O/g
s/%50/P/g
s/%51/Q/g
s/%52/R/g
s/%53/S/g
s/%54/T/g
s/%55/U/g
s/%56/V/g
s/%57/W/g
s/%58/X/g
s/%59/Y/g
s/%5[aA]/Z/g
s/%5[bB]/\[/g
s/%5[cC]/\\/g
s/%5[dD]/\]/g
s/%5[eE]/\^/g
s/%5[fF]/\_/g
s/%60/\`/g
s/%61/a/g
s/%62/b/g
s/%63/c/g
s/%64/d/g
s/%65/e/g
s/%66/f/g
s/%67/g/g
s/%68/h/g
s/%69/i/g
s/%6[aA]/j/g
s/%6[bB]/k/g
s/%6[cC]/l/g
s/%6[dD]/m/g
s/%6[eE]/n/g
s/%6[fF]/o/g
s/%70/p/g
s/%71/q/g
s/%72/r/g
s/%73/s/g
s/%74/t/g
s/%75/u/g
s/%76/v/g
s/%77/w/g
s/%78/x/g
s/%79/y/g
s/%7[aA]/\z/g
s/%7[bB]/\{/g
s/%7[cC]/\|/g
s/%7[dD]/\}/g
s/%7[eE]/\~/g
Once you've done this, you can use the method described here
http://rubylution.ping.de/articles/2007 ... nder-linux
to set rox-open-url as the command to use to open containing folders.

darwinev0lved
Posts: 83
Joined: Tue 29 Jul 2008, 12:19

#3 Post by darwinev0lved »

Hi fernan,
Thanks very much for your very clear instructions. I followed them and now it works! That's a real bonus. I wonder if it would be worth having those two files in Puppy as a default. I'm a little surprised this has never come up before as I can't be the only one who has ever wanted to open files from within Firefox before.
Thanks again for your help.
Jon.

fernan
Posts: 449
Joined: Tue 23 Jan 2007, 13:56
Location: Buenos Aires

#4 Post by fernan »

I'm happy it was useful.
I will do it in my Puppy !!!

I've tried many times to open files in that way, but never worked... I just gave up...

It's a good Idea to include this in the puppy CD.

Perhaps this thread could be moved to the HOW TO section...

Regards.

Fernan

fyujj
Posts: 102
Joined: Sat 04 Apr 2009, 17:40

#5 Post by fyujj »

Thank you for this, it really works.

But the last part isn't necessary. It didn't work at first but then I just chose /usr/local/bin/rox-open-url as the application to handle files (under edit>preferences>applications) and it works nicely.

So the last part (the link at the end of ferman's first post) not only isn't necessary but will make it not work. If anyone, like me, had created the entries in about:config said in that link, remove them by right-clicking on them and choosing 'reset'. They will be gone after Firefox restarts.

fyujj
Posts: 102
Joined: Sat 04 Apr 2009, 17:40

Much simpler way.

#6 Post by fyujj »

Now rox has the -U option to deal with that so here's the how-to:

as root, make a new file /usr/local/bin/roxuri and copy the following into it:

Code: Select all

#!/bin/sh
exec rox -U "$@"
make the new file executable for all by using ROX or by issuing the command:

Code: Select all

chmod a+x /usr/local/bin/roxuri
open Firefox/Iceweasel and set it to use the script to open files with Edit -> Preferences -> Applications: file and selecting /usr/local/bin/roxuri

Credits

darwinev0lved
Posts: 83
Joined: Tue 29 Jul 2008, 12:19

Re: Much simpler way.

#7 Post by darwinev0lved »

fyujj wrote:Now rox has the -U option to deal with that so here's the how-to:

as root, make a new file /usr/local/bin/roxuri and copy the following into it:

Code: Select all

#!/bin/sh
exec rox -U "$@"
make the new file executable for all by using ROX or by issuing the command:

Code: Select all

chmod a+x /usr/local/bin/roxuri
open Firefox/Iceweasel and set it to use the script to open files with Edit -> Preferences -> Applications: file and selecting /usr/local/bin/roxuri

Credits
Works like a charm, many thanks - been playing with some new puplets and this makes life a lot quicker

Thanks,
Jon.

kisamesama
Posts: 10
Joined: Fri 31 Dec 2010, 06:51

Re: Much simpler way.

#8 Post by kisamesama »

fyujj wrote:Now rox has the -U option to deal with that so here's the how-to:

as root, make a new file /usr/local/bin/roxuri and copy the following into it:

Code: Select all

#!/bin/sh
exec rox -U "$@"
make the new file executable for all by using ROX or by issuing the command:

Code: Select all

chmod a+x /usr/local/bin/roxuri
open Firefox/Iceweasel and set it to use the script to open files with Edit -> Preferences -> Applications: file and selecting /usr/local/bin/roxuri

Credits
perfect!!! thx

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

Re: Much simpler way.

#9 Post by Béèm »

fyujj wrote:Now rox has the -U option to deal with that so here's the how-to:

as root, make a new file /usr/local/bin/roxuri and copy the following into it:

Code: Select all

#!/bin/sh
exec rox -U "$@"
make the new file executable for all by using ROX or by issuing the command:

Code: Select all

chmod a+x /usr/local/bin/roxuri
open Firefox/Iceweasel and set it to use the script to open files with Edit -> Preferences -> Applications: file and selecting /usr/local/bin/roxuri

Credits
Thanks.
It works on condition that the container folder is mounted/available.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
barefoot
Posts: 16
Joined: Sun 14 Feb 2010, 22:42
Location: Hana, HI, USA

Re: Much simpler way.

#10 Post by barefoot »

fyujj wrote:Now rox has the -U option to deal with that so here's the how-to:

as root, make a new file /usr/local/bin/roxuri and copy the following into it:

Code: Select all

#!/bin/sh
exec rox -U "$@"
make the new file executable for all by using ROX or by issuing the command:

Code: Select all

chmod a+x /usr/local/bin/roxuri
open Firefox/Iceweasel and set it to use the script to open files with Edit -> Preferences -> Applications: file and selecting /usr/local/bin/roxuri

Credits
I'm using Seamonkey 2.19 and there was no "file" content type under Edit > Preferences > Helper Applications. In this case, go to Tools > Download Manager > right-click a download > Open Containing Folder > Choose... > choose the roxuri file from fyujj's instructions. If the containing folder opens, repeat the process ticking the 'remember my choice' box.

Thanks fyujj!

Post Reply