Page 1 of 2

KGS on Ubuntu

Posted: Fri Sep 16, 2016 12:31 am
by Yukontodd
I wrote up instructions for how to install the cgoban KGS client on Ubuntu on my blog that might be of interest. The information on the KGS website is sketchy, outdated, and contradictory, and I didn't find any other instructions around, so I thought what the heck...

http://goingshodan.com/how-to-install-k ... ntu-linux/

I hope it helps someone!

Re: KGS on Ubuntu

Posted: Tue Feb 21, 2017 10:02 am
by 3lhouse
I know this is old, just wanna say thanks! I'm a recent Linux convert (running ElementaryOS). Gonna try this!

Re: KGS on Ubuntu

Posted: Tue Feb 21, 2017 6:18 pm
by jeromie
A couple notes from recent experience:
  • At least on Ubuntu 16.04, the default jre (OpenJDK) doesn't place nicely with cgoban.jar. These instructions for installing the Oracle Java runtime are helpful and accurate: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04. At this point, Java 8 would be the best choice.
  • On Ubuntu, if you set the jar file as executable (via right click or the chmod command mentioned in the article) you can double click it to launch the file and it knows to use whichever Java installation is your current default. If you've got multiple versions of Java installed, you can set your default version via the following command: sudo update-alternatives --config java
  • cgoban.jar doesn't contain an interesting icon, but you can change that. In Ubuntu with Unity that's a simple right-click operation; there's probably something similar on your distribution.

Re: KGS on Ubuntu

Posted: Wed Feb 22, 2017 6:38 pm
by Fedya
On Ubuntu, if you set the jar file as executable (via right click or the chmod command mentioned in the article) you can double click it to launch the file and it knows to use whichever Java installation is your current default.

I've got Linux Mint, and I can't right-click to set the .jar file as an executable. Every time I try to open it, I get a folder with a bunch of stuff in it.

And right-clicking also doesn't give me the option to open with Java. Apparently I have to extract it and hope that it doesn't screw up overwriting the old version.

Re: KGS on Ubuntu

Posted: Wed Feb 22, 2017 8:50 pm
by jeromie
Don't extract it! It's an executable jar, not meant to be unzipped like an archive.

Apparently with Cinnamon (the default GUI for Mint), the process is a little more involved. You can do the following to make it possible to double click it to execute:

Right click the file > Open With > Other application > At the bottom is a place where you can set your own command, enter: java -jar
Then click on Set as default.

Note: That answer came from a bit of googling; I don't have the latest version of Mint in front of me right now, so I haven't tried this on my own. I can easily get it up and running, though, so if you have more problems I'm happy to help.

Re: KGS on Ubuntu

Posted: Thu Feb 23, 2017 2:42 pm
by Fedya
Thanks! That worked!

Re: KGS on Ubuntu

Posted: Thu Feb 23, 2017 3:34 pm
by zwim
I've already written a tuto on another thread, I will move it here.
Can you change the topic name from Ubuntu to Linux ?

Re: KGS on Ubuntu

Posted: Thu Feb 23, 2017 3:36 pm
by zwim
The latest CGoban 3.5.22 seems to have been compiled for java 8, so it won't run directly on some platforms that have java 7 or the corresponding IcedTea for that matter as default.
It is not necessary to install java 8 as a package, you can just download the JDK and run CGoban on it.

So here is the step by step if you are in this case : (in the following I assume, you are in your $HOME and download stuff there)

If you already have java8 skip this.
Download the latest JDK from http://www.oracle.com/technetwork/java/javase/downloads/

Code: Select all

$ sudo mkdir -p /opt/java/x64
$ sudo tar xvzf jdk-8u121-linux-x64.tar.gz /opt/java/x64/


Download the .jar file from KGS https://www.gokgs.com/

Code: Select all

$ sudo mkdir -p /opt/kgs
$ sudo cp cgoban.jar /opt/kgs
$ unzip -p /opt/kgs/cgoban.jar org/igoweb/igoweb/client/images/icon.png | sudo tee /opt/kgs/icon.png >/dev/null



To install on the desktop (Gnome)
If you already have javea8 chnage the line to : Exec=java -jar /opt/kgs/cgoban.jar

Code: Select all

$ cd ~/Bureau (or ~/Desktop)
$ vi cgoban.desktop

[Desktop Entry]
Name=CGoban
Exec=/opt/java/x64/jdk1.8.0_121/bin/java -jar /opt/kgs/cgoban.jar
Type=Application
StartupNotify=false
Comment=CGoban 3.5.22
Icon=/opt/kgs/icon.png


You should be good (at least if you are not the ones who are unlucky to have an additionnal issue with their archives, anyway you should be able to log as a guest).

Re: KGS on Ubuntu

Posted: Thu Feb 23, 2017 3:56 pm
by jeromie
zwim, I'm sure that information will help someone, but I'm curious: why go through the effort to avoid upgrading the default JRE to Java 8?

Re: KGS on Ubuntu

Posted: Thu Feb 23, 2017 5:08 pm
by oren
I made an ubuntu package for cgoban similar to the windows/mac ones that package a jre with it. Would it be useful for anybody if it was generally available?

Re: KGS on Ubuntu

Posted: Thu Feb 23, 2017 8:15 pm
by zwim
@Jeromie

This is why I asked for the post to be renamed Linux in general, not all people have Ubuntu and even though they don't necessarily have the same version of Ubuntu.

In fact I'm running LMDE2 and by default this is java7 installed and the packages for java8 are not available nor ppa.
Of course I could create a .deb package from jdk-8.121 with java-package but I prefer not to mess up with the system, since it is possible to just put it in /opt.

This is likely that other people have the same issue with Java so I put it in the tuto.
If you have already java8 or can install it via regular packages then you can skip the java section.

Re: KGS on Ubuntu

Posted: Thu Feb 23, 2017 9:42 pm
by jeromie
Makes sense. I didn't know there were distros without Java 8 readily available. Thanks for taking the time to explain!

Re: KGS on Ubuntu

Posted: Wed May 10, 2017 6:32 pm
by treeclimber
Hey, just a heads up that your whole domain is redirecting to http://goingshodan.com/cgi-sys/suspendedpage.cgi

It's happening on my desktop and laptop, so I think it's on your end.

Re: KGS on Ubuntu

Posted: Sat Dec 02, 2017 12:12 pm
by Moltyplop
Hi, I'm currently using cgoban.jar as my KGS client but I have no idea where does it save the games when I try to. It's been quite annoying, does anyone have any idea?

Re: KGS on Ubuntu

Posted: Wed Mar 14, 2018 1:14 pm
by Marathon
For me, it tries to save in my user home directory.

Code: Select all

/home/marathon/

for example.

It uses a standard dialog. If you save a game, you should be able to note the subdirectory, and, if needed, expand the directory tree so you can see the whole path.

By the way, I almost always go through some subdirectories to get to where I want the games to be saved. It used to remember the last subdirectory I used, but it doesn't do that anymore. I prefer that it remember.