Create .url files when drag and drop from browser instead of .desktop

I used to drag-and-drop links from the browser in Windows to a folder to save them. That created files with extension .url, and the content is like:

[InternetShortcut]
URL=https://askubuntu.com/

When I drag-and-drop the link from browser in Ubuntu to a directory it creates a .desktop file instead of .url file and the structure is like:

[Desktop Entry]
Icon=text-html
Name=https://askubuntu.com/
Type=Link
URL[$e]=https://askubuntu.com/

I was able to find a way to open up my .url files in Ubuntu when double-clicking them (found the solution here for that: https://devio.wordpress.com/2020/03/22/opening-url-files-in-ubuntu/), but I couldn’t find a solution how I could continue saving the links as .url files instead of .desktop files in Ubuntu.
I found the same question here, and wanted to write this as a comment to that, but I don’t have enough points to comment yet:
How to save a website link as a .url / .webloc file instead of .desktop [NextCloud LinkEditor compatibility]

It would be really useful if I could drag-and-drop web links to save them as .url files so it can be cross-platform compatible.

Thanks

Answer

Attribution
Source : Link , Question Author : Steven , Answer Author : Community

Leave a Comment