Log in

No account? Create an account

Previous Entry Share Flag Next Entry
Just installed NetBSD
sinistertim101 wrote in netbsd
2 things that are driving me crazy.

1.) I noticed I can not do a backspace without "^H^H" appearing. This is driving me crazy
2.) The keys "pageup" and "pagedown" do not function in Vi.

Do any of you guys know how to fix these 2 problems? I guess I should have backed up my vi files from FreeBSD before I attempted the install.

I am about to install the pkg distribution sets but I can read the NetBSD documentation on my own and install them.


  • 1
1.) You're probably using one of the shells that came with the system, which are the regular Bourne shell (/bin/sh), the C shell (/bin/csh) and the Korn shell (/bin/ksh). You can try downloading a more advanced shell, such as bash or tcsh as a binary package, or build it from pkgsrc, then use that as your shell.

2.) Check your terminal type. At the console, make sure it's vt220. If it's not, make sure you're using wscons, which is the default on i386 systems. If you are, change the terminal type in /etc/ttys to vt220. If you're not on a platform that supports wscons, I'm afraid you're on your own.

Probem is I can not use insert mode in vi to change anything because its emulating the old vt100 which is the default. Its really screwed up.

Insert mode just moves the cursor over the next block of text and all I can do is overwrite because the delete and backspace keys wont work. WIthout that I can not change my terminal type.

Maybe I can use ed? ... shudder?

I think I may know what's going on here. Do you come from a Linux background? If so, you're probably used to vim, or vi Improved, which is the default editor on Linux systems. All *BSD systems, including NetBSD, use the original vi as created by Bill Joy and used in the original Berkeley Software Distribution.

The Delete and Backspace keys aren't used in the original vi. Your options are either to install vim or learn the keys for vi. The vital ones are as follows:

a - insert text after the cursor's current place
i - insert text at the cursor's current place
d,left arrow, d,right arrow - delete the charater to the left or right of the cursor
d,w - delete the current word
d,d - delete the current line
esc - go into command mode from insert mode
:q - quit (assuming you have either not modified the file or you have written it to disk)
:wq - write the file to disk and quit
:q! - quit without writing the file to disk
:w! - write the file to disk even if it doesn't have the write permission set

That should be more than enough for you to do what you need to do. If your arrow keys don't work, the h, j, k, and l keys will move your cursor left, down, up, and right respectively.

I hope this helps.

I use vi and not vim in freebsd when editing simple text files and I do not have this problem. I can not even move around vi in "insert" mode properly.

I think I am going to wipe NetBSD and switch back to Linux. The lack of 3d graphics and native java support really blow. Its not NetBSD's fault of course as it makes an awesome and reliable server that is simple to administer. Its just alot of work.

you can't move the cursor around in vi when you're in insert mode.

however, yes, there is no 3D video support, but there is native Java, though I am not a java guy, so I don't know anything about how to make it so...

No I can only tab across text already written in insert mode with no backspace option which makes it useless since I can not type anything because the first character of the orginal text has to stay. Something is up with the terminal settings.

The java that is beyond 1.2 is linux emulated. If I recall its not 100% compatible because the jvm needs to do some direct hardware/access calls. For example Opengl in java will not run as well as some other api's.

At least that was the problem under FreeBSD. Linux emulated Java is used only to bootstart and compile a native java from Sun's source code with a few FBSD patches from some guy's website. I assume it would be the same under NetBSD.

Don't give up! :-)

Looks like someone's already given you some TERM advice, and once you play and learn some more, you'll love it.

I wonder if you have the space or machines to run both Linux and NetBSD?


setenv TERM vt220 # if you're using /bin/csh


TERM=vt220 ; export TERM # if you're using /bin/sh


I switched from csh to sh and the backspace works again. I will add both of these settings to my profiles to see if it helps my problems in vi as well.

1. stty erase ^H
2. make sure you're in command mode when pressing page up or page down.

  • 1