How can I check which application opens a file by extension?

a1an

I am on a debian 9 system with unknown desktop environment (ssh access). How can I find out which program is used by default to view a file with a given extension (e.g. pdf)?

Edit: Since extension is not important to the decision, the mime type of the given file can be found by using file

file -i file.ext
Ignacio Vazquez-Abrams

Ask xdg-mime.

$ xdg-mime query default application/pdf
atril.desktop

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How can I check which version of Angular I'm using?

From Java

How can I check file size in Python?

From Dev

How can I check for a file existence in XSLT?

From Dev

How can a Firefox extension check whether Firefox is the active application?

From Dev

How to check if Android can open a file by known extension

From Dev

How can I check if an object is a file with isinstance()?

From Dev

How can I check if a file is empty?

From Dev

How can I determine which extension is problematic, and how to resolve the exception?

From Dev

How can I check if the file is an excel file?

From Dev

How can I check which program is in focus?

From Dev

How can I check the LIB file version?

From Dev

How can I check a file is closed or not in python?

From Dev

How can i check if the file extension is uppercase or lowercase?

From Dev

How do I change which application opens xml documents by default?

From Dev

How can I check if a file is an image file without checking the path extension?

From Dev

How can I check uploaded files extension?

From Dev

how can I check which version of vim I have installed?

From Dev

How can i check a application is service application or not in vb

From Dev

How can I check if a gzipped file is empty?

From Dev

How can I check a compressed file for reliability?

From Dev

How can I check which JRE version I have?

From Dev

How can I open a binary file with extension .chk or no extension?

From Dev

How can I create a .desktop file that opens a directory in Nemo?

From Dev

How to check which application will open when I click on Launcher Icon?

From Dev

How can I check from a URL that an .html extension is present or not?

From Dev

Chrome Extension opens up all the specified links in contextMenus regardless of which option I am choosing. How can I avoid this?

From Dev

How i can convert video file to .mov file extension

From Dev

How can I retrieve a file path for file of a specific file extension?

From Dev

A laptop has got two graphic cards (Nvidia and Intel); how can I check which graphic card is using a particular application?

Related Related

  1. 1

    How can I check which version of Angular I'm using?

  2. 2

    How can I check file size in Python?

  3. 3

    How can I check for a file existence in XSLT?

  4. 4

    How can a Firefox extension check whether Firefox is the active application?

  5. 5

    How to check if Android can open a file by known extension

  6. 6

    How can I check if an object is a file with isinstance()?

  7. 7

    How can I check if a file is empty?

  8. 8

    How can I determine which extension is problematic, and how to resolve the exception?

  9. 9

    How can I check if the file is an excel file?

  10. 10

    How can I check which program is in focus?

  11. 11

    How can I check the LIB file version?

  12. 12

    How can I check a file is closed or not in python?

  13. 13

    How can i check if the file extension is uppercase or lowercase?

  14. 14

    How do I change which application opens xml documents by default?

  15. 15

    How can I check if a file is an image file without checking the path extension?

  16. 16

    How can I check uploaded files extension?

  17. 17

    how can I check which version of vim I have installed?

  18. 18

    How can i check a application is service application or not in vb

  19. 19

    How can I check if a gzipped file is empty?

  20. 20

    How can I check a compressed file for reliability?

  21. 21

    How can I check which JRE version I have?

  22. 22

    How can I open a binary file with extension .chk or no extension?

  23. 23

    How can I create a .desktop file that opens a directory in Nemo?

  24. 24

    How to check which application will open when I click on Launcher Icon?

  25. 25

    How can I check from a URL that an .html extension is present or not?

  26. 26

    Chrome Extension opens up all the specified links in contextMenus regardless of which option I am choosing. How can I avoid this?

  27. 27

    How i can convert video file to .mov file extension

  28. 28

    How can I retrieve a file path for file of a specific file extension?

  29. 29

    A laptop has got two graphic cards (Nvidia and Intel); how can I check which graphic card is using a particular application?

HotTag

Archive