You are not logged in.
Some time over the course of January Calibre stopped opening ebooks with the viewers I use (zathura, FBReader). Internal viewers work as expected.
The initial problem was the due to the lack of mime type defaults -- I believe there was a change in the free desktop standards recently. I use i3 so there is no desktop environment variable set and the generic opener within xdg-open was failing. After updating the mime defaults, using mimeo, zathura and FBreader open but without the showing the book.
Using
calibre-debug -g
and then trying to open a PDF from within Calibre produces an error such as this
error: Unknown file type: 'cannot open `/home/bashnev/documents/mathsci/P.%20R.%20Halmos/Naive%20Set%20Theory%20(2376)/Naive%20Set%20Theory%20-%20P.%20R.%20Halmos.pdf' (No such file or directory)'
To be clear, the file exists and can be opened from the shell with
zathura /home/bashnev/documents/mathsci/P.\ R.\ Halmos/Naive\ Set\ Theory\ \(2376\)/Naive\ Set\ Theory\ -\ P.\ R.\ Halmos.pdf
and from within ranger. So it appears the spaces being written as %20 in the path are the issue. Does anyone know how to fix this issue?
As I said up until recently there was no problem - Calibre and i3 were working together nicely. There are 2 workarounds both of which I would prefer to avoid:
Use the internal viewers
Toggle the option to "set space to underscore" (which I just noticed) which would help with future book additions and then go through the entire existing library and alter the paths
Last edited by bashnev (2016-01-20 13:37:40)
Offline
calibre just uses QDesktopServices.openUrl(QUrl.fromLocalFile(the_file))
It is all handled under the hood by Qt -- which urlencodes the filename, and passes it to xdg-open.
Try the following:
touch "/tmp/name with space.txt" && XDG_UTILS_DEBUG_LEVEL=2 xdg-open 'file:///tmp/name%20with%20space.txt'
It *should* work (it works for me, as does just using calibre) -- but for you it will apparently fail.
Which (broken) handler are you using on i3? Because the generic handler does work, as does gvfs-open.
Remembering this bug... exo-open used to be broken and prompted the same question, though it should be fixed now.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thanks for your help. It turns out that xdg-utils-mimeo was the problem. Installing xdg-utils from extra fixed the problem.
Offline
Well, I suppose that would do it.
mimeo needs to be fixed.
the commandline that xdg-open passes (as verified by /tmp/xdg-open with judicious use of echo) is
some_opener "file:///tmp/name%20with%20space.txt"
Last edited by eschwartz (2016-01-21 00:35:46)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
mimeo needs to be fixed.
done
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline