Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4511

How to open `.desktop` files containing a URL link in browser by default (instead of in gedit)?

$
0
0

Consider the following SomeLink.desktop file, which contains a link to some URL:

[Desktop Entry]Version=1.0Name=SomeLinkType=LinkURL=https://example.comIcon=text-html

I've made the file executable via chmod +x SomeLink.desktop and even tried to register it as trusted via gio set SomeLink.desktop metadata::trusted true.

However, when I double click the file in nautilus or use xdg-open SomeLink.desktop it opens in gedit for editing.

I would like to use these "link" files for their primary roles being links, i.e., the double click should in nautilus or xdg-open should open them in the default browser.

How can I achieve this?

Bonus: Any insights into why this is not the default behavior? It feels like a UX flaw to not handle them as one might expect (and I'm pretty sure that was possible for a long time in older Ubuntu versions, no?).

Ubuntu version is 22.04.


Viewing all articles
Browse latest Browse all 4511

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>