Notha thing!
Say you have your two instances of D2OL installed and working, but want to use the background controller:file method..
Well you better be pretty comfortable with the command line and doing things in Terminal.
You will also need to change the
Info.plist file again.
INSIDE the bundle of your *second* D2OL install, change the actual executable from
D2OL to
D2OL2.
The path to this file is
SengentD2OL2.app/Contents/MacOS/D2OL
You only need to change your second client since the silly file controller checks for a process running called D2OL and quits if it is there, assuming it is another copy of itself..but we actually have 2 different installs.
Then in the
Info.plist back up there in
Contents, you will need to change the
CFBundleExecutable key's string to match (change from D2OL to D2OL2).
Now you can set up a launcher that looks like this:
#!/bin/sh
cd /Applications/SengentD2OL.app/Contents/MacOS
/usr/bin/nohup /user/bin/nice -n -20 ./D2OL controller:file &
cd /Applications/SengentD2OL2.app/Contents/MacOS
/usr/bin/nohup /user/bin/nice -n -20 ./D2OL2 controller:file &
put the above in a file (as plain text with unix linebreaks) and call it
d2olLauncher or something and stick it in your home directory (obviously the paths and names have to match the actual paths/names of your clients).
Then in your home directory, make it executable
chmod a+rwx ./d2olLauncher
and as root
sudo -s
you can launch both (you quit the GUI versions first right?) by doing
./d2olLauncher
This means you can also set up a crontab to launch them for you at reboot and have them run in the background.
The crontab file would look like
@reboot /Users/you/d2olLauncher
where
you is your short login name (look in /Users)
save that as
d2olTab
then as root
sudo -s(in case you forgot)
set it as root's crontab
crontab d2olTab
The crontab tells your machine to run the launcher at boot time.
You have to set it as root's crontab to take advantage of the super high CPU usage settings.
The launcher changes to the directory INSIDE the app bundle with the D2OL executable and then fires it off with nohup(cant be killed by logging out or dropped connections), a nice value of -20 (hog all the CPU as much as you can) and use the controller:file version of the D2OL app and run in the background (&

.
Then it does the same for your second client.
When using this method of controlling D2OL, you may want to switch the
NSUIElement key's string value back to 1 to make the dock icons disappear again if running on
Jaguar since the gui wont launch when you click on them anyway.
To control the clients, you use the
control.prp file inside the app's bundle.
The path is
SengentD2OL.app/Contents/MacOS/control.prp
The file itself contains comments on what each item does.
Basically, to stop the agent you open the file, change the
Shutdown=false line to
Shutdown=true and save it.
This will cause that client to shutdown, pretty quickly too.
Remember to do it for both clients if you want to shut them both down.
As soon as they are stopped, (verify with
ps awwwux | grep D2OL) change the Shutdown tag back to false. If you forget, you can't launch the clients again as they will just quit. So change them back right away.
You can also show the GUI with that file, just read through it to see how.
The nice thing about running it this way is it is pretty much invisible and you don't really see it running so it can't get in your way (except for that it is hogging all the CPUs).
You can do this if you have only one client too and you dont have to change anything inside the app bundle.
In the Launcher you can also change the priority(niceness) if you like, or leave that part out of your launcher.
20 is CPU friendly: let everything else go first
0 is normal: use as much as it wants without getting in the way of other stuff
-20 is number crunching takeover: use all the CPU slowing other processes
Just to help ease confusion, here is a heirachy view of my 2 installs showing important files only.
Code:
/Applications
SengentD2OL.app/
Contents/
Info.plist - This is the file that has applications settings
jre/
MacOS/
agent.icns
com/
control.prp - This file controls D2OL when running in background
D2OL - This is the actual D2OL executable
launch.xen - This file has the java property settings
lib/
node.icns
org/
README.TXT - Directions for running the D2OL
res/
lots of prp files for D2OL's settings
node.prp - This is your node ID, copy before reinstalling
xen.prp
PkgInfo
Resources/
SengentD2OL2.app/
Contents/
Info.plist - This is the file that has applications settings
jre/
MacOS/
agent.icns
com/
control.prp - This file controls D2OL when running in background
D2OL2 - This is the actual D2OL executable(renamed)
launch.xen - This file has the java property settings
lib/
node.icns
org/
README.TXT - Directions for running the D2OL
res/
lots of prp files for D2OL's settings
node.prp - This is your node ID, copy before reinstalling
xen.prp
PkgInfo
Resources/
Enjoy.