KGS CGoban File Association

    Keywords: Software

How do you associate SGF files with the KGS CGoban client, particularly the WebStart version?

Windows 7

Run the CGoban link and installation from the KGS web page if you have not already done so.

If the file extension is not already associated, right click any .sgf file and choose "open with". You will be prompted with options for programs used to open these files, choose the "chose default program" option then using "browse" locate and choose the CGoban shortcut from your desktop. The sgf file extension should now be associated appropriately.

Windows Vista

With the newest version of CGoban (3.4.2) vista was no longer launching CGoban correctly when I tried to open a .sgf file. I tried several times removing and reinstalling cgoban but that didn't seem to work and I couldn't figure out how to specify the entire command (javaws with the cache file as shown below). What ended up working for me was deleting the file association from the registry.

WARNING: Don't attempt to edit the registry if you don't know what your doing; it can irreparably damage your system.

The location was: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.sgf

Windows XP

usagi: this section was updated for SP3 in 2010. I can't vouch for the accuracy of the other sections, but this worked for me on Windows XP SP3.

Using Java Web Start

  1. Install CGoban3 using Java Web Start.
    • You will notice an icon appears on your desktop called "CGoban3".

this doesn't work. sometimes there is no association created with .sgf file, and no icon created How to correct this ?

This is the solution:

1) delete all files in Java cache Under windows 7: Il faut virer les fichiers dans le cache Java C:\Users\moi\AppData?\LocalLow?\Sun\Java\Deployment\cache\6.0 delete all files and all directories (it will be re-created)

2) Reinstall CGoban, and then the icon reappears on the desktop and .sgf association with CGoban reworks

  1. Open the properties of that new shortcut on your desktop.
    • It will look something like this:
    • C:\WINDOWS\system32\javaws.exe -localfile "C:\Documents and Settings\Administrator\Application Data\Sun\Java\Deployment\cache\6.0\54\21086f76-442c41bc"
  2. Copy this information into a new batch file somewhere on your system.
    • I suggest c:\Program Files\CGoban3\editsgf.bat
  3. Append the switch " -open %1" to the end of that file.
    • Notice there are no quotes around %1 - the system should add them for you.
  4. Voila! Now, follow the instructions below to set .sgf association to "editsgf.bat %1".

Using java.exe and a .jar file (Offline Installation)

  1. In Windows Explorer, in the Tools menu, select Folder Options.
  2. Choose the File Types tab. Find the SGF file type listed.
  3. Make a new file type for the SGF file type, or edit the one which is already there.
    • Click "Change" for "Opens With", or click "Advanced" to create a new Action "Open".
  4. Edit into the program box an action like the following:
"C:\{path to java.exe}\java.exe" -jar "C:{path to Application Data}\Sun\Java\Deployment\cache\\cgoban.jar" -edit "%1"
  • You will have to modify that based on how your specific system is set up, of course!
  • You can use Windows Search (Start > Run > Search) to find where files are. Look around.
  • (of course, if you are following the web start instructions you will have simply copied and pasted the info from your desktop shortcut.)

usagi: You may need to change -edit to -open and remove the quotes around %1 on some XP systems.

Windows 2000

Windows 98

Linux / Unix variants

Create a shell script called containing the following:

if [ "$1" ]; then
	javaws -Xnosplash -arg "$1" [ext]
	javaws -Xnosplash [ext]

Make your launcher run this script, and associate it with .sgf files. Whenever you double-click an SGF file from now on, it will load in CGoban.

Mac OS

By itself, the CGoban3 application for Mac OSX does not support opening of SGFs (although it will associate itself anyway). A partially satisfactory workaround has been implemented.

2011: Similar techniques discussed in [ext] this thread. I am using it happily -rubin427

Old Text, delete later when this page gets well developed:

In windows, if you know pretty much what you're doing, and it just doesn't seem to associate properly, add the switch -home="c:\dir\where\cgoban\is" to the application line in the file types association for saved go games/sgf files, or whatever it is cgoban calls it exactly. If that makes no sense to you, reinstall the sucker and check the box to make it your default sgf editor!-TJ +

I use CGoban2 with Webstart on Windows XP. When I start the program, it asks me to associate the .sgf type with CGoban2. However, if I say "No", it will ask me everytime I start again. As I use another program for SGF editing, how to tell CGoban2 to NOT associate and NOT ask everytime it starts? The extra window you need to click away is somewhat annoying.

KGS CGoban File Association last edited by on March 18, 2017 - 14:19
RecentChanges · StartingPoints · About
Edit page ·Search · Related · Page info · Latest diff
[Welcome to Sensei's Library!]
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Login / Prefs
Sensei's Library