WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: an "xdg-open" script for Rox and Chromium  (Read 848 times)

nomer

  • Guest
an "xdg-open" script for Rox and Chromium
« on: March 03, 2012, 06:05:20 AM »
I have been using chromium-browser.tcz for the web and rox-filer.tcz for my local file system. Unfortunately, when I downloaded a file I couldn't click on it to open it. Also, the "Open downloads folder" link on the chromium download page didn't work. So I did some searching online and found out that I needed 'xdg-open' for the above mentioned things to work. So I installed xdg-utils.tcz, but I could figure out how to configure it to work correctly.
To solve this problem I created my own 'xdg-open' script which asks rox what program to open the file with. I really like this setup because I don't need to "drop to the command line" to change what program a certain mime-type should be opened with.
Now when ever I download a file I can simple click on it in the download bar to open it rather than opening rox, navigating to ~/Downloads, and clicking on the file.
I've not tested the script super extensively.
To use this script you'll need bash.tcz loaded.
I thought that someone else might find this script useful so I've attached it.
Simply drop this script it ~/.local/bin make sure that it is executable, do a backup and Chromium will now ask rox what program to open files with.

nomer

  • Guest
Re: an "xdg-open" script for Rox and Chromium
« Reply #1 on: July 10, 2012, 07:57:40 AM »
I've attached a new version of this script. It adds support for some URLs such as http://www.forum.tinycorelinux.net or file:///home/tc
I also realized that I can replace the searching lines with a single line
rox "$file"

nomer

  • Guest
Re: an "xdg-open" script for Rox and Chromium
« Reply #2 on: July 15, 2012, 08:01:06 AM »
Okay, it turns out that
Quote
rox "$file"
doesn't work if the file name has a space in it e.g. /home/tc/Downloads/a pic.png

so I've combined the two previous script into one.

Now, I'm going to try out that "Lock thread" button....

Cheers,
Nomer