Life In 19x19
http://lifein19x19.com/

KGS on Ubuntu
http://lifein19x19.com/viewtopic.php?f=24&t=13591
Page 1 of 1

Author:  Yukontodd [ Fri Sep 16, 2016 12:31 am ]
Post subject:  KGS on Ubuntu

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!

Author:  3lhouse [ Tue Feb 21, 2017 10:02 am ]
Post subject:  Re: KGS on Ubuntu

I know this is old, just wanna say thanks! I'm a recent Linux convert (running ElementaryOS). Gonna try this!

Author:  jeromie [ Tue Feb 21, 2017 6:18 pm ]
Post subject:  Re: KGS on Ubuntu

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.

Author:  Fedya [ Wed Feb 22, 2017 6:38 pm ]
Post subject:  Re: KGS on Ubuntu

Quote:
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.

Author:  jeromie [ Wed Feb 22, 2017 8:50 pm ]
Post subject:  Re: KGS on Ubuntu

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.

Author:  Fedya [ Thu Feb 23, 2017 2:42 pm ]
Post subject:  Re: KGS on Ubuntu

Thanks! That worked!

Author:  zwim [ Thu Feb 23, 2017 3:34 pm ]
Post subject:  Re: KGS on Ubuntu

I've already written a tuto on another thread, I will move it here.
Can you change the topic name from Ubuntu to Linux ?

Author:  zwim [ Thu Feb 23, 2017 3:36 pm ]
Post subject:  Re: KGS on Ubuntu

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:
$ 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:
$ 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:
$ 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).

Author:  jeromie [ Thu Feb 23, 2017 3:56 pm ]
Post subject:  Re: KGS on Ubuntu

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?

Author:  oren [ Thu Feb 23, 2017 5:08 pm ]
Post subject:  Re: KGS on Ubuntu

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?

Author:  zwim [ Thu Feb 23, 2017 8:15 pm ]
Post subject:  Re: KGS on Ubuntu

@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.

Author:  jeromie [ Thu Feb 23, 2017 9:42 pm ]
Post subject:  Re: KGS on Ubuntu

Makes sense. I didn't know there were distros without Java 8 readily available. Thanks for taking the time to explain!

Author:  treeclimber [ Wed May 10, 2017 6:32 pm ]
Post subject:  Re: KGS on Ubuntu

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.

Author:  Moltyplop [ Sat Dec 02, 2017 12:12 pm ]
Post subject:  Re: KGS on Ubuntu

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?

Author:  Marathon [ Wed Mar 14, 2018 1:14 pm ]
Post subject:  Re: KGS on Ubuntu

For me, it tries to save in my user home directory.
Code:
/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.

Author:  Marathon [ Thu Mar 15, 2018 10:19 am ]
Post subject:  Re: KGS on Ubuntu

By the way, should have mentioned I use KDE.

Here is what I see if I choose to view the subdirectory branch

Attachments:
Screenshot_20180315_121827.png
Screenshot_20180315_121827.png [ 18.47 KiB | Viewed 29407 times ]

Author:  a1872 [ Wed Apr 18, 2018 10:53 pm ]
Post subject:  Re: KGS on Ubuntu

I am trying to follow zwim's good instructions, but:

Maybe I'm one with the archives problem--I tried
Code:
sudo tar xvzf jdk-8u172-linux-x64.tar.gz /opt/java/x64


and got the reply
Code:
tar: /opt/java/x64: Not found in archive
tar: Exiting with failure status due to previous errors


I included a screenshot displaying that the mkdir opt/java/x64 was successful and showing the jre and jdk files in ~/Download. Since I'm contacting about this issue, I figured I'd just ask what the -p does?

I was wondering if I can skip installing the downloaded files jre or jdk and install the package "openjdk-9-jre-headless"--will CGoban run on that? The screenshot shows this software not installed. Does it matter if I use jre--I'm not a developer.

If I can just install the aforementioned package, can I just continue with the steps after "Download the .jar file from KGS https://www.gokgs.com/"?

Attachments:
tar error jdk 172.png
tar error jdk 172.png [ 182.02 KiB | Viewed 28987 times ]
install jdk 9 jre and grep.png
install jdk 9 jre and grep.png [ 216.65 KiB | Viewed 28987 times ]

Author:  vier [ Thu Apr 19, 2018 6:24 am ]
Post subject:  Re: KGS on Ubuntu

a1872 wrote:
I tried
Code:
sudo tar xvzf jdk-8u172-linux-x64.tar.gz /opt/java/x64

and got the reply
Code:
tar: /opt/java/x64: Not found in archive

That command means: extract the file /opt/java/x64 from the archive jdk-8u172-linux-x64.tar.gz.
Perhaps you hoped that it would mean: extract the contents of the archive into the given directory.

You can cd to the directory, check with tar t that there are no absolute pathnames in the archive,
and extract.

If you are on Ubuntu, or any such distribution that keeps track of what is installed and where, installing stuff on your own will corrupt the system. Either use official packages, or install under your own home directory.

mkdir a will create a; mkdir -p a/b/c will not only create a/b/c but also all required directories leading up to that.

Author:  a1872 [ Thu Apr 19, 2018 8:25 pm ]
Post subject:  Re: KGS on Ubuntu

Code:
sudo tar xvzf jdk-8u172-linux-x64.tar.gz /opt/java/x64


Quote:
That command means: extract the file /opt/java/x64 from the archive jdk-8u172-linux-x64.tar.gz.
Perhaps you hoped that it would mean: extract the contents of the archive into the given directory.


I don't quite understand--an archive is a type of file where files are grouped under a single filename--so are you saying that this unintended command is searching the single filename jdk-8u. and trying to pull out the individual file /opt/java/x64? Switching the names around wouldn't fix the command because /opt/java/x64 is not a file buried within? Why would this code even be typed?

I was thinking of installing the JDK 10 released by Oracle's website, as mentioned in the previous post (http://www.oracle.com/technetwork/java/javase/downloads/)

The instructions seem pretty easy.

Can you advise on how the superseding situation works?; I thought it was bad to have different Java versions installed, with the older ones being a security risk and needing to be removed. If I remove it, will everything still run? Will cgoban run on JDK 10?

How do I know what to change the Exec line of the following code to with the file being: openjdk-10.0.1_linux-x64_bin.tar.gz and extracted in /opy/java/x64? That location isn't being used and was created earlier.

Code:
Exec=/opt/java/x64/jdk1.8.0_121/bin/java -jar /opt/kgs/cgoban.jar



I've used Ubuntu since XP EOL'd--I have Ubuntu Mate 17.10.

Author:  dstromberg [ Mon Aug 07, 2023 5:10 pm ]
Post subject:  Re: KGS on Ubuntu

I put a small cgoban3 installation script at https://stromberg.dnsalias.org/~strombr ... l-cgoban3/

It appears to work well on Debian-based (So Debian, Ubuntu, Mint, PopOS, etcetera), Redhat-based (RHEL, Fedora, CentOS, etcetera), Arch-based (So Arch, Manjaro, etcetera) and others to a lesser extent (including at least OpenSUSE).

You may still find yourself needing to upgrade your JRE/JDK though.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/