-----------------------
EDIT 9-04-07
Version 3 attached. You can see the new code further down this page. Basically it might open some .url files that might not have worked before, and can open multiple files at once from the command line (e.g. openurl *.url). If you will use this functionality read the comments in the code, as you can have dillo open them in tabs or windows, you may want to change when it will work if you use Firefox, and you'll have to edit it to make it work with Seamonkey. Also read the first edit below.
-----------------------
EDIT 27-03-07:
Package now attached to this post - in Puppy 1.x, and I believe up to 2.12, install with Pupget as an alien package, and either restart ROX/Puppy or right click in a ROX window->options->types->re-read files. See below for Puppy 2.13 and above.
PACKAGE CONTENTS:
-an updated (you can see it further down this page) /usr/bin/openurl script that I believe will now open all .url files (unless MS do them differently in Windows Vista). If you want to open .url files in something other than your default browser, replace "defaultbrowser" in this script with whatever command you want to use eg "Dillo" or "Firefox"...
-/root/Choices/MIME-info/microsofturl and /root/Choices/MIME-types/text_url that make Rox use the script to open .url files when you click on them.
-/usr/local/share/Choices/MIME-icons/text_url.xpm to give .url files an icon.
PUPPY 2.13 AND ABOVE (Rox 2.x)
I do not understand how mimetypes work with Rox 2.x, so I only made a package that works with Rox 1.2, found in Puppy up to 2.12
In Puppy 2.13 upwards, or if you have installed a newer version of ROX than came in Puppy, you can install the package, but will have to manually set the run action and icon for .url files using the right-click menu in a ROX window. For the run action just add openurl at the start of the command and click the button to use the command. I believe when you set an icon there is an option to use it for all of that type of file.
PROBLEMS, IMPROVEMENTS ETC
Please tell me if you find any problems with it, or even better, post a fix yourself
Post the contents of any .url files that it will not open.
If you like, you are encouraged to:
- make a new icon - I just discovered that this one looks awful if you don't have medium sized icons/thumbnails in ROX, and also is a bit overpowering in a folder full of .url files.
- package it properly as a Dotpup or whatever.
- port it properly so that it works in Puppy 2.13 upwards automatically.
- tell me how to rewrite it so that when you open a file you can either use the default browser, or choose another one.
---------Done but if you can make it work all the time with Firefox and Mozilla please do-----------
tell me how to rewrite it so that you can run it from the command line with multiple input files eg:
Code: Select all
openurl *.url
Code: Select all
opera *.url
Original post follows
----------------------------
This is what you do if you want to be able to click on Microsoft .URL files to open them in your default browser:
1. Make a text file called "microsofturl" (or actually called whatever you like) in /root/Choices/MIME-info/ (you might have to make the folder too).
Put in it this:
# Mime type for Microsoft .url
text/url
ext: url URL
2. Make a text file called "text_url" in /root/Choices/MIME-types/
Put in it this:
url=`tail +2 "$1" | head -n 1`
url=`echo ${url#URL=}`
exec defaultbrowser $url
3. Restart X or your computer or go into the ROX options (from the right-click menu in a ROX window)->Types->Re-read files
It should now work.
IMHO this should be built into Puppy
Ideally we should put the second file somewhere where it can be run from the command line (and call it something like "openurl"), and put a link to it in the MIME-types folder - in Puppy 1.x it will disappear from /bin on reboot, and I am not sure the most appropriate place for it - help anyone?
I might make a dotput (or someone else can), but just want to see if anyone thinks I should change anything first.