#!/usr/bin/perl # Script to make Microsoft Windows Internet Shortcuts (*.url) work on Linux. # from http://ubuntuforums.org/showthread.php?p=3281092 # 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 = 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 "xdg-open $url &";# or die "$0: Could not open $netscape\n"