How to set default application in XDG-open?

How to set default application in XDG-open?

If using xdg-open to open applications, then use xdg-mime to set the default application for a given mime type (typically, installing xdg-utils gives you the xdg-mime and related programs). Example changing the default file manager for opening directories (could choose caja.desktop (default for mint), nautilus.desktop (ubuntu), etc:

How to properly configure’xdg-open’in Perl?

You can use perl-file-mimeinfoin the extrarepository to manage mimetypes. Example to open all .pdffiles in apvlv: /usr/bin/vendor_perl/mimeopen -d $file.pdf and then, at the prompt, enter the application: apvlv.

Where is the desktop file in XDG-mime?

Troubleshooting: be sure that the “.desktop” file for a given application can be found, since that has to be used with the xdg-mime utility; e.g., Further, this silently fails to work as expected if the “.desktop” file does not exist:

How to set default application in Arch Linux?

I am using Arch linux. If using xdg-open to open applications, then use xdg-mime to set the default application for a given mime type (typically, installing xdg-utils gives you the xdg-mime and related programs).

How to open a subdirectory in Nautilus?

To open a directory and select a subdirectory/file in nautilus: Select specified URI in parent folder. 2. xdg-mime returns Thunar.desktop but xdg-open opens nautilus xdg-mime uses mimeapps.list to determine the default application to use.

Which is the default file in XDG-mime?

However, xdg-mime returns default1.desktop which is the first entry in our mimeapps.list file. In your case default1.desktop must be Thunar.desktop hence the output. However it is not installed on your system. So xdg-open opens your file/directories using nautilus which is present on your system.

How to use XDG mimeapps in Arch Linux?

mimeapps.list Path Usage ~/.config/mimeapps.list user overrides /etc/xdg/mimeapps.list system-wide overrides ~/.local/share/applications/mimeapps.lis ( deprecated) user overrides /usr/local/share/applications/mimeapps.l distribution-provided defaults