View Single Post
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: 262
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 online now   Reply With Quote