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

News and info about current and upcoming releases of the game client and server.
Post Reply
cepris
Private First Class
Private First Class
Posts: 132
Joined: Wed Dec 01, 2010 6:49 am

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

Post 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
User avatar
Grans Remedy
Private First Class
Private First Class
Posts: 91
Joined: Sun Dec 05, 2004 10:47 pm
Location: New Zealand

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

Post 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
No coffee, no workee
cepris
Private First Class
Private First Class
Posts: 132
Joined: Wed Dec 01, 2010 6:49 am

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

Post 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 ;)
User avatar
Grans Remedy
Private First Class
Private First Class
Posts: 91
Joined: Sun Dec 05, 2004 10:47 pm
Location: New Zealand

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

Post 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
No coffee, no workee
cepris
Private First Class
Private First Class
Posts: 132
Joined: Wed Dec 01, 2010 6:49 am

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

Post by cepris »

Thanks Grans ;)
So, do I need to uninstall 2.0? Or can I leave it installed and just create the symbolic links?
User avatar
Grans Remedy
Private First Class
Private First Class
Posts: 91
Joined: Sun Dec 05, 2004 10:47 pm
Location: New Zealand

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

Post by Grans Remedy »

Uninstalll is best, but its not essential. It also depends on how (where) you installed v2.4. Either will work though.
No coffee, no workee
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

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

Post 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.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
cepris
Private First Class
Private First Class
Posts: 132
Joined: Wed Dec 01, 2010 6:49 am

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

Post 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?
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

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

Post by blast »

Yes.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
Grans Remedy
Private First Class
Private First Class
Posts: 91
Joined: Sun Dec 05, 2004 10:47 pm
Location: New Zealand

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

Post 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 :)
No coffee, no workee
cepris
Private First Class
Private First Class
Posts: 132
Joined: Wed Dec 01, 2010 6:49 am

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

Post by cepris »

Oh, I used the Ubuntu Software Center ;)
Thanks though!
Post Reply