To run Zoë as a service on
Linux/Unix:
- You can run Zoë as a service under Linux/Unix by a adding start/stop script for Zoë to your init.d directory. This will allow you to start and stop Zoë with simple commands, and insure that Zoë starts automatically when your server restarts. You can dowload the start/stop script from InVisible? Blog at http://blog.invisible.ch/files/zoe.txt.
- You may want to add the command line option to specify a user for Zoe (Duser.name=username) to the start section of the script. Example:
- /usr/local/jdk1.5.0_01/bin/java -Duser.name=larry -jar Zoe.jar daemon > /dev/null 2>&1 &
- Copy the script to your /etc/init.d directory and adapt the paths to match your systems. You can locate your java installation by typing "locate java". Make the file executable and owned by root ("chmod +x file" & "chown root file"). Then use your distributions mean of activating them in the rc. scripts. On Red Hat Fedora and others, you should be able to start and stop zoe by typing "/sbin/service zoe start" or "/sbin/service zoe stop."
To run Zoë as a service on
Windows NT/2k/XP:
Note: These instructions for running Zoe as a service on Windows are intended for advanced users . And it of course needs full priviliges to the machine.
- This is using the srvany software from the Microsoft NT/win2k/XP resource kits. If you don't have instsrv.exe and srvany.exe download them from [this Microsoft FTP server]
- Place these two files either in your main Zoë folder, or in your %windir%
- Open a command prompt (cmd.exe) and cd your way to your Zoë folder
- Execute the command-line:
instsrv.exe Zoe srvany.exe
- You should get positive feedback (hopefully):
Create Service SUCCESS at creating: Zoe
If you got an error "instsrv.c: Error 1057 from CreateService? on line 103" it is because your Administrator account is not named "Administrator"; simply rename the account, create the service, then rename it back to it's original. Then in the service control panel applet, you will have to manually change the Log On credentials to that of the renamed administrator account (it will subsequently grant this account the "Logon As Service" right).
If you get an error "The fully qualified path name to the .exe must be given, and the drive letter must be for a fixed disk (e.g., not a net drive)", then you need to use:
instsrv.exe Zoe c:\installed-path\srvany.exe
- Launch the regedit.exe tool, go to the following key: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet??001\Services\Zoe
- Create a new sub-key under this key: Parameters
- In the (new) Parameters key, create a string value Application and give this the path to the Java runtime you are using (something like "C:\Program Files\Java\j2re1.4.0_01\bin\javaw.exe") you don't need quotes around the path.
- Another String value in the same key: AppParameters Set this to -jar zoe.jar daemon
- Another string value in the same key: AppDirectory Set this to the Zoe folder.
- Go into the control panel > admin tools > services and set the settings to your likings (it should perhaps be set to not interact with desktop)
Running Zoe as a service at low priority
After setting up and running Zoe as a service, and verifying functionality, download the AINTX Toolset from
http://www.dwam.net/docs/aintx and copy the nice.exe executable to your main Zoë directory. Then change the following two strings in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Zoe\Parameters
Application: <full path to nice.exe>
AppParameters: -1 "
<previous value of Application string> <previous value of AppParameters string>" (with quotes)
then execute
net start zoe and verify your java vm was started at low priority using the windows task manager
Note: If using this method, in order to
manually restart zoe, you must shutdown the service (e.g.
net stop zoe ) and
then shutdown zoe via zoe's preferences page (
http://localhost:10080/preferences/-/shutdown). After waiting for it to finish, you can restart the service via
net start zoe.
Note
Following the directions above resulted in Zoe being launched by the '
system' and not my own user. This meant that Zoe did not load my profile, my email or my prefs :(
Fortunately, this can be easily resolved:
It's not the software, dummy
Learn the proper usage of services and which account they run under.
enable user logins
- by disabling 'log in automatically from localhost' and providing a password
- This way, regardless of what account Zoe is running as, you can still login under your own name.
forcing Zoe to use a specific username
see Multiple Users for more details
- Go to regedit.exe and navigate to the key:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Zoe\Paremeters
- find the key: AppParameters Set this to -Duser.name=YourUserName -jar zoe.jar daemon Firewall Installation