How can I without any manual GUI use check what will open file with a specific file extension - for example .rb?
Not a duplicate of how can I change file association globally? as mine is about programmatically reading, not changing in any way, including manual through GUI (though https://askubuntu.com/a/289339/349903 hints that parsing some set of config files may give an answer)
To avoid XY problem: I have system installation script, that works fine except that Okular ends associated with .rb, .py, .txt and other text files, instead of text editor. I want to rerun installation script and log what is now opening specific file extensions after every step. I hope that will allow me to debug what is going wrong.