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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-22-2010, 04:11 AM   #1
sherman
Addict
sherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animals
 
Posts: 265
Karma: 6566
Join Date: Aug 2008
Location: New Plymouth - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo
A Howto: Running Calibre Content server on Windows Startup

Hi folks, I thought I'd share with you my method of running the standalone calibre content server at windows startup.

This particular method works for Windows Vista/7, and probably XP as well. It may not be the only way to accomplish this task either.

The Steps

Open the Task Scheduler (Start orb > type "task" in the search > select "Task Scheduler" from list)

Choose "Create Task" from the menu at right.

Give the task a meaningful name and description.

Select the "Run whether user is logged in or not" radio button.

On the "Triggers" tab, create a new trigger. From the dropdown list at the top select "Startup", and click "Ok".

On the "Actions" tab, create a new Action. You want to "Start a program". In the "Program/Script" box, insert the location of the calibre-server program. This can usually be found in the following places:
32-bit Windows: C:\Program Files\Calibre2\calibre-server.exe
64-bit Windows: C:\Program Files (x86)\Calibre2\calibre-server.exe
If you want to pass additional options to calibre-server (eg: username/password), put these in the "Add arguments (optional)" box. Refer to the calibre-server help for information on these options. Click "Ok"

If your PC is going to be on for several days at a time, select the "Settings" tab. Uncheck the checkbox that says "Stop the task if it runs longer than:".

Click "Ok" to create the new task. You will be asked for your Windows User password - put this in to complete creating the task.

Now, either right-click the task and choose "Run" or reboot the PC to run the task.

Finally, to ensure the content server can be accessed over the network, we need to add calibre-server to the list of exceptions in the Windows Firewall. Somewhere within the Vista/7 control panel or security center there is an option to "Allow a program through Windows Firewall". Click the "Add another program", browse to the location of calibre-server.exe and add it.


So why would I want to do this?

Running the Standalone content server is useful if you don't want to have the main calibre program running constantly. Running calibre-server by double clicking it however means that you have a constand command window taking up space. You also have to remember to run it whenever you log in.
Calling it from a batch file placed in the startup folder also works, but again, you still have a command window floating around. Also both methods require you to login to your system.
Using the task scheduler method brings the content server up at Windows startup, without requireing the user to be logged in, and doesn't display a command window.

Of course, if Kovid were to implement running the content server as a windows service....

Last edited by sherman; 02-22-2010 at 04:14 AM.
sherman is offline   Reply With Quote
Old 02-22-2010, 04:44 AM   #2
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80446
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
What happens if I were to start Calibre while the content server already runs?
Manichean is offline   Reply With Quote
Old 02-22-2010, 05:34 AM   #3
sherman
Addict
sherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animals
 
Posts: 265
Karma: 6566
Join Date: Aug 2008
Location: New Plymouth - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo
Quote:
Originally Posted by Manichean View Post
What happens if I were to start Calibre while the content server already runs?
So long as you don't have the "Run server automatically on startup" checkbox checked in the main calibre preferences, or start the server from the same preferences screen, there shouldn't be any problems.

What happens if somehow both are active at once? I haven't a clue. Maybe Kovid can answer that one.
sherman is offline   Reply With Quote
Old 02-22-2010, 11:42 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: 25,408
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can't run two content servers at the same time, on the same port.
kovidgoyal is offline   Reply With Quote
Old 02-22-2010, 11:43 AM   #5
sherman
Addict
sherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animals
 
Posts: 265
Karma: 6566
Join Date: Aug 2008
Location: New Plymouth - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo
Quote:
Originally Posted by kovidgoyal View Post
You can't run two content servers at the same time, on the same port.
I thought that would be the case, which is why I I'm careful to run only one only one or the other at a time.
sherman is offline   Reply With Quote
Old 02-22-2010, 11:44 AM   #6
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: 25,408
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Basically whichever instance is run second will error out
kovidgoyal is offline   Reply With Quote
Old 11-12-2010, 02:29 PM   #7
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,085
Karma: 8499999
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
I use dropbox to keep my calibre library synced on multiple computers.
So I was wondering is it possible to run just calibre server using this method on one computer and manage the library from another computer or does the server also lock the metadata file.
Dopedangel is offline   Reply With Quote
Old 11-12-2010, 02:33 PM   #8
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: 25,408
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the server will also lock the file.
kovidgoyal is offline   Reply With Quote
Old 11-12-2010, 03:07 PM   #9
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,085
Karma: 8499999
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
So can the server be run with metadata.db named to something like server.db
I am not a programmer so am not sure if its even possible but maybe someone can run with it
What I am thinking is server uses that file and updates it after a specific time lets say every half hour. We wont get real time additions and changes but that it would allow to run the server on one computer and manage the library from another it would even work with shared network drives not just dropbox and other sync software
Dopedangel is offline   Reply With Quote
Old 11-12-2010, 03:08 PM   #10
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: 25,408
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can use an environment variable to control exactly what file calibre uses to load the db from, see the customizing calibre section of the user manual.
kovidgoyal is offline   Reply With Quote
Old 11-12-2010, 03:22 PM   #11
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,085
Karma: 8499999
Join Date: Dec 2006
Location: Singapore
Device: Coolreader(Nexus 5)\Coolreader(Nook Touch)
Ok thanks I have free time this weekend maybe I will try to read up on it and see if I can come up with something.

So what I have to do is use some kind of task scheduler that restarts calibre server every half hour actually I don't edit my files that much so can push it to once a day. And before starting calibre-server the server.db is updated with the latest metadata.db file.
I am writing this down so if anyone else has any Ideas please comment
Dopedangel is offline   Reply With Quote
Old 01-13-2011, 06:58 AM   #12
zzmijarevic
Member
zzmijarevic began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Apr 2010
Device: HTC HD2
On WinXP the solution is not working. I have tried some different approaches but with no success. Therefore, I started a new thread related to this post:
www.mobileread.com/forums/showthread.php?t=116256[/B]
zzmijarevic is offline   Reply With Quote
Old 03-01-2013, 12:19 PM   #13
henro
Junior Member
henro began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2013
Device: T30-p
Doesn't work for me

on Windows 8 64bit...............

Should it work?
henro is offline   Reply With Quote
Old 03-01-2013, 03:47 PM   #14
sherman
Addict
sherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animalssherman is kind to children and small, furry animals
 
Posts: 265
Karma: 6566
Join Date: Aug 2008
Location: New Plymouth - NZ
Device: Sony PRS-505/SC, B&N Nook, Sony PRS-650/BC, Kobo Glo
Quote:
Originally Posted by henro View Post
on Windows 8 64bit...............

Should it work?
I don't see why not.

However personally I've turned to the "run as a service" method myself.

I use the program nssm to quickly and easily run the content server as a service.

The only thing you need to be aware is that when updating Calibre, the service should be stopped, unless you don't mind having to restart your PC.
sherman 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 Content Server statiiq Calibre 12 09-05-2012 01:27 AM
Calibre crashes in windows on startup Jamz Calibre 12 09-17-2010 02:58 PM
Running Calibre on Terminal Server JeffAlan66 Calibre 2 08-12-2010 02:00 PM
Trouble running calibre-server ould Calibre 0 04-16-2010 02:18 PM
content server in calibre bruceOz Calibre 1 04-16-2010 04:23 AM


All times are GMT -4. The time now is 03:45 PM.


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