NSLU2-Linux
view · edit · print · history

Nano - Editor

The Nano editor is described at the nano site.

NOTE: Many people seem to experience the same problem I did - nano does not work after "ipkg install nano". I simply rebooted and everything worked fine! I did NOT need to follow any of the below, more complicated "solutions". I suggest rebooting first before reading any further. _________________________________________________________________________________________________________________________

Remark: Read the whole page (the first solution does not work)...

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

 ipkg install nano

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.

Set your TERM variable:

 export TERM=vt100

You can place these variables in your /etc/profile:

 export TERMINFO=/opt/share/terminfo
 export TERM=vt100

___________________________________________________________________________________________________________________

Unfortunately that didn't work for me.

Here comes a total newbie solution.

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:

export TERMINFO=/opt/lib/terminfo

export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/sbin:/opt/bin:/opt/sbin:/opt/bin

export TERM=vt100

After a save and re-login, nano works perfectly.


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:

case $TERM in linux|xterm|someweirdvt100comptabileterm) export TERM=vt100 ;;

  • ) # don't change TERM

esac


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:

 export PATH=$PATH:/opt/sbin:/opt/bin
 export TERMINFO=/opt/share/terminfo
 export TERM=linux

The keyboard-settings in PuTTy? are changed to 'linux' (instead of the default 'ESC[n~')

The function keys in mc are working perfectly now and nano works as it should too.

ABE

---

Using Ubuntu 7.04 I found that this works the best:

 export TERM=xterm

---

view · edit · print · history · Last edited by slyhne.
Based on work by abe, cyrxi, Per-Einar Dahlen, metamind, calvin, Phil Endecott, Josh, Kim Sandberg, ka6sox, ByronT, jake, and wiredduns.
Originally by wiredduns.
Page last modified on May 18, 2007, at 09:59 PM