12-07-2010, 11:29 AM | #1 |
Junior Member
Posts: 5
Karma: 4348
Join Date: Dec 2010
Device: Kindle 3
|
Issue with Calibre Server - Windows
I would like my calibre server to run in the background, but, no matter what options I choose in the command line (including --daemonize) the command prompt window just stays open.
Is there a way on Windows to make it so the command prompt window won't stay up? thanks! |
12-07-2010, 11:32 AM | #2 |
creator of calibre
Posts: 44,344
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
--daemonize only works on unix. You dont have to run the server ina command prompt, you can run it by typing in the command line int he run box directly.
|
Advert | |
|
12-07-2010, 11:34 AM | #3 |
Junior Member
Posts: 5
Karma: 4348
Join Date: Dec 2010
Device: Kindle 3
|
Thanks for the reply!
I tried just running it directly (no switches) and it still does the same thing. I have Windows Xp x64 edition if that makes any difference. By the way I really love the program! |
12-07-2010, 11:36 AM | #4 |
creator of calibre
Posts: 44,344
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm not windows expert, but I'm sure someone who is will be along to help you in a bit.
|
12-07-2010, 11:59 AM | #5 |
Grand Sorcerer
Posts: 11,940
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
On win7 (and possibly older versions)
start /b calibre-server (options follow) will start the server with no cmd window at all. Other options can start it in a minimized cmd window Edit: XP 64 has the start command, and it supports the /B switch Last edited by chaley; 12-07-2010 at 12:14 PM. |
Advert | |
|
12-07-2010, 12:02 PM | #6 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Have it start as a planned task after system startup. Alternatively, create the calibre-server as a service.
|
12-07-2010, 12:06 PM | #7 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
There are programs that allow other programs to be run as a service. I haven't used them. If you're willing to just minimize on start, there are tricks to do that, too. |
|
12-07-2010, 12:38 PM | #8 | |||
Junior Member
Posts: 5
Karma: 4348
Join Date: Dec 2010
Device: Kindle 3
|
Quote:
Quote:
Quote:
sc create CalibreServer binPath="C:\Program Files (x86)\Calibre2\calibre-server.exe" Doesn't seem to work. It just shows me a list of options because I assume my syntax is incorrect. Any ideas? EDIT: Managed to create the service using this syntax: sc create CalibreServ binPath= "C:\Program Files (x86)\Calibre2\calibre-server.exe" The only thing I was missing was a space. But when I try to start the service it says "Error 1053: The Service did not respond to the start or control request in a timely manner" Last edited by jawadams; 12-07-2010 at 12:46 PM. |
|||
12-07-2010, 12:45 PM | #9 |
creator of calibre
Posts: 44,344
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
why dont you just use
calibre --minimize-to-tray and in the the calibre preferences set the content server to start at calibre startup and enable the system tray icon |
12-07-2010, 12:52 PM | #10 | |
Grand Sorcerer
Posts: 11,940
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Try running it from a new command box without the /B so another window opens and you can see what the errors are. My guess is that you have a port conflict, which happens if another instance of the server is running. |
|
12-07-2010, 01:02 PM | #11 | |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Quote:
|
|
12-07-2010, 01:33 PM | #12 | |
Junior Member
Posts: 5
Karma: 4348
Join Date: Dec 2010
Device: Kindle 3
|
Quote:
In Calibre I went to Look and Feel and enabled the tray. Enabled automatic startup of Server. Made shortcut to calibre.exe --start-in-tray in my startup folder. It does a quick splash then is in the tray. That works for me! Thanks! |
|
12-07-2010, 02:02 PM | #13 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
The splash screen can be disabled as well in the preferences, if you prefer a "silent" start.
|
01-13-2011, 06:51 AM | #14 | |
Member
Posts: 20
Karma: 10
Join Date: Apr 2010
Device: HTC HD2
|
Quote:
I have started a new thread related to this post: www.mobileread.com/forums/showthread.php?t=116256 |
|
07-17-2015, 08:25 AM | #15 |
Junior Member
Posts: 1
Karma: 10
Join Date: Jul 2015
Location: Carlsbad
Device: ipad
|
I have written a very simple .NET program for windows that starts up 2 calibre-server.exe processes for a couple of libraries and hides the command windows for the processes. Nothing to it if you can compile c# code. The path to the application is stored in processPath and the port number and library path is passed to the method StartProcess. Just edit to your application path, library path and port number you want to start with.
Code:
--- c# code --- using System.Diagnostics; namespace StartBookServer { class Program { static string processPath = "C:\\Program Files\\Calibre2\\calibre-server.exe"; static void Main(string[] args) { StartProcess(processPath, "-p 8080 --with-library \"D:\\Fiction\""); StartProcess(processPath, "-p 8081 --with-library \"D:\\Non-Fiction\""); } // run the process and hide the command window shutting down this app's command window (the '/c' added before the arguments apparently) private static void StartProcess(string processPath, string processArguments) { ProcessStartInfo si = new ProcessStartInfo(processPath); si.RedirectStandardInput = true; si.RedirectStandardOutput = true; si.UseShellExecute = false; si.Arguments = string.Format("/c {0}", processArguments); si.WindowStyle = ProcessWindowStyle.Hidden; si.CreateNoWindow = true; Process p = Process.Start(si); } } } Last edited by PeterT; 07-17-2015 at 09:24 AM. Reason: Wrapping code in a [code] block to preserve indentation |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre OPDS server with windows apps? | nickdma | Related Tools | 10 | 03-03-2024 02:53 PM |
A Howto: Running Calibre Content server on Windows Startup | sherman | Calibre | 26 | 02-17-2019 10:37 PM |
Calibre server | zzmijarevic | Calibre | 10 | 08-21-2010 06:40 AM |
Windows Develpment Environment issue | itimpi | Calibre | 20 | 01-17-2009 07:15 PM |