Feature request: native support for url files (.url & .webloc)

Hello!

URL files with .webloc and .url extensions are “webpage bookmark as a file”.

I think it would be really useful to get native support for URL files in GNOME/nautilus, as:

  • it is used is many cases to store URL (shared folders with MacOS*, shared URL from smartphone through Nextcloud**, website bookmarks in some projects folders or bibliography…)
  • it is very simple (a simple text file with the URL and some tags)
  • and yet it is a burdon to open the text file, select the URL, and then copy/paste it to the browser (especially when you have to open several of them)

Some workarounds do exist, but in a more bloated way than a native implementation would be, and with no support for most distributions.

Thank you!
M3.

*webloc files are common on MacOS
**see on this screenshot:

Hi.

I think this should work like any other file type: the handling application is responsible for opening them.

In this case, you want the web browser to open these files.

It looks like .url extension matches the application/x-mswinurl MIME type in freedesktop.org.xml.in « data - xdg/shared-mime-info - Shared MIME info spec (mirrored from https://gitlab.freedesktop.org/xdg/shared-mime-info)

But webloc is not found there, so a new MIME type would need to be added to the database.

There is nothing else needed from nautilus side. It will just work like any other file type, provided the type is known and the corresponding app is able to (and properly claims to) open that file type.

Hello,
Thank you for your answer. I’m going to check on freedesktop gitlab then.
(just curious why .url files open in text editor on my Debian GNOME…)

I suppose it’s because it’s a kind of text file. Since your system doesn’t have any app which handles .url files, it falls back to generic text file handling.

Well, when opening the URL file in the browser*, the browser saves a copy of it in the Downloads folder. It looks like the browsers does not recognize .url and .webloc files as web shortcuts…

*Firefox or Chromium/Brave

Right. They don’t have support for these files. If they did, it would just work, regardless of the file manager being used. You may want to try getting web browsers to correctly open these files.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.