Forum for CGoban 3

Using cgoban3 with firefox and linux [#641]

Back to forum     Back to page

New reply

 
reply
xela: Using cgoban3 with firefox and linux (2006-09-19 06:17) [#2205]

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 [ext] http://files.gokgs.com/javaBin/cgoban.jnlp"

Thanks also to glue for helping with this.

reply
80.218.141.147: ((no subject)) (2006-09-20 22:39) [#2215]

I don't use webstart.
The jnlp file is a xml file, you can open it in an editor. The interesting parts are: codebase="[ext] http://files.gokgs.com" and href="javaBin/cgoban.jar"
Knowing this, you can download cgoban3 from [ext] 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.

X
Flower: Re: ((no subject)) (2007-03-07 18:05) [#3150]

I just started Cgoban3 with some command line switches as well and can confirm that -nosplash seems to be defunct. (Guess WMS does not expect anyone to use command line switches these days)

reply
162.8.230.35: Using cgoban3 with firefox and linux (2006-12-04 18:02) [#2500]

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 [ext] http://files.gokgs.com/javaBin/cgoban.jnlp
else
   /opt/jre1.5/bin/javaws -open ${1} [ext] 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

 
Back to forum     Back to page

New reply


[Welcome to Sensei's Library!]
RecentChanges
StartingPoints
About
RandomPage
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Goproblems.com
Login / Prefs
Tools
Sensei's Library