LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-06-2007, 02:32 PM   #1
madwac
Member
 
Registered: Jul 2006
Distribution: kernal 2.6.20-1 2948.fc6 LC2210D
Posts: 48

Rep: Reputation: 15
chess_Spike


I have xboard and Gnuchess from rpm. I downloaded and unpacked the Spike_12_linux .tar.gz in /opt and chowned to my user acccount. When I typed 'sudo xboard -fcp /opt/spike' I got "failed to start first chess program on local host spike --no such file or directory. also three "broken pipe" dialog boxes in xboard. How do I get gnuchess and Spike to play against each other and myself? I'm guessing I have to move the spike files but where? Thanks
 
Old 09-06-2007, 06:32 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
ls /opt/spike
 
Old 09-07-2007, 09:12 AM   #3
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
The man page for xboard seems to imply you need something like

$ xboard -fcp spike -fd /opt/spike

So you specify both the executable file (-fcp) and the directory that contains it and its support files (-fd).

Also, do you need sudo? Xboard may fail to start if root user does not have permission to access the X server.

Last edited by maroonbaboon; 09-07-2007 at 09:13 AM.
 
Old 09-07-2007, 11:26 AM   #4
madwac
Member
 
Registered: Jul 2006
Distribution: kernal 2.6.20-1 2948.fc6 LC2210D
Posts: 48

Original Poster
Rep: Reputation: 15
root

Thanks for your help. I do know that the /opt directory is root priveliged which could be goofing things up. Thats why I think I might have to move the files. For Simon I will post ls output from 'sudo ls -l /opt/spike' I do have to sudo just to get this info.
-rwxr-xr-x 1 joe joe 1348395 Nov 3 2006 /opt/spike
I tried the -fd option and got three fatal errors again.
sudo xboard -fcp spike -fd /opt/spike
Password:
xboard: Error writing to first chess program: Broken pipe
xboard: Error: first chess program (spike) exited unexpectedly
xboard: Error writing to first chess program: Broken pipe
xboard: Error writing to first chess program: Broken pipe
xboard: Error writing to first chess program: Broken pipe
xboard: Error writing to first chess program: Broken pipe
Warning: XtRemoveGrab asked to remove a widget not on the list

I think the spike and all its files need to go in the same Dir as gnu but I don't know where.

Last edited by madwac; 09-07-2007 at 11:56 AM.
 
Old 09-07-2007, 01:04 PM   #5
booksh
LQ Newbie
 
Registered: Mar 2006
Location: qatar
Distribution: ubuntu 11.04 Natty Narwhal
Posts: 20

Rep: Reputation: 0
hi guys iam looking for fredora or redhat it work without installaion in the PC called (live CD )can you guide me to find some web site to dwonload >>>
regards
 
Old 09-07-2007, 06:43 PM   #6
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Quote:
Originally Posted by madwac View Post
I do know that the /opt directory is root priveliged which could be goofing things up.
Sorry, I thought /opt/spike was a directory, but it is the executable. Generally it is a better idea to keep things together in a subdir of /opt rather than in /opt itself. How about the following (which supposes /opt only contains the spike stuff):

sudo rm /opt/*
sudo mkdir /opt/Spike
sudo chown joe:joe /opt/Spike
cd /opt/Spike
gzip -cd <path to spike.tar.gz> | tar xvf -

Then try again with

xboard -fcp spike -fd /opt/Spike
 
Old 09-07-2007, 08:40 PM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
booksh: you're off topic here. The thread is about chess programs.

minimal help follows:
google is your freind... also try looking up the distros you are interested in at Distrowatch or at the LQ ISO page. Do familiarize yourself with the services LQ offers.
 
Old 09-08-2007, 08:23 AM   #8
madwac
Member
 
Registered: Jul 2006
Distribution: kernal 2.6.20-1 2948.fc6 LC2210D
Posts: 48

Original Poster
Rep: Reputation: 15
learning

That's a good lesson for me thanks. The file structure stuff is still bit awkward for me (used to windows). The Spike_12_linux.tar.gz is in /opt too. If I input 'sudo rm /opt/*' won't that go too? So just to clarify; do I need to move the .tar.gz back to the desktop and then run your commands?
 
Old 09-09-2007, 06:52 PM   #9
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Quote:
Originally Posted by madwac View Post
So just to clarify; do I need to move the .tar.gz back to the desktop and then run your commands?
Hope you haven't nuked your tar.gz already

'sudo rm /opt/*' will remove all files from /opt. So definitely move or copy anything you want to save. It won't remove directories. If you want to be selective just remove the files one-by-one. Or just make a new directory and move the files into it using 'mv'.

Most tar.gz packages unpack into their own directory. This stops the files getting mixed up with what's already there. Don't know why spike didn't do that.

If you are not familiar with basic commands like rm, mv, cp and their options, use of pattern matching with '*' and so on, you should look for a beginner's guide to unix/linux and play around with them a bit.
 
Old 09-10-2007, 12:47 PM   #10
madwac
Member
 
Registered: Jul 2006
Distribution: kernal 2.6.20-1 2948.fc6 LC2210D
Posts: 48

Original Poster
Rep: Reputation: 15
frustrated by the linux mule

I was confused by spike not creating its own directory also because that's what all the books say. So....I read the spike read me and it said to move the files into the same directory as xboard (which spike was tested with) and run 'xboard -fcp ./spike' So I moved the files to /usr/bin/ where xboard resides and got the same broken pipe dialogs. I noticed that local user owns spike but xboard is owned by root so I ran it with sudo and that didn't work either. I don't understand why xboard starts without sudo if it's owned by root but it works fine with gnuchess.
spike joe joe
xboard root root
gnuchess root games
all these have a *at the end in /usr/bin/ What does that mean?
Do think ownership is problem?
 
Old 09-10-2007, 05:41 PM   #11
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
I don't think linux is to blame for your problems. I downloaded a copy of spike and unpacked it into directory ~/Src/Spike (the '~' can always be used as shorthand for your home directory). Initially I tried

xboard -fd ~/Src/Spike -fcp spike

and got the same error as you. Then I tried the full path name of the executable spike file:

xboard -fd ~/Src/Spike -fcp ~/Src/Spike/spike

and it worked. At least I did P-K4 and somebody replied with P-K4. No sudo stuff needed.

The man page for xboard was not very clear on this. Maybe it assumes 'spike' is in the user's PATH (the list of dirs which get searched when you run a program).

The advice in the spike README was not that great either when xboard is in /usr/bin. The spike author was probably a great programmer, but not so good at packaging his work in a foolproof way.

IMHO making your own directory as above is the best solution.

Last edited by maroonbaboon; 09-10-2007 at 05:43 PM.
 
Old 09-11-2007, 10:36 AM   #12
madwac
Member
 
Registered: Jul 2006
Distribution: kernal 2.6.20-1 2948.fc6 LC2210D
Posts: 48

Original Poster
Rep: Reputation: 15
I can't thank you enough. I would have never figured that out. I deleted all the files, moved the tar .gz to ~/Src/Spike (after creating the directories) and unpacked it again there. I pasted your command and it worked! I quess the programmer took liberties when he didn't make spike unpack to its own directory. (ps. ...while doing this I accidently sent the Spike.cnfg to a file named src in my home. I believe its the src code for "jin" chess interface so I removed it. Is there a command for "undo move? I'm just topping off this thread (which I think is a good one) for other newbies. Thanks again for your time.
 
Old 09-11-2007, 05:54 PM   #13
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Glad you got it working

Quote:
Originally Posted by madwac View Post
while doing this I accidently sent the Spike.cnfg to a file named src in my home. I believe its the src code for "jin" chess interface so I removed it. Is there a command for "undo move?
Not quite sure I understand what you did there. If you have deleted or overwritten something there is no easy and guaranteed way to get it back (unless you are using a desktop/file manager with a trashcan). If it is just some source code it is usually easy to get another copy. If it's important, well, best to have a backup. If you just mv'ed it to the wrong place, mv it again

Nothing wrong with using a file manager. Just if you are familiar the command line it is often quicker than groping around with a mouse.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration