Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old 07-02-2017, 08:16 PM   #1
BigRobert
Junior Member
BigRobert began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Kobo Aura H2O
Calibre 3 as service auto start on Windows

Hi,

With Calibre 2.x I had a small script that made me access to my library from the Web by running Calibre server as a service and it was starting with Windows.

It's no longer working with Calibre 3.x.

I can access my library when Calibre is running on my computer but not when it's closed.

I'm not very good in coding, don't understand everything I code but I'm not so bad with cut and paste :-)

Any help will be appreciate

Last edited by BigRobert; 07-02-2017 at 08:18 PM.
BigRobert is offline   Reply With Quote
Advert
Old 07-02-2017, 10:44 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 31,412
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Since the syntax (options and arguments) of the calibre-server command has changed completely, you simply need to update your script to use the new syntax. If you cannpt figure out how to fo that yourself, post it here and hopefully someone will help.
kovidgoyal is offline   Reply With Quote
Old 07-03-2017, 07:35 AM   #3
BigRobert
Junior Member
BigRobert began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Kobo Aura H2O
Wow, didn't expect that M. Goyal himself will answer to my post

Here's what I did to create my service in Windows.

I use a program "winserv.exe" to create a service, with the '-start auto' option, the new service will always start on reboot

winserv.exe install ServeurCalibre -displayname "MyOwnCalibreServer" -description "Calibre Server to give access from web to my Calibre library" -start auto "C:\Program Files\Calibre2\calibre-server.exe" --port 8080 --username "xxxxxx" --with-library="C:\path to my library".

To kill the service:

sc delete MyOwnCalibreServer

That was working great with the Calibre 2.x version, hoping someone will post the syntax for the new Calibre 3.x
BigRobert is offline   Reply With Quote
Old 07-03-2017, 07:44 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 31,412
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
--username and --with-library no longer exist. See https://manual.calibre-ebook.com/gen...re-server.html
kovidgoyal is offline   Reply With Quote
Old 07-03-2017, 06:42 PM   #5
BigRobert
Junior Member
BigRobert began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Kobo Aura H2O
Works great now with this string:

winserv.exe install ServeurCalibre -displayname "MyOwnCalibreServer" -description "Calibre Server to give access from web to my Calibre library" -start auto "C:\Program Files\Calibre2\calibre-server.exe" --port 8080 "C:\path to my library"

Thanks M. Goyal
BigRobert is offline   Reply With Quote
Advert
Old 07-04-2017, 07:31 AM   #6
BigRobert
Junior Member
BigRobert began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Kobo Aura H2O
Still have a problem.

When I start server with this command, the database do not update.

If I access from the web when Calibre is open on my pc, everything is fine. But as soon as I close it, I'm back to the old version.

The only way to have an up to date db is to stop and restart the service.

Very strange. I don't know if it happened with Calibre 2.x
BigRobert is offline   Reply With Quote
Old 07-04-2017, 07:39 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 31,412
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You should not run the server and the GUI on the same library, because the server can also modify the library. So create a script that stops the server before launching the GUI and starts it after the GUI shutsdown and use that to run the GUI.
kovidgoyal is offline   Reply With Quote
Old 07-04-2017, 11:12 AM   #8
BigRobert
Junior Member
BigRobert began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Kobo Aura H2O
No idea how to do that, but thanks any away
BigRobert is offline   Reply With Quote
Old 07-04-2017, 12:25 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 31,412
Karma: 8154029
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I suggest you just have the GUI run the content server on startup and enable the system tray icon in Preferences->Look & feel. Then tell windows to run calibre on startup with the --start-intray option.

That way you dont have to worry about running the server as a service.
kovidgoyal is offline   Reply With Quote
Old 07-04-2017, 03:14 PM   #10
BigRobert
Junior Member
BigRobert began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2017
Device: Kobo Aura H2O
Enable the system tray icon in Preferences->Look & feel.

A small batch file like this:

start Calibre --start-in-tray
exit /b

Put in the windows startup directory. (Open with Run then Shell:startup)

Perfect

With bonus, you could manage users and passwords from the Calibre's GUI interface

I can't guess it was so simple

Thanks again for your help M. Koyal
BigRobert is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Editor generates Windows Navigation Start.wav sound u238110 Calibre 10 08-05-2014 01:45 AM
Windows Indexing Service and Calibre Performance Giuseppe Chillem Calibre 8 04-09-2013 06:01 PM
How to start Calibre on Windows in debug mode hakan42 Development 2 09-03-2012 01:45 PM
windows 7 +calibre - 2 start methods - 2 speeds ? cybmole Calibre 4 01-21-2011 04:58 AM
Can't start Calibre in Windows Robotech_Master Calibre 18 12-23-2008 01:35 PM


All times are GMT -4. The time now is 04:32 PM.


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