It is currently Thu Mar 28, 2024 6:26 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
Offline
 Post subject: [SOLVED!] CGoban Stone Click Sound—OS X
Post #1 Posted: Thu Apr 04, 2013 4:35 pm 
Oza
User avatar

Posts: 2221
Location: Germany
Liked others: 8262
Was liked: 924
Rank: OGS 9k
OGS: trohde
Universal go server handle: trohde
<edit>

Solved, thanks to Araban, duckweed, and xed_over (in order of appearance); see below.

</edit>


Help. Please.


I think I’ve read all those threads about Java/CGoban and the missing stone click sound. On my iMac w/ OS X 10.7.5 the sound is also missing since I have installed the latest Java from java.com. Whenever somebody mentioned OS X in those threads, the reply was something along the line “it should be something like XYZ” and then a description of how to solve this on … Windows, once or twice for Linux. I don’t even seem to have those folders that are being mentioned there … hasn’t been much trouble for me, because in the past year or so I’ve rarely played online, and if I did, I did so on Kaya.gs or DGS, and I use CGoban only to review my DGS games.

But now, in a few days, there’s a German Internet tournament on KGS, and I’m also playing there, and now I’m a bit worried about missing something when time gets short (I don’t plan to let it get short but, well, you know …).

So, if anybody has been successful in recovering the click sound and would share how they did it, I’d be overly glad. You really want to see me glad, don’t you? Image

I’m not afraid of using the Terminal, but you’d have to tell me explicitly what to do and not just “you simply have to outgrabe the waysock, and then you tulver the borogove, finally you need to somforbe lorem ipsum dolorem.”


Thanks in advance,

Tom


<edit #2>

Just in case somebody reads just the next post (thanks again, Araban), I’ll post the code here:
Quote:
java -jar cgoban.jar
so that nobody endangers their workspace with that sudo (and thanks again to duckweed and xed_over).

</edit #2>

_________________
“The only difference between me and a madman is that I’m not mad.” — Salvador Dali ★ Play a slooooow correspondence game with me on OGS? :)


Last edited by Bonobo on Tue Aug 06, 2013 11:30 am, edited 6 times in total.
Top
 Profile  
 
Offline
 Post subject: Re: [?] CGoban Stone Click Sound—OS X
Post #2 Posted: Thu Apr 04, 2013 4:40 pm 
Gosei
User avatar

Posts: 1848
Location: Bellevue, WA
Liked others: 90
Was liked: 837
Rank: AGA 5d
KGS: Capsule 4d
Tygem: 치킨까스 5d
sudo java -jar cgoban.jar


This post by Solomon was liked by: Bonobo
Top
 Profile  
 
Offline
 Post subject: Re: [SOLVED!] CGoban Stone Click Sound—OS X
Post #3 Posted: Thu Apr 04, 2013 6:46 pm 
Oza
User avatar

Posts: 2221
Location: Germany
Liked others: 8262
Was liked: 924
Rank: OGS 9k
OGS: trohde
Universal go server handle: trohde
Araban wrote:
sudo java -jar cgoban.jar
THANK YOU, Araban :bow: that was verbose enough :D

What I did:

- download the linked file
- put it where I wanted it to reside
- substitute the full pathname for “cgoban.jar” in the above code


<edit>

And thanks to duckweed and xed_over I can now skip the dreaded sudo.

</edit>

What to enter in Terminal:
Code:
java -jar /[folder name]/[subfolder name]/cgoban.jar
(Skip full pathname if entering this while in the folder where cgoban.jar resides.)

Now how to make this clickable (save file with shebang header and do something w/ chmod I guess) and how to make this skip sudo password entry (prolly have to edit sudoers) … can’t seem to remember any of the scripting of those NeXTstep times …

Anyway, I’m a happy camper now, thanks again!


Greetings, Tom

_________________
“The only difference between me and a madman is that I’m not mad.” — Salvador Dali ★ Play a slooooow correspondence game with me on OGS? :)


Last edited by Bonobo on Sat Apr 06, 2013 10:35 am, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: [SOLVED!] CGoban Stone Click Sound—OS X
Post #4 Posted: Sat Apr 06, 2013 3:27 am 
Dies in gote

Posts: 45
Liked others: 3
Was liked: 18
Rank: Kgs 5 Kyu
You really do not want to run the java virtual machine as a superuser.

If the jvm is exploited, it will have superuser access to your machine.

Top
 Profile  
 
Offline
 Post subject: Re: [SOLVED!] CGoban Stone Click Sound—OS X
Post #5 Posted: Sat Apr 06, 2013 5:09 am 
Oza
User avatar

Posts: 2221
Location: Germany
Liked others: 8262
Was liked: 924
Rank: OGS 9k
OGS: trohde
Universal go server handle: trohde
duckweed wrote:
You really do not want to run the java virtual machine as a superuser.

If the jvm is exploited, it will have superuser access to your machine.
So, what does this mean exactly? Does it mean that IF my version of CGoban is somehow hacked it may be used to do bad things? Then I just need to make sure that my CGoban is okay, or?

What are the alternatives?

Thanks in advance, Tom

_________________
“The only difference between me and a madman is that I’m not mad.” — Salvador Dali ★ Play a slooooow correspondence game with me on OGS? :)

Top
 Profile  
 
Offline
 Post subject: Re: [SOLVED!] CGoban Stone Click Sound—OS X
Post #6 Posted: Sat Apr 06, 2013 10:11 am 
Oza

Posts: 2264
Liked others: 1180
Was liked: 552
Bonobo wrote:
duckweed wrote:
You really do not want to run the java virtual machine as a superuser.

If the jvm is exploited, it will have superuser access to your machine.
So, what does this mean exactly? Does it mean that IF my version of CGoban is somehow hacked it may be used to do bad things? Then I just need to make sure that my CGoban is okay, or?

What are the alternatives?

Thanks in advance, Tom

It means that where ever you downloaded your cgoban.jar from, if someone at that location hacked/recompiled it to do bad things to your system, then running it as root (sudo) will allow them the needed access to do so.

not a big worry, in my mind for this app.

still, you shouldn't need to use 'sudo'. I don't, and it works just fine.


This post by xed_over was liked by: Bonobo
Top
 Profile  
 
Offline
 Post subject: Re: [SOLVED!] CGoban Stone Click Sound—OS X
Post #7 Posted: Sat Apr 06, 2013 10:38 am 
Oza
User avatar

Posts: 2221
Location: Germany
Liked others: 8262
Was liked: 924
Rank: OGS 9k
OGS: trohde
Universal go server handle: trohde
Thank you, duckweed and xed_over, this is comforting, I’ve updated my above post/comment to reflect this :)

_________________
“The only difference between me and a madman is that I’m not mad.” — Salvador Dali ★ Play a slooooow correspondence game with me on OGS? :)

Top
 Profile  
 
Offline
 Post subject:
Post #8 Posted: Sat Aug 17, 2013 8:18 pm 
Honinbo
User avatar

Posts: 8859
Location: Santa Barbara, CA
Liked others: 349
Was liked: 2076
GD Posts: 312
Bonobo wrote:
java -jar cgoban.jar
Hi Bonobo, I'm trying to use the above work-around.
I am able to run CGoban with the above command;
however, there is still no sound for stone clicks.
Is the above command supposed to fix the missing stone click sound problem, or just to run CGoban on OS X ?
Thanks.

Top
 Profile  
 
Offline
 Post subject: Re:
Post #9 Posted: Sun Aug 18, 2013 7:40 am 
Oza

Posts: 2264
Liked others: 1180
Was liked: 552
EdLee wrote:
Bonobo wrote:
java -jar cgoban.jar
Hi Bonobo, I'm trying to use the above work-around.
I am able to run CGoban with the above command;
however, there is still no sound for stone clicks.
Is the above command supposed to fix the missing stone click sound problem, or just to run CGoban on OS X ?
Thanks.

What he forgot to mention explicitly, was which version of java he's actually using.

Code:
$ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-10M3646)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)


I'm still using 1.6

I believe its java 1.7 that has the problem. I don't have 1.7, because I never upgrade.

But of course my sounds never work because I always forget that I have them turned off in the preferences -- it annoys my wife, who's usually in the same room with me, and it annoys the players when I'm recording their games.


This post by xed_over was liked by: Bonobo
Top
 Profile  
 
Offline
 Post subject: Re:
Post #10 Posted: Sun Aug 18, 2013 8:00 am 
Oza
User avatar

Posts: 2221
Location: Germany
Liked others: 8262
Was liked: 924
Rank: OGS 9k
OGS: trohde
Universal go server handle: trohde
Dear Ed,

xed_over is right.

EdLee wrote:
[..] Is the above command supposed to fix the missing stone click sound problem, or just to run CGoban on OS X ?
This command is indeed supposed to fix the missing click by using Apple’s olden but golden Java SE 6 installation. It’s just two weeks ago that I found out :-D

:b1: Please fire up your terminal and enter this:
Code:
java -version

Mine says:
Code:
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

:w2: If you get anything with 1.6.x please try the following command (with added path to Java SE 6 because your shell environment may contain the path to the newer Java which resides elsewhere):
Code:
/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java -jar cgoban.jar

If this works, you’re done :-)

If not, then …

:b3: Assuming you don’t have the original Java SE 6 installed that comes with OS X (plus updates), and assuming that you’re using 10.7 or later, you can d’load and install Apple’s original Java SE 6 (this is the latest version for 10.7 and 10.8) alongside to the newer Java from Java.com w/o any problem because they’re installed in different places.

:w4: Please try the above terminal command again and let us know what happens.

HTH, Tom


p.s.: BTW, and for some added value ;-): I use the fabulous Path Finder instead of Finder, here I can have a terminal pane pop up at any time. And then I just enter “.cg”, and the likewise fabulous TextExpander macro program expands this to the above terminal command :-)

_________________
“The only difference between me and a madman is that I’m not mad.” — Salvador Dali ★ Play a slooooow correspondence game with me on OGS? :)


This post by Bonobo was liked by: xed_over
Top
 Profile  
 
Offline
 Post subject: Re: Re:
Post #11 Posted: Sun Aug 18, 2013 11:59 am 
Honinbo
User avatar

Posts: 8859
Location: Santa Barbara, CA
Liked others: 349
Was liked: 2076
GD Posts: 312
Hi Bonobo, xed_over, thanks.
Code:
$ java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
I have the latest version from java.com -- let me see if I can install the older, 1.6, from apple...

Top
 Profile  
 
Offline
 Post subject:
Post #12 Posted: Sun Aug 18, 2013 12:09 pm 
Honinbo
User avatar

Posts: 8859
Location: Santa Barbara, CA
Liked others: 349
Was liked: 2076
GD Posts: 312
Hi Bonobo, Thanks for the link to apple's 1.6 java version.
I think I downloaded and installed it.
However, when I check the java version, it still says 1.7 after the install:
Code:
$ java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
How do I run the older 1.6 version java from Terminal ?
I also tried:
Code:
/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java -jar cgoban.jar
And CGoban came up, but still no stone clicks sound. :)

Thanks so much! :)

Top
 Profile  
 
Offline
 Post subject: Re: [SOLVED!] CGoban Stone Click Sound—OS X
Post #13 Posted: Sun Aug 18, 2013 12:52 pm 
Oza

Posts: 2264
Liked others: 1180
Was liked: 552
I didn't follow Bonobo's link to the older Java installer, but there are two ways that could have worked

1) replace the current Java 1.7 with the older 1.6 (if not handled entirely by the installer, can be complicated and not necessarily recommended as other default java functionality may stop functioning properly)

2) add the Java 1.6 alongside the current Java 1.7 leaving it up to the user to figure out how to find it and use it.


For now, let's assume #2 and see what we can find.

warning: technical details ahead..


by default, when you type 'java' on the command line, its going to use the first one it finds on the PATH (echo $PATH to see the different paths that are evaluated in order)

$ which java
will show which one is actually being called

$ which java
/usr/bin/java
$ ls -l /usr/bin/java
lrwxr-xr-x 1 root wheel 74 May 19 2012 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

so /usr/bin/java is a symlink pointing to another file (one that's otherwise too long to type)

and we'll soon see that "Current" is also another symlink (not as obvious at first glance as my color coded output above)

$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions/
total 72
lrwxr-xr-x 1 root wheel 5 May 19 2012 1.3 -> 1.3.1
drwxr-xr-x 3 root wheel 102 Dec 2 2009 1.3.1
lrwxr-xr-x 1 root wheel 10 May 19 2012 1.4 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 May 19 2012 1.4.2 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 May 19 2012 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 May 19 2012 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 May 19 2012 1.6 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 May 19 2012 1.6.0 -> CurrentJDK
drwxr-xr-x 10 root wheel 340 May 19 2012 A
lrwxr-xr-x 1 root wheel 1 May 19 2012 Current -> A
lrwxr-xr-x 1 root wheel 59 May 19 2012 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

"Current" points to "A" where the real application is installed.

If you can find the real location to your newly installed older version of Java, then we can help you further with an actual command you can type to use it.


This post by xed_over was liked by: Bonobo
Top
 Profile  
 
Offline
 Post subject:
Post #14 Posted: Sun Aug 18, 2013 1:51 pm 
Honinbo
User avatar

Posts: 8859
Location: Santa Barbara, CA
Liked others: 349
Was liked: 2076
GD Posts: 312
xed_over, thanks. Here:
Code:
ls -l /System/Library/Frameworks/JavaVM.framework/Versions/
total 64
lrwxr-xr-x  1 root  wheel   10 Aug 18 12:01 1.4 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Aug 18 12:01 1.4.2 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Aug 18 12:01 1.5 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Aug 18 12:01 1.5.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Aug 18 12:01 1.6 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Aug 18 12:01 1.6.0 -> CurrentJDK
drwxr-xr-x  7 root  wheel  238 Aug 18 12:01 A
lrwxr-xr-x  1 root  wheel    1 Aug 18 12:01 Current -> A
lrwxr-xr-x  1 root  wheel   59 Aug 18 12:01 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
This works. :) Stone clicks are back --
Code:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands/java -jar cgoban.jar
It's been years since I touched Unix; very rusty. I put the above command into a simple text file, kgs. Then:
Code:
chmod +x kgs
./kgs
:) Is there an easier way to make a clickable icon on the desktop ? :)


This post by EdLee was liked by: Bonobo
Top
 Profile  
 
Offline
 Post subject: Re:
Post #15 Posted: Sun Aug 18, 2013 4:44 pm 
Oza
User avatar

Posts: 2221
Location: Germany
Liked others: 8262
Was liked: 924
Rank: OGS 9k
OGS: trohde
Universal go server handle: trohde
EdLee wrote:
[..] Is there an easier way to make a clickable icon on the desktop ? :)
I’ve already sent off a query in one of my Mac forums, will update here as soon as I learn something. I guess it should be possible to wrap up cgoban.jar and the text file with the Java call in a folder with extension “.app” and make it clickable.

Thanks also to both of you, xed_over and Ed, for helping me see how little I know of these things—every time I thought I’d learnt something you come and show me this was either wrong or not the whole truth. I appreciate that, but oh, those scars on my ego <sob> :-D

_________________
“The only difference between me and a madman is that I’m not mad.” — Salvador Dali ★ Play a slooooow correspondence game with me on OGS? :)

Top
 Profile  
 
Offline
 Post subject:
Post #16 Posted: Sun Aug 18, 2013 4:48 pm 
Honinbo
User avatar

Posts: 8859
Location: Santa Barbara, CA
Liked others: 349
Was liked: 2076
GD Posts: 312
Bonobo, thanks so much. I'm perfectly happy with the ./kgs command line, but an icon would be a nice bonus. :)


This post by EdLee was liked by: Bonobo
Top
 Profile  
 
Offline
 Post subject: Re: [SOLVED!] CGoban Stone Click Sound—OS X
Post #17 Posted: Sun Aug 18, 2013 6:14 pm 
Oza

Posts: 2264
Liked others: 1180
Was liked: 552
I have such an app (although I don't know how to make one from scratch, it shouldn't be too difficult to do). It simply runs a script to start the CGoban jar. And I can associate .sgf files so that I can just click on them to auto start the application and load the game.

For a while, it worked pretty well with the jnlp and java webstart (in order to keep the cgoban.jar auto updating from the server), but occasionally the javaws cache would get corrupted, so I just point the script to a jar instead.

I got it from a former forum member (and I can't recall his name at the moment). I searched the posts, and no luck yet. It may have been on the old forum, godiscussions.


original (/Applications/CGoban_script.app/Contents/Resources/script)
Code:
#!/bin/bash

if [ "$2" ]; then
       javaws -Xnosplash -open "$2" http://files.gokgs.com/javaBin/cgoban.jnlp
else
       javaws -Xnosplash http://files.gokgs.com/javaBin/cgoban.jnlp
fi


I think I added the "open" sgf option to his original script (I don't recall anymore)


or alternately just the jar that you download and save locally yourself.
Code:
#!/bin/bash

if [ "$2" ]; then
        java -jar /Users/xedover/cgoban/cgoban.jar "$2"
else
        java -jar /Users/xedover/cgoban/cgoban.jar
fi



I even added logging to my script to help with debugging when things go wrong (not shown here)

Top
 Profile  
 
Offline
 Post subject: Re: [SOLVED!] CGoban Stone Click Sound—OS X
Post #18 Posted: Sun Aug 18, 2013 6:43 pm 
Oza

Posts: 2264
Liked others: 1180
Was liked: 552
Adrian Petrescu is who I was thinking of. He used a different nick on GoDiscussions

Top
 Profile  
 
Offline
 Post subject: Re:
Post #19 Posted: Sun Aug 18, 2013 7:05 pm 
Lives with ko
User avatar

Posts: 172
Location: Santa Barbara, CA
Liked others: 235
Was liked: 77
Universal go server handle: fireproof
EdLee wrote:
Bonobo, thanks so much. I'm perfectly happy with the ./kgs command line, but an icon would be a nice bonus. :)


Hey Ed, if you don't mind making the script into an app in order to get the icon "appify.sh" might suit you:

http://mathiasbynens.be/notes/shell-script-mac-apps

Top
 Profile  
 
Offline
 Post subject: Re: [SOLVED!] CGoban Stone Click Sound—OS X
Post #20 Posted: Sun Oct 27, 2013 8:03 am 
Beginner

Posts: 2
Liked others: 1
Was liked: 0
I upgraded to osx Maveric and it seems that it does not work any more. I downloaded and installed both jre and jdk(terminal required it) version 7.45. Any observations?

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

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