Get the latest tech news
Emacs dired-mode as a file manager
How to setup emacs dired-mode in xdg-mime, specifically for file management.
If you wanted to duplicate your setup on a new laptop, for example, you would have to either note down this change you made or run into it again, hopefully remember your solution, and then reproduce it. To expand, just add a new xdg-desktop-entry that runs whatever script you wish, and then tie it to a MIME type in the default list. Mime TypeApplication Typeimage/jpegimage viewerimage/pngimage viewerimage/svgimage viewerimage/webpimage viewertext/plaintext editortext/htmltext editortext/x-makefiletext editorapplication/pdfpdf viewerx-scheme-handler/httpbrowserx-scheme-handler/httpsbrowser There are more, but if you are using a minimal system and want full control this will give you a good starting point.
Or read this on Hacker News