Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

xdg-mime command for window managers

I don't use a desktop environment for most of my desktop systems, I use the fluxbox (my blog posts) window manager. It hasn't changed since before I started using it, and probably won't ever. I think it's mostly dead, but that also means it won't ever change! I did start packaging the latest (probable) upstream (github) along with a patch I wrote for myself though.

So, because I don't use a desktop environment, and I had forgotten I could use my package of mime_types_editor or anything similar, I had a small problem when I try to use the "open directory" function beside a downloaded item in my web browser. So this command solved that for me:

xdg-mime default xfe.desktop inode/directory

And also to help myautomount tray icon menu:

xdg-mime default xfe.desktop inode/mount-point
Update 2023-11-08

For dvds, particularly with myautomount:

xdg-mime default vlc.desktop x-scheme-handler/dvd

Which adds to your mimeapps.list:

[Default Applications]
x-scheme-handler/dvd=vlc.desktop

Comments