Other Hardware

Wiki Resources

Sponsored Links

Nano - Editor

The Nano editor is a simple, small, fairly easy to use text editor. It is generally considered an easier way to edit text configuration files than the vi editor included with the NSLU2, and lighter-weight than alternatives like emacs. Nano is described at the nano site.

Installation

Ipkg installer recognizes that it's dependant on ncurses package
and will install it if system doesn't already contain ncurses.

ipkg install nano

Next, log out from your telnet/ssh session with the Slug, and log in again. If you do not do this, you may discover that your text display is garbled when you first start nano.

Troubleshooting and configuration

Like all full-screen text editors, nano needs to have some way of knowing how to tell your terminal (your telnet or ssh program) where to draw its text. Below are many approaches to configuring Nano so that it knows this.

One symptom of this configuration being wrong is that your text display is garbled when you first start nano. For instance, the lower case letters could display as box drawing characters, while upper case letters display correctly. If this happens to you, don't panic. Assume that the letters you type are interpreted correctly, even if they are displayed wrong. Use ^X to exit Nano, and proceed with troubleshooting.

Logging out, restarting NSLU

If you log out from your telnet/ssh session with the Slug, and log in again, this might be enough to configure Nano so that it draws text correctly. It will certainly solve the garbled text problem caused by a mis-configured Nano.

If logging out doesn't work, try restarting the NSLU2. This is a more extreme form of the state reset which logging out accomplishes.

Configure TERMINFO

The TERMINFO environment variable helps programs which display text understand how to tell your terminal (your telnet or ssh program) where to draw its text. If the above steps don't get this set automatically, you may have to set it manually.

NOTE: the solutions below are not in a very helpful order. Read the whole page (the first solution is reported not to work). If you can edit the page to make it more helpful, that would be wonderful. This is a wiki, after all.

You need to also set the TERMINFO variable to /opt/share/terminfo

export TERMINFO=/opt/share/terminfo

If you get:

Error opening terminal: unknown.

Another word in the place of "unknown" indicates that TERM is set incorrectly. Follow direction below.

I've searched everywhere for a solution being a total Linux newbie, but i was quite sure that somewhere in this strange OS there had to be some kind of boot files which got loaded. I couldn't find them, and no matter what i did, it wouldn't work.

Then i stumbled on the Midnight Commander package, and saw another solution i hadn't seen before.

Instead of setting the TERMINFO like this export TERMINFO=/opt/share/terminfo

it should be like this export TERMINFO=/opt/lib/terminfo

and dont forget the path export PATH=$PATH:/opt/sbin:/opt/bin

all that i put in a file called profile in the /etc library, i would rather put it in the /opt/etc library, so it wouldn't get erased in the situation that i upgrade firmware or something like that, but i can't get it to work.

Hope that helps you

Well on to the next adventure, the FTP server;-)

This guy is on the right track. I used the following in my /etc/profile:

Of course, this all assumes that the terminal emulator that you're using is a vt100 or compatible. Which it might not be.

Your ssh client and server really should work this out and set TERM to something sensible for you. What was TERM set to (if anything) before you re-defined it? Perhaps it was set to something that isn't included in your terminfo database. In this case, changing it to something that is in your terminfo and is compatible is sensible. You can put conditional code in your /etc/profile or ~/.profile to do this:

vt100 wouldn't work for me, I had to use export TERM=dec-vt100. The toe command lists available terminals (i think).

---

I'm a newbie. I did everything to "export TERMINFO=/opt/share/terminfo" and it returned without error. I was a bit confused when nano didn't work after that but it works ok after a reboot.

---
Hi, I just started using the NSLU2, but couldn't make thing work for me as described above. I have Unslung 6.8-beta and want to use nano and mc. After searching/reading/fiddling I have found the settings that work for me.
My /etc/profile looks like this: