XDG-Open Configuration – How to Configure xdg-open Without Any Environment

arch linuxconfigurationfilesfreedesktopmime-types

I'm using OpenBox window manager without any desktop environment.

xdg-open behaves strangely. It opens everything with firefox.

$ xdg-settings --list
Known properties:
  default-web-browser           Default web browser

I'm looking for a simple program; something like reading every *.desktop file in /usr/share/applications/ folder and automatically setting xdg settings.

Best Answer

You can use perl-file-mimeinfo in the extra repository to manage mimetypes.

Example to open all .pdf files in apvlv:

/usr/bin/vendor_perl/mimeopen -d $file.pdf

and then, at the prompt, enter the application: apvlv.

Related Question