Visit Jeremy's Blog.
Go Back > Blogs > mowestusa
User Name


Rate this Entry

NetBSD Force Feeds Learning Bash

Posted 05-02-2007 at 07:05 PM by mowestusa

Do you remember learning Algebra for the first time? All of the sudden you went from doing math where you had all of the numbers and symbols laid out in neat little formulas, to having x,y,a,b, and c in place of numbers. Before you could ever figure out what would be the answer to the equation you first had to figure out the equation itself.

NetBSD does something very similar. For the inexperienced BSD user, the install leaves you longing for something more familiar on the CLI. You have your options during the install of NetBSD between sh, csh, or tksh. Coming from the Linux world, I did not even know that there were other shells, although I admit hearing lots of raving talk about zsh. Having finished my install of NetBSD, I had been taken back into the bowels of Unix history and given choices I did not understand. In the end, I went with the default sh for root, and continued on through the installation. You have probably guessed that the first thing which I added was Bash 3.2 from the binary package ISO for the i386.

One would think that I would be filled with happiness, and a smile would stretch from ear to ear for this happy Bash user, but all was not well. You see in the Linux world, del, home, end, page up, and page down all work as one would expect. All of these keys are usable and function as anticipated in Linux. NetBSD is a different story.

I will be honest. At this current date, I don't complete understand everything there is to know about the history or Unix and why NetBSD does not have these keys functioning from the beginning. I also don't completely understand the whole concept of terminals just yet either. I do know that NetBSD has so much potential if you know the right settings to enable. Remember, I'm coming from a Linux world filling with hand holding, and also a world where these things just work. In fact, on a Linux box I believe the only Bash settings that I have changed have to do with aliases until I came to NetBSD.

I do know that NetBSD uses a console driver called wscons. Although, wscons.conf file configures the virtual terminals you have available after boot, it does not do everything apparently. I did not have a terminal that had support for color, nor did the above keys work. The just beeped and left me frustrated as to the solution. Bash needs to know what console you are using under NetBSD and then it will happily enable color (which is needed for some ncurses programs), and it will enable home, page up, page down, and end. I still don't have del working as I would expect, but I'm hoping to find that solution still. A simple command in your ".bashrc" makes all the difference.

export TERM=wsvt25
That simple one line will configure your virtual terminals so you feel a little more at home in this different world of NetBSD.

Once again, I have to thank the NetBSD community for this solution. Also I've had a peek at new documentation that has been prepared recently for the NetBSD guide that might have given me enough of a clue that I would not have needed help from the mailing list. So my thanks to the recent NetBSD hackathon which focused on documentation.

I do believe that my lack of understanding or even the lack of imagining that such issues would be caused by a Bash TERM setting come from a few areas. NetBSD documentation is great, but it does seem to assume a certain level of understanding. I believe that it assumes that you would have read the documentation and fully understand every program that is installed in the base system of your box. Also I believe that the documentation assumes a historical understanding of the design and implementation of Unix or at the very least an advanced degree in computer science. I have none of the above qualifications. Perhaps, this makes me a poor choice as a user. Yet, I want to stick with NetBSD because it seems to offers blessings in an area of computer use that really excites me. I love old equipment, and I love keeping it useful and in service. So if I can help to preserve and continue to use some old computers thanks to NetBSD and their great support of so many different and old pieces of hardware, I want to use it.
Posted in Uncategorized
Views 649 Comments 0
« Prev     Main     Next »


All times are GMT -5. The time now is 02:28 PM.

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