How to change which application Okular uses to open Markdown documents in a non KDE environment?
I’m using Linux Mint Cinnamon, which is GNOME-derived, but I use Okular because it’s the best PDF and Markdown viewer I know. However (long story) until recently I had a different application set as my default Markdown viewer in Cinnamon.
If I was viewing a Markdown document and clicked on a link to another Markdown document, it would open that document using my default viewer.
Recently I changed (in Cinnamon) the default Markdown viewer to Okular. But then I found if I clicked a link within Okular it would still open the document in the old default application. I tried removing that application and now when I click a link I get a dialog asking which application to use.
So I’m guessing that (reasonably) Okular doesn’t know about my Cinnamon defaults, and at one point somehow I got it to understand which application I wanted it to use, and now I can’t figure out how to change that.
What links cause this? Links themselves can also have default apps associated to them.
Links to Markdown documents.
just tell it to use okular… be sure to check the box that says “remember this setting” similar.
short of that there should be some way in mint to manage your default applications, find that settings page and bind your .md files to okular there.
When you say “it” what are you referring to?
As I already said, I have Okular set as the application to open Markdown documents in Cinnamon. But this does not affect how Okular behaves.
In Okular I can’t find any way to set the default application for opening Markdown documents. In the dialog that opens up when I click a Markdown link I can choose an application but there is no “remember this setting” box or anything like that.
i’m referring to the popup you mentioned.
are you saying changing that has no effect?
okular should be using whatever is defined by the OS for file associations, but i just tried opening a pdf and going to File > embedded files to open an embedded .xlsm file that it contained and it tried to open it with a music player.
and if go to my File Associations settings page in KDE and search for .xlsm i can see that the application associated with it fooyin, so i removed that and added libre calc and now when i click on the embedded file it opens in the spreadsheet app.
it should be similar in mint.
The Okular dialog I mentioned has no “remember this setting” box or anything like it.
But I do not have a KDE environment. Nevertheless, somehow Okular was previously defaulting to a specified application.
i just did this on mint 22 cinnamon by going to distorosea.com
so if you create a file called untitled.md on the desktop and the right click on it you will be able to edit the file associations for that extension.
set that to be your preferred viewer application for all .md files and also click the button that says make it the default.
now when you click on a link to any .md file in okular, what happens?
Exactly what I said above. That is exactly what I did at the start. Okular does not use the application set as the default in Cinnamon using that procedure.
Added: I discovered Okular no longer knows it should use itself to open PDF links, too; the dialog to choose an application opens. This despite my not having done anything to change what application opens PDFs.
Then I deleted and re-installed Okular. (Flatpak package, I should mention.) After which it does use itself to open Markdown links, as desired — but it still does not know it should use itself to open PDFs.
also install flatseal from the flatpak store and see if there are permissions you need to modify for it to work properly.
flatpaks are notorious for having permission issues when they involve close integration to the OS to work properly, which is why native applications for those tasks are usually better.