This got deleted from KGSStatus?, but might be useful to some people, so I'm repeating it here:
I had a slightly interesting time getting it to work with linux and firefox. I think the point of the "Java web start" system is that it's supposed to be completely automatic, but firefox didn't know what a "jnlp" file was. The file needs to be opened with the "javaws" application, then everything else works just fine. The hard part was finding the path to javaws; on my system it turned out to be /usr/java/jre1.5.0_04/javaws/javaws, but it may not be the same for everyone.
Another slightly frustrating aspect of doing it this way is that I don't know how to start CGoban from the command line. I can start javaws, which will give me a window from which I can choose CGoban--but it's an annoying extra step, and means that I can't give CGoban a command line argument. If there's a better way, someone please tell me!
P.S. Ron Smith, whoever he is, has just told me that javaws has a '-open' flag--i.e, you can open an SGF file from the command line with something like
"/path/to/your/java/bin/javaws -open filename http://files.gokgs.com/javaBin/cgoban.jnlp"
Thanks also to glue for helping with this.
I don't use webstart.
The jnlp file is a xml file, you can open it in an editor.
The interesting parts are: codebase=" http://files.gokgs.com" and href="javaBin/cgoban.jar"
Knowing this, you can download cgoban3 from http://files.gokgs.com/javaBin/cgoban.jar
I made a script called cgoban3 with a command like this:
java -jar /path/to/cgoban.jar $*
Test the script with "cgoban3 -help". And you will get a usage window.
The options are:
-help: Show this message
-edit <file>: Bring up <file> in an SGF editor
-connect: Connect to the K Go Server
-nosplash: Don't create the opening title window
P.S. -nosplash does not work for me.
Here is my solution:
First off you need to locate your javaws:
locate javaws
I chose to use this one (remember for later):
/opt/jre1.5/bin/javaws
Now create a script for cgoban:
nano /usr/local/bin/cgoban
Contents follow (use your javaws in place of "/opt/jre1.5/bin/javaws"):
#!/bin/sh
if [ -z ${1} ] ; then /opt/jre1.5/bin/javaws http://files.gokgs.com/javaBin/cgoban.jnlp else /opt/jre1.5/bin/javaws -open ${1} http://files.gokgs.com/javaBin/cgoban.jnlp fi
Then set the script to be executable:
chmod 755 /usr/local/bin/cgoban
Now you should be able to type from the command line:
cgoban
It should start with no problem, next try opening an sgf:
cgoban pathto/some.sgf
If all works well, click on an sgf inside firefox and choose "open with" and browse to "/usr/local/bin/cgoban", click "Always perform this action" and hit ok. Cgoban should open your sgf in one click. :)
// damezumari @ gmail