![]() |
Installing Fink and Bash
A while back, Merv offered me the excellent suggestion of switching to bash as my Unix shell. I believe I'm ready to make that switch. I'm fully backed up and ready to get started.
I don't know where to start, but here's what I found. I believe I'm supposed to install Fink which I can find here: http://fink.sourceforge.net/download/index.php And then I'm supposed to somehow use Fink to install bash which I found on this page: http://fink.sourceforge.net/pdb/package.php/bash Is there anything special I should do or know about before I get started? |
Did you already search these forums for FINK threads? Tons of great advise and guidelines have already been posted..
-- You'll be surprised how straight-forward FINK is, nice project.. will you be installing it on a Jaguar-equiped Mac? |
Yes, many previous threads...
After you get Fink installed, you can use Fink Commander which is a gui front for fink. But knowing you, you'll opt for the command line. :p |
vickishome,
You can also install Bash without Fink. It will probably be easier for you. You can download from here: http://www.savagetranscendental.com/tip3.html But if you want to give it a try and install it with Fink, I would like to know the same question Jacques asked you. What's your system configuration: What OS version? ('sw_vers') What version of make? ('make -v') What version of the dev tools? ('cc -v') And I would recommend at least you read a little bit about Fink before you start. Please check the following pages: http://fink.sourceforge.net/faq/index.php http://fink.sourceforge.net/doc/users-guide/index.php http://fink.sourceforge.net/doc/x11/index.php Cheers... |
My apologies, I did not search the forums. :( I was so anxious to get started, I was hoping someone would say just download Fink, read the instructions, and I'd be on my way. I will go back and run the proper searches.
Quote:
Quote:
Regarding my setup: Code:
% sw_vers |
vickishome,
To give you an idea of how Fink works: Using Fink to install packages You can choose between two installing models: 1-Pre-compiled binary packages 2-The source distribution 1-Pre-compiled binary packages: When you install a binary package what you get is a ready to run program, saving you the time for compiling. The Tools used to install pre-compiled binary packages are: apt-get and dselect (written by and for the Debian GNU/Linux project) Apt-get or dselect only know about packages available as precompiled binary packages. The binary distribution of Fink uses the .deb package format. The packages are tailor-made for Mac OS X / Darwin and don't use the Debian source package format. 2-The source distribution: To install packages from source with Fink, you need the Apple Developer Tools installed. After you register for free, you can get them from the: Apple Developer Connection If you install from source you have the advantage to usually get newer software. You get to test the latest packages, and as Fink is a volunteer effort, you can then provide feedback through the fink mailing lists and report both success and failure to the package maintainer. When you buy commercial software you don't get to see the source code (companies treat it as a trade secret). With Open Source software, the source code is open for anyone to see and modify. With Fink, you can install packages from source, using its own tool named 'fink'. So, if you run in terminal: fink install 'packagename' Fink will figure out what dependencies are involved, ask if you would like to install them too, then after you say 'Yes' it'll download everything. For each package, it will unpack it, apply any needed patches, auto-configure, compile, test, and install into a .deb file which gets installed for you by dpkg. Compared to binary installs (which generally skip to the dpkg step[s]), it's a slow process -- but it can be much more reliable in many cases. Well that's all for the moment, it's late in Sing and I'm going to sleep. See you tomorrow. Cheers... |
If you are letting the cat in any time soon, check out this jubilee..
|
vickishome,
Thanks for the info. Well, Fink needs a little bit of homework, to get you going. But it can be very rewarding, as it currently lists in its database 1107 packages in 22 sections you could install, including the unstable tree and the latest packages from CVS (as 8-23-02). All for free. I'll see you tomorrow, as I'm quite sleepy already. Cheers... PS: Yes, and as Jacques suggested, if you wait a little and install Jaguar soon, you will get Bash with the System installation. |
Don't make it any harder than it is. Just install Fink and then do:
% sudo apt-get install bash And be done with it. No need to be fully backed up or anything. =) I think i installed bash before I installed Fink, but you'll find Fink worth the while anyway. But avoid the "fink" command and stick with apt-get and dselect. You'll get tons of advice in these forums to do fink this and fink that. Disregard them all and remember I told you to stick with apt-get and dselect. I only use fink to get the list of available packages. But I tend to use dselect more and more. Do: $ sudo apt-get update often (this will update your list of available packages). And: $ sudo apt-get upgrade now and then (this will upgrade your installed packages). When you do "fink list" you'll see in the first column of the list wether the package is installed or not. dselect gives more information on each package. Someone posted a hint in one of these forums about a book called "Fun with Fink" or some such. Buy that book, or at least follow the link in that post and get the PDF version of the book. Why install Fink? Because it opens the door to lots and lots of good, quality, free software. You can get "vim-nox" (nox stands for "No X" which means the terminal only version) that way, as well as "surfraw", "gawk" and you name it! |
osxpez,
Jejeje. Quote:
A bit too much don't you think? radical statements... A bit dictatorial: "Only listen to me! and remember I told you to do so! Different people have different experiences, so why you are so stubborn with yours? Lunch was no good today? I think apt-get and dselect are wonderful tools and I have used them a lot, but installing from source is also very rewarding. Statement that came from a newbie about dselect in another forum: Quote:
So relax osxpez, I will never stop you saying to people to use apt-get or dselect, but just do your statements it in a more civilized way. You are not a dictator. Now really, good night....zzz Cheers... [edit: readability -mt] |
Relax sao. I meant what I said. I think most users should avoid installing with the fink command. And I know by experience that Vicki will be adviced otherwise in these forums. I don't think I was being rude. If you took it like that I appologise. It wasn't meant that way. Perhaps I wasn't clear enough about dselect and apt-get:
I almost always install things with apt-get. I use dselect to read information about and search for packages. Yes, dselect has a quirky inteface. That's why I think "Fun wit Fink" is required reading. |
Alright guys, no fighting. While I may be inexperienced with these particular tools, I'm a big enough girl to make my own decisions (and mistakes!). After all, it's only a computer. :) And I have a full, bootable backup to fall back on. :) I appreciate hearing from all sides of the fence because that offers me more info from which I can base my own decision.
Clearly, there are options available to me that I know so little about that I don't know which options might be the best "fit" for me. I'll muddle along anyway. :p Regarding Jag... I'm not ready to install Jag. I'm waiting for "issues" surrounding Jag's newness to be resolved. Some people love working with new software; others do not. I fit the "do not" category. I'll upgrade only after you guys carve out a path to make most things work with Jag and when most software venders have upgraded their software to be Jag compatible. Quote:
Since I'm not hearing a bunch of comments about saving config files or fiddling with environments or anything like that, then I'm just going to jump off the deep end and download/install Fink. From there, I'll figure out how to get bash. If I totally screw up, I can always wipe out my drive and restore from my backup. :) Wish me luck! And I hope you guys won't hold my "stubborness" against me when I come running for help after screwing it all up! :D |
Stubborness is what will make you prevail with your quest to bend Unix your way. :) Like I said earlier, it's no big deal installing fink and then using apt-get to install bash. Please read the apt-get man page carefully before going ahead using it.
|
Fink's installed, and I'm selecting my first packages. I'm reading as I go (actually printing the instructions) and selecting the defaults. I'm pretty much clueless of what I'm doing other than just following the instructions it offers. I'll see soon enough what this does. :)
|
Code:
% fink --versionNow to figure out how to get bash. |
Code:
bash-2.05$ ps |
well done.
you don't need bash to be your default shell yet. so go ahead and change it back to tcsh. when you want to play in bash, you can start a bash subshell or login shell from tcsh in a new terminal window... Code:
tcsh% bash # subshell |
Thanks, Merv. I switched back to tcsh for now.
What I need to know is where to begin to set up my bash environment. I'm reading about editing my .profile file which I can't find. And editing my ~/.bashrc file which, apparently, I need to create (what if I want my environment for all users, not just me?). One source said to look at /usr/share/doc/bash/examples/startup-files for examples, but I neither have the dir nor the file itself. I don't even know where to begin to find what config files run when I start bash. Confusion abounds. :confused: One thing that would be helpful is a list of the config files that run when bash first starts. I might be able to pick out simple things like the prompt and aliases. Where do I find that info? I learned about it here for tsch, and I have edited those files with echo commands so I can see what runs when, but I haven't found a source to list the files for bash. Or to cut to the chase... HELP! :D |
Code:
% man bashN.B. : .bash_history is self-generating i'll send you a package. it will be ticking. |
/INVOCATION <-- Thank you! :D Now I have something to work with. :)
|
BASH Crumbs
I still haven't gathered particular portions - umm, why BASH anyhow?
Can someone point me to the thread or link that really started this BASHing? Do most of you UN*X folk prefer BASH over the default Mac OS X shell? Why or why not? |
I considered that very same question a couple of weeks ago. Here's a couple of links you may want to check out:
http://www.mars.org/home/rob/docs/csh-whynot.html http://docs.rinet.ru:8080/UNIXs/ch13.htm Note that bash is an acronym for Bourne Again Shell. I spent several hours rummaging through other links I found on Google, and I read the comments from others on Google Groups. Further, I have a friend who is a highly regarded consultant who knows Unix inside and out. He also blessed my switch from tcsh to bash. What's interesting is that I've actually found even more references to bash being preferred since I made my decision to switch than when I was actively hunting for info. Unfortunately, since my decision was already made, I didn't keep track of the urls. But I think what really hit home for me was that while I could find numerous references recommending bash over tcsh, I did not find one single recommendation for tcsh over bash. Not even one. I thought that was most telling of all. I'm sure others with more experience can offer a more detailed reason for switching. But I highly recommend doing you own research on the web as well. Once you've looked into it, I think you'll find yourself wanting to install bash too. |
Vickishome,
After a good night sleep, I 'm back again. It is great to know you have installed Fink and Bash successfully. MervTormel advices on bash are the best to come around to the forums. You're in good hands! Sorry if you sensed a bit of bickering in the air between osxpez posts and mine. My intention was to give you some information on how Fink works. Intended for now and the future. Never suggested to you to do this way or the other exclusively. Hope you enjoy bashing and the new toy (Fink). Cheers... |
osxpez,
awk.....awk......awk....................awkkkk. :D Cheers... PS: ..........awk.......!!! :) |
osxpez,
now seriously..........you said: Quote:
The tool that Fink has for installing from source ('fink') is a wonderful tool. Extremely reliable and well done and executed. What's your particular problem with this tool? Is it because it isn't a Linux tool? I really don't know what your problem is. I am eager to know, because if it is as bad as you suggest, maybe we should tell everybody, even to the Fink developers, so they can throw it away and doesn't cause more harm. Please elaborate. Sincerely... Cheers... |
Quote:
Quote:
Note that I consider myself to be one of those Joe users. Possibly in the more Unix-knowledgable half, but anyway. I have so far never had a need to move outside apt-get in my more than a year together with OS X. But I didn't know that at first and started out with "fink" which mostly went well, if slow, but a few times things refused to install and I spent days struggling with it. Then someone told me about apt-get and it felt like coming home. I just wished someone had told me about apt-get to begin with. As for my preferences when it comes to Linux; I think GNU/Linux is great as a server OS, especially Debian. But on the desktop Linux sucks ass. You have to really and badly want to work with it. And even so there's zilch, zero, nada consistency in the GUI (or I should say GUIs because there are plenty in the same environment). OS X is king! And with Fink, no sane and, knowledgable enough, person wanting a Desktop Unix could ever choose Linux over OS X. The $100 or so it costs is way worth it. Not until the Linux community does something like Aqua will Linux ever catch up on Joe users desktops. I fully and completely adore the Fink developers. They are my heroes. |
I downloaded, installed, configured fink once. I wanted some silly package, don't even remember what it was, but it recommended or required fink...
If someone would have offered me a built-in unixy method, I believe I would have taken it. I'm still not even sure why I needed fink, as I've installed other packages successfully without it. So Sao, why are you such a staunch supporter of fink? Can't install a package without it? |
On the tcsh vs bash subject. Though I think I have often said this. :) tcsh was a revolution to interactive shells when it arrived. But with it's csh heritage tcsh as a scripting tool pretty much sucks. ksh was the king of shell scripting back then. The developers of bash tried (and succeeded) to combine the power of the tcsh as an interactive shell (cloning much of it's features) with the scripting power of ksh. That leaves pretty few reasons to stick with tcsh I would say. Since bash other ksh derived shells has arrived as well, like zsh which is part of OS X 10.1 vanilla install. From what I heard zsh is at least as good as bash and adding interactive features at that.
I can see only one reason for some OS X'ers to stick to tcsh as their default shell. Because Apple insists on being stupid about tcsh and shipping OS X with tcsh as the default shell. Quite often you see install instructions and README's and stuff showing how to set up your environment, but only tcsh examples. So you have to know some tcsh and some bash to be able to translate those instructions to your bash environment. But it's not reason enough since it's quite a small obstacle. |
osxpez,
I agree with you in 99% of what you said. Except, that if all users would be using apt-get and dselect only, the precompiled binary packages you enjoy now, the ones you are so happy to have installed in the last year with apt-get and dselect, will be much less in quantity and supply as they will be longer sleeping in the unstable branch. So it works in your own interest really to promote the use of 'fink, the tool', not for all users, or the avarage Joe or Bob, but as an 'option' that users can consider. Fink is a volunteer effort. It is because of efforts from average users, together with the Fink developers, that you can enjoy the binary packages you are using now. As this is the only way, by testing, that packages can get out of unstable and be made into precompiled binaries. The ones you love to install. And you seem to have quite some experience like you said in the unix side of things: Quote:
"Think not about what your country can do for you, but what you can do for your country" With all your experience osxpez, what about testing some packages, to help the people you adore so much...your heroes. The ball is with you, and the tools too. Cheers... |
AKcrab,
What do you want? Both osxpez and me agree 100% that Fink and the tools of Fink -apt-get, dselect, dpkg and fink are great. So what's your problem? I fail to understand. You want to have a go? If so, please, elaborate. Cheers... |
AKcrab,
There are many threads in this Forum outlining the benefits of Fink (by Sao, MervTormel, osxpez, and others), not to mention numerous other sites you can visit. If you study a little you can discover, at the very least, why others find it such a useful tool. If you still feel it does not work for you, you are certainly entitled to your opinion, but I feel your comments have an overly negative tone which seems entirely out of place. What's the matter...you can't install a package with Fink? ;) beus |
Vicki: If you can live just a few days without your fancy tcsh prompt I think you can stay with bash as your default shell. You ask some very good questions and point out some of the more ugly parts of environment management. The main being "what should go where?" and "how does it matter?". Even professional Unix distributers sometimes don't know! I once had a freshly installed Mandrake Linux 7.x and it was evident that the Mandrake team had not succeeded in getting this right. I have a working setup on my OS X though and can share it and you can see if it helps any.
I have a symbolic link looking like this: /bin/bash -> /sw/bin/bash I'm not sure if Fink did this for me but if you don't have that link you can do: $ ln -s /sw/bin/bash /bin/bash Now for what goeas where and why. Not that I'm very good at it, but the bash man page tells us that an interactive login bash shell starts out with reading /etc/profile then goes on to read any ~/.bash_profile (I'm allowing myself to simplify it some). An interactive non-login shell starts with reading ~/.bashrc. (~/ means your home directory). Typically a non-interactive shell inherits it's environment variables from the parent shell so there's no need to but much environment variable setting in any bashrc file. The idea (I think) is to put aliases and functions and stuff into the bashrc files. Still with me? Good. Let's look at my startup files then. :) In the order of their execution as statet by "man bash". Code:
$ cat /etc/profileCode:
$ cat ~/.bash_profileI think it's a quite vanilla ~/.bash_profile, but don't remember how (if) it differs from the original one. So this means that my login shell does source ~/.bashrc which looks like this: Code:
$ cat ~/.bashrcLet's move on: Code:
$ cat /etc/bashrcWith this set up I can put all environment variables that should be used for all users in /etc/profile and all aliases and functions that should be used by all users in /etc/bashrc. Any PEZ local stuff I put in ~/.bash_profile and ~/.bashrc. You can make backup copies of any versions of these files you have and then try my setup. Also you can post your ~/.login and ~/.tcshrc and what have you and people here can try help you mimic your prompt and aliases. |
Quote:
Quote:
|
osxpez,
To be exact and precise, the following hardly seems a statement for 'most' users, but in the contrary, for all users who read it. Quote:
Quote:
You can easily leave your terminal or several running in the back installing and still you could give advice about your unix love. I do it all the time. Anyhow, let's leave it at that. Sorry to have bothered you, and have a happy time using what you take from Fink and giving your good advices. I personally learned a lot from your bash post above. Cheers... |
Vicki,
Here's an in depth page (with many examples) on the Bash prompt: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/ Here's the one I currently use (Teminal set to black background, white text): Code:
PS1="\[\033[1;33m\][\@][\u:\w]\[\033[0m\]\n\$ " |
osxpez, thank you for sharing your config files! Merv gave me his config files last night, but it was late and I was blurry-eyed so I just plopped them into my ~ dir and let it go at that. I'm going to copy your config files as well which will give me two examples of each file to work with. My first real Unix goal is to learn enough to comprehend what's in each set of config files so that I can edit them to only include what works best for me.
I have put echo tags in each file so I can track which files run when I start bash or tcsh (thanks to that long thread you guys posted long ago). This way I can see when each config file runs. This also helps me to figure out which config file to look at when there's an error. rusto, thank you! I definitely miss my old prompt. Regarding the question of fink/not fink... whether you guys meant to or not, you have both helped me to better understand what fink can do. I had read the info on the fink website, but that didn't quite explain it all as well as you two have. :) |
BTW, I must be missing something in my bash environment. Chown doesn't work! In fact, there are a number of things not working right.
For some reason, my /sw/bin/init.csh file said it was an Adobe image file. :confused: I know it's possible to change the file types using Unix, but I don't know those commands yet so I took the long route to fix the problem. I used BBEdit to copy the entire file, and put it in another file I named /sw/bin/init.csh2. Then I proceded to change the group and owner to match the original init.csh file. I had already switched to using bash as my startup shell. Chgrp worked just great. But when I attempted to use Chown, it said "command not found." Code:
$ chown root newfileCode:
$ man chmodCode:
Environment Setup Tagging: Running ~/.bash_profileOh, I did eventually get my /sw/bin/init.csh file straightened out. I switched back to tcsh as my startup shell, and made the appropriate changes that way. I just need to figure out what's wrong with my bash environment. I suspect I have a wrong path in a config file somewhere?? |
Got my man pages back in bash now. And chown is working again. :)
Merv's config files are so complex, I couldn't make heads or tails out of them. So I saved them elsewhere and plugged in osxpez's configs listed above. Now my man pages are back and chown is working. I also created the symbolic link you suggested, osxpez. Plus, I installed the utils you suggested (ls is in color! yeah!). I think I'll run with your simpler config files until I know what I'm doing a little better. I hadn't originally planned on switching to bash right now, but the book I'm reading uses bash in its examples, and so if I want to continue following the examples, I felt it was time to get bash installed. I believe I'm now at a point in which I can continue to read the book and run the examples myself so I have accomplished the goal I wanted. :) I have bash set up as my startup shell now. If I run into problems with bash, it's extremely easy to change my terminal preferences to fallback to tcsh so I haven't lost anything. osxpez, I am curious about the backspace key problem you're having. How can I find out if I'm also having that problem (thus, require the code in the configs to remedy it)? Since I'm now running your configs, I don't know how to test to see if I require that code in my configs or not. Can you elaborate on the backspace key problem or point me to a thread where you may have discussed it before? |
I might have missed someone's reply on this but bash is installed in the 10.2 installation. It's in /bin/bash. No fink required. That's for the people who aren't quite up for a fink install or like me are waiting for the couple of fink packages that I use to be updated before reinstalling fink.
|
Quote:
However, I'm going through these steps because I'm not installing Jag yet, but I want bash now. Just think... only 4 months ago, I was running my G3 with OS 8.1! Going to OS X/Unix/tcsh/bash/fink his has been a huge jump for me (and that doesn't include the fact that I have a new G4, new printer, new scanner and tons of new, upgraded software). I'm going to stick with OS X 10.1.5 until I finally catch my breath on all of these changes. |
Quote:
Quote:
Code:
$ cat /etc/bashrcHope I didn't confuse you as much as I confused myself with this post. |
Quote:
Quote:
|
One more thing, slightly off topic. I never use Apple's bundled Terminal application. It's lame and slow. From Aqua I use GLTerm which fast and the dude who made it is very friendly and responsive. Often I also use Eterm from OroborOSX. I have the full XDarwin installed as well, but I find OroborOSX most often being the best fit for me. As long as I have done my "sudo apt-get install eterm" I can just select Eterm from OroborOSX Start menu.
Anyone using Jag who can tell me if Terminal.app has gotten any faster there? |
osxpez,
Quote:
Quote:
You use pre-compiled packages and you are very happy with it. And it works very well for you. Great! I use only cutting edge unstable, and all my installation from source. And it works very well for me. Great! So both can coexist as it is not only 'your way'... Cheers... |
| All times are GMT -5. The time now is 10:35 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.