Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-04-2019, 05:41 PM   #1
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
calibre 4 linux viewer symlinked .cache fail

This stopped working in calibre 4.

I run Ubuntu Mate 19.04 and I have the root fs on a NVMe drive and /home on a SATA SSD. To improve performance I have .cache on the NVMe (as /opt/.cache) and symlink that folder to ~/.cache.

I started doing this years back when I had the root fs on my first SATA SSD and /home on spinning rust. And I've kept doing it since then when the root fs is on a faster drive than /home. And it has never been any problems in any apps, including calibre. (I also have /tmp in RAM using tmpfs.)

However after upgrading to calibre 4 the calibre ebook reader can't open ebooks any more. I get this error:

Click image for larger version

Name:	PrtSc 2019-10-04 22-58-40.png
Views:	150
Size:	54.4 KB
ID:	173963

/opt/.cache/calibre/ev2/t/tmpezZNaM does exist and can also be accessed via the symlink as /home/anders/.cache/calibre/ev2/t/tmpezZNaM

By moving back .cache to ~/.cache instead of symlinking, everything is fine again. I can use the new calibre viewer fine.

But if possible I would like to continue be able to place ~/.cache on the fastest drive.

https://bugs.launchpad.net/calibre/+bug/1846834

Last edited by Adoby; 10-04-2019 at 05:45 PM.
Adoby is offline   Reply With Quote
Old 10-04-2019, 08:26 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Have you considered exporting XDG_CACHE_HOME in your profile instead?

(EDIT: Because I do, and that works on my end).

Last edited by NiLuJe; 10-04-2019 at 09:14 PM.
NiLuJe is offline   Reply With Quote
Advert
Old 10-04-2019, 10:41 PM   #3
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
Good one. I'll do that!
Adoby is offline   Reply With Quote
Old 10-05-2019, 05:52 AM   #4
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
I got a bit confused trying to figure out how to set XDG_CACHE_HOME the best way. With the least side effects.

I ended up creating ~/bin/calibre with the following contents:

Code:
#!/usr/bin/env bash
#Run calibre with XDG_CACHE_HOME set

env XDG_CACHE_HOME=/opt/.cache /opt/calibre/calibre
That way all other apps can continue using the default symlinked path ~/.cache and only calibre use /opt/.cache

And everything works fine again, the way I am used to...

Edit: ... and Kovid has already fixed the bug so that the symlink will work OK in the next release. So my "work-around" won't be needed for long. Fantastic!


Last edited by Adoby; 10-05-2019 at 06:02 AM.
Adoby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux & Calibre 3.46.0 - viewer starts up weird bgeer Calibre 4 11-28-2019 12:39 AM
The Cache files in calibre Dopedangel Calibre Companion 8 02-17-2017 01:58 AM
Ebook-viewer: fail when opening an ePub from Firefox Jellby Calibre 9 05-17-2015 12:41 AM
Cache question re: Calibre Library Android app martyh Devices 2 09-07-2012 12:55 AM


All times are GMT -4. The time now is 06:18 PM.


MobileRead.com is a privately owned, operated and funded community.