R
R
redcircle2018-01-27 03:29:39
linux
redcircle, 2018-01-27 03:29:39

How to run an application on Linux in X that processes a specific MIME?

You need to run an application in X that is the default handler for a specific MIME type,
such as text/plain or application/vnd.oasis.opendocument.text.
Actually, I have already found a crooked solution:
1st step: xdg-mime query default TYPE
Outputs the application as a desktop file
For example, for text/plain: gedit.desktop, for application/vnd.oasis.opendocument.text: libreoffice-writer. desktop
The 2nd step is already crooked: open /usr/share/applications/DEKStop FILE, parse, look for the Exec line, run ...
But there are a few "buts", for example, it's not a fact that the desktop file will be exactly in / usr /share/applications/ in general.
Actually the question is, is there a utility that launches the xyz.desktop file without specifying the full path?
Or another easy way to get a executable program by MIME?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SOTVM, 2018-01-27
@sotvm

As I understand it, ~/.config/mimeapps.list is read from the beginning
, and after that, what the dokhtor registered in it is launched.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question