I know that I can use xdg-mime default codium.desktop text/plain
to change association for text\plain
mimetype ( Programatically modify file associations using standard interface (using mimetype) )
But for example file --mime-type -b index.ts
reports also text\plain
and xdg-mime query default text/plain
reports codium.desktop
But index.ts file is opened by "Qt Linguist". Unlike say wat.txt file that is opened as expected, by Codium.
As result xdg-mime default codium.desktop text/plain
has no effect whatsoever.
Is there some standard CLI option to override whatever sets such default? I am fine with it being Ubuntu specific or even Lubuntu specific. Though I would prefer it as broad as possible.
I know that I can set settings to something sane with GUI - but I want to add it to system setup scripts and avoid doing it manually on every system reinstall.
I now discovered ~/.config/mimeapps.list
that now contains line: text/vnd.qt.linguist=codium.desktop;
triggered by manual adding file association (no idea why .ts file is captured by Qt but...).
Running xdg-mime default codium.desktop text/vnd.qt.linguist
liberated .ts file from Qt tyranny and now opens in Codium as I want to happen with TypeScript files (fortunately I do not care about qt.linguist files at all, so misclassification is not affecting me)
So how can I see actual mime type? In cases where file --mime-type -b
fails?
Is text/vnd.qt.linguist
a mimetype?
I noticed that file properties GUI is displaying MIME type diverging from one reported by file --mime-type -b
. How can I get proper MIME type without using GUI?
xdg-mime query filetype Bicycle.validator.mapcss
worked perfectly. Due to some weird design I need to wait 23 hours to award bounty. – reducing activity Apr 12 '21 at 10:33