Solved Okular PDF Reader :(

Solved issue

Goatmilk

Active Member
Joined
Jul 27, 2024
Messages
221
Reaction score
122
Credits
2,428
And another niggle:

I have a lot of pdf files in my Calibre library. On Windows 7, I had a portable pdf reader called "PDFxchange Editor" which opened all pdf books nicely and without any problems.

On Linux, I have a ghastly thing called "Okular", which cannot open a pdf book without throwing out a popup, saying

"Configuration file "/home/owl/.config/okularrc" not writable.
Please contact your system administrator."

WTF? Those are books, most of them downloaded from archive.org, Google books or Gutenberg. Besides, I am my system administrator. So what is the little bugger bleating about? It's Calibre, for crying out loud!

Okular doesn't have a problem with pdf files downloaded from the web (I often save useful pages as pdf to read again later), so why does it start making trouble with Calibre, of all things?
 
Last edited:


Calibre is a sort of digital library - it stores all kinds of ebook formats: epub, pdf, djvu, mobi, azw3 etc. You can read right on your computer - Calibre usually calls up readers for all formats - or transfer books on your eBook Reader, like my Pocketbook. epub is rarely, if ever, drm. azw mostly is.

epub is a very popular format, but pdf is wildly used when older books are scanned in. You can find pretty much everything which ran out of copyright on archive.org or google books, and there are tons and tons of worthwhile stuff.

So yeah, Calibre should have a decent pdf reader to call on when you want to read a book that happens to be in that format.
 
@Duck - looky here: https://calibre-ebook.com/ - if you love books and have a lot of them in digital form, Calibre is a godsend.

As for the Okular trouble, someone had the same problem, but unfortunately, the solution that helped him didn't work for me:
Code:
https://www.reddit.com/r/linux4noobs/comments/a11606/kubuntu_1804_okular_gives_error_config_file_not/

So I'm still looking for help here...


(Had to edit it several times because it wouldn't let me put the second link in as an url - it set a media box and half a mile of empty space beneath it. Finally put the url in a code box)
 
"Configuration file "/home/owl/.config/okularrc" not writable.

This might be trivial. In your file manager, navigate to that location. Well, to the top of that location - don't enter it.

Right click on the /okularc folder and select 'properties'. In there, there may be a 'permissions' section. If there is, make it writable. You can also do this with the terminal. Just search for 'Linux terminal how to make a directory writable'.
 
Disable firejail for Okular to check.

How? Have to look that up...

It might be that the fault is Calibre's. I also noticed that it has a different default epub reader than its old Win7 version - one I don't really like at all. So I thought I could get it to open up epub books in Foliate instead, which is my default epub reader.

Should have worked by simply unchecking epub in Calibre's Preferences > Interface > Behaviour. But it didn't - now it doesn't open epub at all.

So much for my cozy evening reading Benson's "As We Were"...
 
Seeing you open a thread about firejail earlier, maybe both are connected. Disable firejail for Okular to check.

Good catch. You may well be onto something with that.
 
This might be trivial. In your file manager, navigate to that location. Well, to the top of that location - don't enter it.

Right click on the /okularc folder and select 'properties'. In there, there may be a 'permissions' section. If there is, make it writable. You can also do this with the terminal. Just search for 'Linux terminal how to make a directory writable'.
It says the owner can "view and modify" - doesn't that mean it's writable? It's rw-
 
The pop up does not come with every pdf file - as of now, I have not found out yet what exactly differentiates them from each other. I drag Calibre along with me for years, there are about 1200 books in there
 
I have not found out yet what exactly differentiates them from each other. I drag Calibre along with me for years, there are about 1200 books in there
You have a lot of experience with it then. I don't. Perhaps, it is for storing bookmarks and the like, and you don't have those on many pdf. In any case, remember pdf can also contain malicious content. If you just downloaded them, be careful. If it is some you have in the library already, disregard that. Just saying.
 
firejail has --no-profile and --whitelist options. https://man7.org/linux/man-pages/man1/firejail.1.html
You might try to whitelist the folder in the error message first.
What I would try is to
Code:
firejail --whitelist /home/owl/.config/okularrc okular
and see what happens. Same with calibre, just replacing the application at the end. The command might not be the correct call (tbd), but perhaps helps to see if the error continues.
 
It seems it really was Firejail. As said, those manpages make my head spin, and as I couldn't find a way to take out one folder, I took out the whole thing

sudo firecfg --clean

And surprise, surprise: the popup was gone, AND the epub books opened up in Foliate.

I guess Benson can wait and I'll spend some time reading this website:

And then see where I'll go from there. Pity, though. Firejail seemed like such a good idea.
 
Pity, though. Firejail seemed like such a good idea.
It is a good idea, but your problem shows there are still teething problems with its profiles. The profile for an application should enable it's regular intended purpose, yes.
Edit: I missed the equal sign in the post above to test. It should read
Code:
firejail --whitelist=/home/owl/.config/okularrc okular
 
It is a good idea, but your problem shows there are still teething problems with its profiles. The profile for an application should enable it's regular intended purpose, yes.
Edit: I missed the equal sign in the post above to test. It should read
Code:
firejail --whitelist=/home/owl/.config/okularrc okular
I'm still not very experienced in Linux - as a matter of fact, I'm still a bloody rookie. Maybe I should look into Firejail again when I know the terrain a little better.

Thanks for all the help, guys!
 
Thanks for all the help, guys!

Did you try the command and, if so, did it work?

Or are you just going to give up on jails for the time being? If so, I'll remark that I haven't played with jails in a long time. I don't see a need to on a regular home computer.
 
Did you try the command and, if so, did it work?
Which one do you mean? If you mean Trml's suggestion (firejail --whitelist=/home/owl/.config/okularrc okular), then no, I didn't, because I had already done sudo firecfg --clean before I came back here and saw it.

That last command worked and solved the problem.

I should probably wait with setting a new firecfg again, maybe find out a way to only sandbox a few programs, not all of them. I mean, had that happened on Windows 7, I probably would have guessed what was going on, seeing as Firejail was the new thing. But here in Linux, everything is the new thing, and I just don't really know yet what the heck I'm doing if anything goes wrong.
 
Which one do you mean?
I was referring ot this one:


If it's working, that's good to know.
 
wow.
But here in Linux, everything is the new thing
Amen !....That hits the nail on the head.

You have handled that situation really well.
I also have calibre installed. I dont use it as it should be used. I download ebooks from uhhmm...a source, and once downloaded I double click on it to make sure it will open and can then be read.
An epub reader/etc which downloads with Calibre opens the book (ebook reader, Ebook writer, lrf viewer)....it simply pops open on mydesktop....I tuen a few pages to be sure that all is well....and then right click on the book, select 'send as attachment' ...and email it to myself.
I then open the book from my email using 'Books' ....an iphone app.

works perfectly. never had a failure (leaving out the fact that Bluefire Reader (epub reader) has fallen behind in updating itself in line with iPhones updates)

The difference in Calibre downloads....is likely because mine came from the Software Manager in Linux Mint.....whereas yours may have come from their website.

Linux is brilliant in that way.....if you are careful and put in quite a bit of thought, it is next to amazing what can be achieved.
 
Foliate
I don't see a way to alter font size etc

What am I missing?

Edit to add:....I found it. All good
 


Follow Linux.org


Top