Page 1 of 1

How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Sun Dec 11, 2011 3:14 am
by cepris
Hi,
I recently installed BZFlag 2.4.0. But, my terminal still runs commands from the 2.0 game. How can I get my terminal to run commands from the 2.4 game (especially bzfs)?

Edit: I use Ubuntu 10.04

Re: How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Sun Dec 11, 2011 3:48 am
by Grans Remedy
Do you want to keep both?
One way would be to CD into the directory containing v2.4 and run bzfs from there.
Or create a shell script which runs v2.4 bzfs and put it in your path
Alternatively you could find out where v2.0 is:

Code: Select all

which bzfs
rename that and put a symbolic link through to your v2.4 bzfs there.
Of course, being Linux, there will be other ways too :)
Grans

Re: How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Sun Dec 11, 2011 5:35 am
by cepris
Thanks Grans :D
No, I do not want to keep both. I no longer need the old game and bzfs. Do you know if its possible to re-wire it so that running "bzfs" will run it from where I have it at the moment?
If not and nobody else knows how I'll try what you said ;)

Re: How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Sun Dec 11, 2011 6:49 am
by Grans Remedy
Yes, that is possible - the last of the three options above does that.
The first step is to find out where the binary files are in v2.0. So, type

Code: Select all

which bzfs
into a command line. The path that is returned is where your system is "looking" for bzflag and bzfs. Make a note of it (write it down). Now make a note of where the v2.4 files are - I assume you installed these from source in your home directory or something?
If you want to uninstall the old version first, then you could change directory to your v2.0 source tree, and try:

Code: Select all

make uninstall

If that doesnt work you will need to manually delete a bunch of files (which is tedious and error prone).
But if you didn't uninstall, then rename the old bzflag/bzfs/bzadmin files in the path returned above (or delete them) - you will need to be root for these steps.
Then, create a symbolic link to v2.4 binaries:
1. Change directory to where your v2.0 binaries are (you found the path/directory above, in the which bzfs step)
2. Inside that directory, use ln -s <path to v2.4 binaries> <bzfs>
So, say your v2.0 binaries are in /usr/local/bin, and your v2.4 binaries are in /home/wildrune11/bz/bin, then you would (as root):

Code: Select all

cd /usr/local/bin
ln -s /home/wildrune11/bz/bin/bzfs bzfs
ln -s /home/wildrune11/bz/bin/bzflag bzflag
ln -s /home/wildrune11/bz/bin/bzadmin bzadmin
That should do it. Try running bzflag from the term as an ordinary user, and if you got the paths right then v2.4 should fire up.

Grans

Re: How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Sun Dec 11, 2011 8:44 am
by cepris
Thanks Grans ;)
So, do I need to uninstall 2.0? Or can I leave it installed and just create the symbolic links?

Re: How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Sun Dec 11, 2011 9:53 am
by Grans Remedy
Uninstalll is best, but its not essential. It also depends on how (where) you installed v2.4. Either will work though.

Re: How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Sun Dec 11, 2011 1:58 pm
by blast
Uninstall 2.0 first using your package manager. Then do a 'sudo make install' in your 2.4 source directory. Note that you will not have menu shortcuts to BZFlag anymore. You may be able to manually create one, though.

Re: How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Sun Dec 11, 2011 10:32 pm
by cepris
Thanks both of you.
Just to clarify blast, if I uninstall 2.0 then "sudo make install", will that bind command line codes as well?

Re: How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Mon Dec 12, 2011 2:48 am
by blast
Yes.

Re: How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Mon Dec 12, 2011 4:28 am
by Grans Remedy
I assumed that you installed v2.0 from source and not using your package manager. If you did build v2.0 from source then using your package manager to uninstall may not work well (or at all). I'm not sure about Ubuntu but SuSe sometimes puts things in weird places :)

Re: How to get terminal to run BZFS from 2.4, not 2.0?

Posted: Mon Dec 12, 2011 11:22 pm
by cepris
Oh, I used the Ubuntu Software Center ;)
Thanks though!