It is currently Thu Oct 31, 2024 4:25 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 20 posts ] 
Author Message
Offline
 Post subject: KGS on Ubuntu
Post #1 Posted: Fri Sep 16, 2016 12:31 am 
Dies in gote

Posts: 60
Location: Whitehorse, Yukon Territory
Liked others: 8
Was liked: 18
Rank: CGA 8 kyu
Universal go server handle: Yukontodd
Online playing schedule: Find me on OGS these days.
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!

_________________
I write Go-ing Shodan, a blog about trying to get through the sdk's. If you want to check it out, tenuki.


This post by Yukontodd was liked by 2 people: daal, Drew
Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #2 Posted: Tue Feb 21, 2017 10:02 am 
Beginner

Posts: 5
Liked others: 0
Was liked: 1
Rank: KGS 1 dan
Online playing schedule: Twitch game reviews Saturdays 11AM EST
I know this is old, just wanna say thanks! I'm a recent Linux convert (running ElementaryOS). Gonna try this!

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #3 Posted: Tue Feb 21, 2017 6:18 pm 
Lives in sente

Posts: 902
Location: Fort Collins, CO
Liked others: 319
Was liked: 287
Rank: AGA 3k
Universal go server handle: 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.

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #4 Posted: Wed Feb 22, 2017 6:38 pm 
Lives in gote
User avatar

Posts: 603
Liked others: 43
Was liked: 139
Rank: 6-7k KGS
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.

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #5 Posted: Wed Feb 22, 2017 8:50 pm 
Lives in sente

Posts: 902
Location: Fort Collins, CO
Liked others: 319
Was liked: 287
Rank: AGA 3k
Universal go server handle: 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.


This post by jeromie was liked by: Drew
Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #6 Posted: Thu Feb 23, 2017 2:42 pm 
Lives in gote
User avatar

Posts: 603
Liked others: 43
Was liked: 139
Rank: 6-7k KGS
Thanks! That worked!


This post by Fedya was liked by: jeromie
Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #7 Posted: Thu Feb 23, 2017 3:34 pm 
Beginner

Posts: 8
Liked others: 0
Was liked: 2
Rank: 5k
I've already written a tuto on another thread, I will move it here.
Can you change the topic name from Ubuntu to Linux ?


Last edited by zwim on Thu Feb 23, 2017 3:36 pm, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #8 Posted: Thu Feb 23, 2017 3:36 pm 
Beginner

Posts: 8
Liked others: 0
Was liked: 2
Rank: 5k
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).

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #9 Posted: Thu Feb 23, 2017 3:56 pm 
Lives in sente

Posts: 902
Location: Fort Collins, CO
Liked others: 319
Was liked: 287
Rank: AGA 3k
Universal go server handle: 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?

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #10 Posted: Thu Feb 23, 2017 5:08 pm 
Oza
User avatar

Posts: 2777
Location: Seattle, WA
Liked others: 251
Was liked: 549
KGS: oren
Tygem: oren740, orenl
IGS: oren
Wbaduk: 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?

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #11 Posted: Thu Feb 23, 2017 8:15 pm 
Beginner

Posts: 8
Liked others: 0
Was liked: 2
Rank: 5k
@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.


This post by zwim was liked by: jeromie
Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #12 Posted: Thu Feb 23, 2017 9:42 pm 
Lives in sente

Posts: 902
Location: Fort Collins, CO
Liked others: 319
Was liked: 287
Rank: AGA 3k
Universal go server handle: jeromie
Makes sense. I didn't know there were distros without Java 8 readily available. Thanks for taking the time to explain!

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #13 Posted: Wed May 10, 2017 6:32 pm 
Beginner

Posts: 1
Liked others: 0
Was liked: 0
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.

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #14 Posted: Sat Dec 02, 2017 12:12 pm 
Beginner

Posts: 3
Liked others: 2
Was liked: 0
Rank: EGF 4k
KGS: Moltyplop
OGS: Moltyplop
Universal go server handle: 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?

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #15 Posted: Wed Mar 14, 2018 1:14 pm 
Dies with sente

Posts: 76
Liked others: 15
Was liked: 20
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.

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #16 Posted: Thu Mar 15, 2018 10:19 am 
Dies with sente

Posts: 76
Liked others: 15
Was liked: 20
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 46118 times ]
Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #17 Posted: Wed Apr 18, 2018 10:53 pm 
Beginner

Posts: 6
Liked others: 0
Was liked: 0
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 45698 times ]
install jdk 9 jre and grep.png
install jdk 9 jre and grep.png [ 216.65 KiB | Viewed 45698 times ]
Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #18 Posted: Thu Apr 19, 2018 6:24 am 
Dies with sente

Posts: 91
Liked others: 8
Was liked: 29
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.

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #19 Posted: Thu Apr 19, 2018 8:25 pm 
Beginner

Posts: 6
Liked others: 0
Was liked: 0
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.

Top
 Profile  
 
Offline
 Post subject: Re: KGS on Ubuntu
Post #20 Posted: Mon Aug 07, 2023 5:10 pm 
Beginner
User avatar

Posts: 1
Liked others: 0
Was liked: 0
Rank: KGS 3 kyu
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.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group