Open .url files by a click

If you have lots of links/bookmarks in the form of Windows files .URL and you want to reuse them on Linux, it only takes a bunch of seconds.

Create an empty file, e.g. openurl.sh and put these 2 lines into it

#!/bin/bash
sed 's/^BASEURL=/URL=/' "$1" | grep -m 1 '^URL=' | sed 's/^URL=//' | sed 's/\r//' | xargs xdg-open

set it as executable with

chmod u+x openurl.sh

then click on a .url file and choose “open with other applications…” and select that bash script. From now on you can click a .url and the default browser will immediately open the webpage it points at.