View Single Post
Old 01-05-2014, 10:18 PM   #20
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,493
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by tychothecat View Post
OK, after a bit of mucking around I'm giving up on Calibre Sync in favour of Calibre Library, as it a) connects via IP, not zeroconf/bonjour/avahi and as such will be able to be seen from the Internet once I configure my firewall, and b) it works with the calibre-server component (ie: as it doesn't rely on the wireless device connection component I don't have to do anything funky like using xvfb).

As an aside - I couldn't quickly figure out how to fire up Calibre via xvfb and also start the connection server. As such, that is possibly a dead-end anyway.

I haven't tried Calibre Companion, but from the description on the Play Store it appears to also rely on bonjour and as such doesn't appear a good option for headless, nor for general purpose access via the Internet.
Some misconceptions here.

First, although Calibre Companion (CC) can use bonjour and other discovery mechanisms, neither CC's wireless device connection nor its content server connection require their use. Both allow specification of an IP address and port.

CC's content server connection setup goes beyond IP/port, supporting connection using arbitrary URLS. A URL is most useful when calibre's content server is behind a reverse proxy, often meaning that there are file path components in addition to the address/port specification. In addition, you can supply a second connection specification that would be used when the content server is on a LAN behind a port-forwarding router that does not support port loopback (the vast majority do not). In this case the content server has two "addresses", one when inside the LAN and one when outside the LAN (on the 'net). I don't think that any other client gives you this level of flexibility.

Second: xvfb is required to run calibre's headless content server. It satisfies a calibre dependency for an output x-server. It is true that the headless server does no input, avoiding a passel of problems, and it is also true that starting the content server from the command line avoids a lot of complexity.

Finally, no matter which client you use, be sure that you handle the case where calibre's database changes underneath the content server. In some cases, especially when a delete-then-add file scheme is used (dropbox appears to do this), the content server does not see changes and therefore does not refresh. I solve this problem on my VPS by copying the database to /tmp (only the database) and using monit to watch the "real" database's timestamp.
Quote:
Finishing off, if anyone is reading this without having seen the various pages out there for headless Calibre implementations, check out something like

http://alt236.blogspot.com.au/2010/0...t-boot-in.html
There are many threads here on mobileread about how to set up a headless calibre content server on many different architectures. Searching for "headless" gave me four pages of threads.
Quote:
...and note that as chaley mentions, you can't daemonize the wireless device connection protocol, so don't attempt to use client apps that don't support hard-coding in the configuration of the Calibre server (IP : port and optionally user/pass)
Unless the client uses MDNS (bonjour), which (for example) Stanza does.

Two final notes:

1) DoctorOhh's comment about CC's multiple book download from the content server, such as "download all books in series X" or "download all books by author Y" is very pertinent. I know of no other client that supports this capability.

2) Although one can use CC uniquely with the content server, doing so gives up a lot of useful functionality. For example, the wireless device connection supports:
  • Automatic updating of metadata of the books in CC's library. Incredibly useful if you edit metadata frequently or forget what metadata you have changed.
  • Visibility and control of CC's library from within calibre.
  • Auto-sync of books when coupled with the reading list and/or smart eject plugins.
  • Auto-transfer of news.
chaley is offline   Reply With Quote