OzzyFrank
November 26th, 2009, 04:15 PM
Hi. A while back, I successfully used the guide for registering MHT web archives in this post: http://ubuntuforums.org/showthread.php?p=3311005#post3311005. The original purpose of the thread was on how to open .url internet shortcuts (what Internet Explorer puts on the desktop) in Firefox, so I gave it a go, expecting it to work as well as the other guide.
I've followed all the steps, but when trying to open an .url, Firefox will open, but instead of going to the web page, it gives me this error message:
Firefox doesn't know how to open this address, because the protocol (basehttp) isn't associated with any program.
You can read the whole guide via the link above, but here is the script:
#!/usr/bin/perl
# Script to make Microsoft Windows Internet Shortcuts (*.url) work on Linux.
# Oomingmak fixed version. This script now works properly.
# It no longer cuts off the last character of the URL.
# Open up the file
open(F,"<$ARGV[0]") or die "$0: Could not load Internet Shortcut file $ARGV[0]!\n";
# Find the URL
while($in = <F> and not $url) {
chomp($in);
if($in =~ m/\s*URL\s*\=\s*\S*\s*\015*/) {
$url = $in;
$url =~ s/\s*URL\s*\=\s*//; # Filter out the beginning stuff
$url =~ s/\s*\015+//; # Filter out the nasty DOS carriage return!
}
}
system "firefox $url &";# or die "$0: Could not open $netscape\n"
If you can see something obvious, please leave suggestions to rectify this. Obviously I've assigned Firefox to open it, which it tries to, so the rest of it is beyond my understanding. Cheers. Frank
I've followed all the steps, but when trying to open an .url, Firefox will open, but instead of going to the web page, it gives me this error message:
Firefox doesn't know how to open this address, because the protocol (basehttp) isn't associated with any program.
You can read the whole guide via the link above, but here is the script:
#!/usr/bin/perl
# Script to make Microsoft Windows Internet Shortcuts (*.url) work on Linux.
# Oomingmak fixed version. This script now works properly.
# It no longer cuts off the last character of the URL.
# Open up the file
open(F,"<$ARGV[0]") or die "$0: Could not load Internet Shortcut file $ARGV[0]!\n";
# Find the URL
while($in = <F> and not $url) {
chomp($in);
if($in =~ m/\s*URL\s*\=\s*\S*\s*\015*/) {
$url = $in;
$url =~ s/\s*URL\s*\=\s*//; # Filter out the beginning stuff
$url =~ s/\s*\015+//; # Filter out the nasty DOS carriage return!
}
}
system "firefox $url &";# or die "$0: Could not open $netscape\n"
If you can see something obvious, please leave suggestions to rectify this. Obviously I've assigned Firefox to open it, which it tries to, so the rest of it is beyond my understanding. Cheers. Frank