1.1 About this FAQ
1.2. How do I contribute to it?
1.3. What is GNU nano?
1.4. What is the history behind nano?
1.5. Why the name change from TIP?
1.6. What is the current version of nano?
1.7. I want to read the manpage without having to download the program!
2.1. FTP and WWW sites that carry nano.
2.2. RedHat and derivatives (.rpm) packages.
2.3. Debian (.deb) packages.
2.4. By CVS (for the brave).
3.1. How do I install the RPM or DEB package?
3.2. Compiling from source: WHAT THE HECK DO I DO NOW?
3.3. Why does everything go into /usr/local?
3.4. I get errors about 'bindtextdomain','gettext', and/or 'gettextdomain'. What can I do about it?
3.5. nano should automatically run strip on the binary when installing it!
3.6. How can I make the executable smaller? This is too bloated!
3.7. Tell me more about this multibuffer stuff!
3.8. Tell me more about this verbatim input stuff!
3.9. How do I make a .nanorc file that nano will read when I start it?
4.1. How do I open a file with a name beginning with '+' from the command line?
4.2. Ack! My Backspace/Delete/Enter/Meta/double bucky key doesn't seem to work! What can I do?
4.3. Ack! My numeric keypad's keys don't work properly when NumLock is off! What can I do?
4.4. Ack! When I hold down a Meta key combination for a while, the character of the held key gets inserted now and then. What gives?
4.5. How do I type the F13-F16 keys shown in the help browser? My keyboard only has F1-F12!
4.6. nano crashes when I type <insert keystroke here>!
4.7. nano crashes when I resize my window. How can I fix that?
4.8. [version 1.3.12 and later] I'm using glibc 2.2.3, and nano crashes when I use color support or do regular expression searches. How can I fix that?
4.9. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?
4.10a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!
4.10b. [version 1.1.99pre1 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?
4.11. How do I make nano my default editor (in Pine, mutt, etc.)?
4.12. I've compiled nano with color support, but I don't see any color when I run it!
4.13. How do I select text for or paste text from the clipboard in an X terminal when I'm running nano in one and nano's mouse support is turned on?
4.14. When I paste text into a document, each line gets indented further than the last. Why does nano do this, and how can I avoid it?
5.1. There's no translation for my language!
5.2. I don't like the translation for <x> in my language. How can I fix it?
5.3. What is the status of Unicode support?
6.1. Why should I use nano instead of Pico?
6.2. Why should I use Pico instead of nano?
6.3. What is so bad about the Pine license?
6.4. Okay, well what mail program should I use then?
6.5. Why doesn't UW simply change their license?
6.6. What if tomorrow UW changes the license to be truly Free Software?
7.1. nano-related mailing lists.
7.2. I want to send the development team a big load of cash (or just a thank you).
7.3. How do I submit a patch?
7.4. How do I join the development team?
7.5. Can I have CVS write access?
This FAQ was originally written and maintained by Chris Allegretta <email@example.com>, who also happens to be the creator of nano. It is currently maintained by David Lawrence Ramsey <firstname.lastname@example.org>. Maybe someone else will volunteer to maintain this FAQ someday, who knows...
Your best bet is to send it to the nano email address, email@example.com and if it is useful enough it will be included in future versions.
GNU nano is designed to be a free replacement for the Pico text editor, part of the Pine email suite from The University of Washington. It aims to "emulate Pico as closely as possible and perhaps include extra functionality".
Funny you should ask!
In the beginning...
For years Pine was THE program used to read email on a Unix system. The Pico text editor is the portion of the program one would use to compose his or her mail messages. Many beginners to Unix flocked to Pico and Pine because of their well organized, easy to use interfaces. With the proliferation of GNU/Linux in the mid to late 90's, many University students became intimately familiar with the strengths (and weaknesses) of Pine and Pico.
Then came Debian...
The Debian GNU/Linux distribution, known for its strict standards in distributing truly "free" software (i.e. software with no restrictions on redistribution), would not include a binary package for Pine or Pico. Many people had a serious dilemma: they loved these programs, but they were not truly free software in the GNU sense of the word.
It was in late 1999 when Chris Allegretta (our hero) was yet again complaining to himself about the less-than-perfect license Pico was distributed under, the 1000 makefiles that came with it and how just a few small improvements could make it the Best Editor in the World (TM). Having been a convert from Slackware to Debian, he missed having a simple binary package that included Pine and Pico, and had grown tired of downloading them himself.
Finally something snapped inside and Chris coded and hacked like a madman for many hours straight one weekend to make a (barely usable) Pico clone, at the time called TIP (Tip Isn't Pico). The program could not be invoked without a filename, could not save files, had no help text display, spell checker, and so forth. But over time it improved, and with the help of a few great coders it matured to the (hopefully) stable state it is today.
In February 2001, nano was declared an official GNU program by Richard Stallman. nano also reached its first production release on March 22, 2001.
On January 10, 2000, TIP was officially renamed to nano because of a namespace conflict with another program called 'tip'. The original 'tip' program "establishes a full duplex terminal connection to a remote host", and was included with many older Unix systems (and newer ones like Solaris). The conflict was not noticed at first because there is no 'tip' utility included with most GNU/Linux distributions (where nano was developed).
The current version of nano *should* be 2.0.6. Of course, you should always check the nano homepage to see what the latest and greatest version is.
Jeez, demanding, aren't we? Okay, look here.
The nano distribution can be downloaded at the following fine web and ftp sites:
Debian users can check out the current nano packages for:
You can also have a look at the Package Pool to see all the available binary and source packages.
Note that versions < 0.9.10 are probably not for those wanting to get serious work done, so if you are using Debian 2.2, check that you have updated to 2.2r3, which comes with nano 0.9.23. If you're tracking unstable, you probably have the newest version already.
For the 'bleeding edge' current version of nano, you can use CVS to download the current source code. Note: believe it or not, by downloading code that has not yet stabilized into an official release, there could quite possibly be bugs, in fact the code may not even compile! Anyway, see the nano CVS page for info on anonymous CVS access to the nano source.
It's simple really! As root, type rpm -Uvh nano-x.y.z-1.i386.rpm if you have a RedHat-ish system or dpkg -i nano_x.y.z-1.deb if you have a Debian-ish system, where x.y.z is the release of nano. There are other programs to install packages, and if you wish to use those, knock yourself out.
Okay, take a deep breath, this really isn't hard. Unpack the nano source with a command like:
tar -zxvf nano-x.y.z.tar.gz
If you get error messages about the -z option, try this:
gzip -dc nano-x.y.z.tar.gz | tar xvf -
(again, where x.y.z is the version number in question). Then you need to run configure with any options you might want (if any).
The average case is this:
make install (as root, of course)
Well, that's what the configure script defaults to. If you wish to change this, simply do this:
to put nano into /usr/bin when you run make install.
Try doing a ./configure --with-included-gettext and see if that solves your problem. You may need to do a make clean; make to get it to work fully.
Actually, it does, but you have to use make install-strip. The default make install does not, and will not, run strip automatically.
Actually, there are several parts of the editor that can be disabled. You can pass arguments to the configure script that disable certain features. Here's a brief list:--disable-tabcomp Disable tab completion functions --disable-justify Disable justify/unjustify functions --disable-speller Disable spell checker functions --disable-help Disable help functions --disable-browser Disable built-in file browser --disable-wrapping Disable all wrapping of text (and -w flag) --disable-mouse Disable mouse support (and -m flag) --disable-operatingdir Disable setting of operating directory
There's also the --enable-tiny option which disables everything above, as well as some larger chunks of the program (like the marker code that you use Control-^ to select with). Also, if you know you aren't going to be using other languages you can use --disable-nls to disable internationalization and save a few K to a few dozen K depending on if you have locale support on your system. And finally there's always good old strip to strip all debugging code and code that exists in libraries on your system.
If, on the other hand, you can't live without bells and whistles, you could try:--enable-extra Enable extra features, currently only easter eggs --enable-nanorc Enable use of .nanorc files --enable-color Enable color and syntax highlighting --enable-multibuffer Enable having multiple file buffers open --enable-all Enable all of the above features --disable-wrapping-as-root Disable text wrapping by default when the user is root
To use multiple file buffers, you must be using nano 1.1.0 or newer, and you must have configured nano with --enable-multibuffer (use nano -V to check). Then when you want to enable inserting a file into its own buffer instead of into the current file, just hit Meta-F, then insert the file as normal with ^R. If you always want files to be loaded into their own buffers, use the --multibuffer or -F flag when you invoke nano.
You can move between the buffers you have open with the Meta-< and Meta-> keys, or more easily with Meta-, and Meta-. (clear as mud, right? =-). When you have more than one file buffer open, the ^X shortcut will say "Close", instead of the normal "Exit" when only one buffer is open.
To use verbatim input, you must be using nano 1.3.1 or newer. When you want to insert a literal character into the file you're editing, such as a control character that nano usually treats as a command, first press Meta-V. (If you're not at a prompt, you'll get the message "Verbatim Input".) Then press the key(s) that generate the character you want.
Alternatively, if you've enabled Unicode support (see section 5.3), you can press Meta-V and then type a six-digit hexadecimal code from 000000 to 10FFFF (case-insensitive), and the character with the corresponding value will be inserted instead. The prompt will change to "Unicode Input" when you do this.
It's not hard at all! But, your version of nano must have been compiled with --enable-nanorc, and again must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the nanorc.sample that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax is simple. Flags are turned on and off by using the word set and the getopt_long flag for the feature, for example "set nowrap" or "set suspend".
If a command line option that begins with '+' is followed by another option, the former is always treated as a starting line and column number and the latter is always treated as a filename. If a command line option that begins with '+' isn't followed by another option, it's always treated as a filename. Examples:
To open '+filename.txt' starting on line 1: nano +filename.txt
To open '+filename.txt' starting on line 10: nano +10 +filename.txt
To open '+filename.txt' starting on line 1, column 20: nano +,20 +filename.txt
To open '+filename.txt' starting on line 10, column 20: nano +10,20 +filename.txt
To open '+filename.txt' starting on line 1 and 'filename.txt' starting on line 10 (if nano has been compiled with multibuffer support): nano +1 +filename.txt +20 filename.txt
Try setting your $TERM variable to 'vt100'. nano doesn't yet support every term entry under the sun.
Bourne shell users (bash and sh): export TERM=vt100
C Shell users (tcsh and csh): setenv TERM vt100
You can use the -K or --rebindkeypad options on the command line, or add the line set rebindkeypad to your .nanorc. However, nano's mouse support won't work properly if you do any of these things.
This is a bug in the terminal, not in nano. When a key is repeating faster than nano can process it, the keyboard buffer becomes full and starts dropping incoming keystrokes. Unfortunately, it doesn't just drop whole keystrokes; it can also drop parts of multibyte key combinations, resulting in nano's receiving a wrong key.
It depends on the terminal type you're using. On some terminals, such as the FreeBSD console, xterm, konsole, and gnome-terminal, Shift-F1 to Shift-F4 will generate F13 to F16. On other terminals, such as the Linux console, rxvt, and Eterm, Shift-F3 to Shift-F6 will generate F13 to F16.
If you aren't trying some bizarre keystroke combination with some bizarre $TERM entry, chances are you have found a bug. You are welcome to submit it to the nano-devel list or to firstname.lastname@example.org.
Older versions of nano had this problem, please upgrade to a newer version (at least 0.9.9 would be great, 0.9.12 is recommended).
It's a bug in glibc 2.2.3. You should upgrade to at least glibc 2.2.4.
The help (^G) and justify (^J) function were among the last to be written. To show the improvements that nano had over Pico (go to line # and replace), ^_ and ^\ were put on the shortcut list. Later, ^G came back in place of ^_ as it proved to be very valuable for new Unix users. If you use the -p option to nano (or hit Meta-P) you will get the same shortcuts at the bottom as Pico.
In nano version 0.9.20, the default is to have a completely consistent user interface across all user input functions. This means that regardless of whether you're being asked for a filename to insert or write, or a string to search for, the previous value is already inserted before the cursor. If you prefer the old behavior, use the Pico emulation mode (-p or --pico) or just hit Meta-P while in nano (see the ^G help text for more details).
It was decided that consistency was nice, but people are used to Pico's inconsistent behavior. Also, in version 1.1.99pre1, search and replace history was introduced. If you wish to edit your previous search/replace entry (or any previous entry), you can do so by hitting the up arrow to cycle through your history. This method allows the best of both worlds: You don't need to erase the previous string if you want to enter a new one, but you can with one keystroke recall previous entries for editing. Therefore there is now no "Pico mode", nano is and has always been a Pico clone, and clones by default should be compatible.
You need to make nano your $EDITOR. If you want this to be saved, you should put a line like this in your .bashrc if you use bash (or .zshrc if you believe in zsh):
or, if you use tcsh, put this in your .cshrc file:
setenv EDITOR /usr/local/bin/nano
Change /usr/local/bin/nano to wherever nano is installed on your system. Type "which nano" to find out. This will not take effect until the next time you login. So log out and back in again.
Then, on top of that, if you use Pine, you must go into setup (type S at the main menu), and then configure (type C). Hit Enter on the lines that say:
[ ] enable-alternate-editor-cmd
[ ] enable-alternate-editor-implicitly
Then exit (E) and select Yes (Y).
If you're a mutt user, you should see an effect immediately the next time you log in. No further configuration is needed. However, if you want to let people know you use nano to compose your email messages, you can put a line like this in your .muttrc:
my_hdr X-Composer: nano x.y.z
Again, replace x.y.z with the version of nano you use.
If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Some example configurations are in the nanorc.sample that comes with the nano source or your nano package. See Section 3.9.
Try holding down the Shift key and selecting or pasting the text as you normally would.
You have the autoindent feature turned on. Hit Meta-I to turn it off, paste your text, and then hit Meta-I again to turn it back on.
On June of 2001, GNU nano entered the Free Translation Project and since then, translations should be managed from there.
If there isn't a translation for your language, you could ask your language team to translate nano, or better still, join your team and do it yourself. Joining a team is easy. You just need to ask the TP coordinator to add you to your team, and send a translation disclaimer to the FSF (this is necessary as nano is an official GNU package, but it does not mean that you transfer the rights of your work to the FSF, it's just so the FSF can legally manage them).
In any case, translating nano is very easy. Just grab the nano.pot file from the latest and greatest nano distribution (it's in the po/ directory) and translate each line into your native language on the msgstr line. When you're done, you should send it to the TP's central po repository.
The best way would probably be to e-mail the person listed in the
Last-Translator:field in the <your_language>.po file with your suggested corrections and they can make the changes reach the nano-devel list.
In version 1.3.12 or later, Unicode should be usable. With your terminal, locale (LC_ALL and similar environment variables), and encoding configured to properly support UTF-8, you should be able to enter and save Unicode text.
There are many reasons to use nano instead of Pico, a more complete list can be found at the nano homepage.
Again, check out the nano homepage for a good summary of reasons. It really is a matter of personal preference as to which editor you should use. If you're the type of person who likes using the original version of a program, then Pico is the editor for you. If you're looking for a few more features and a 'better' license as far as adding your own changes (sacrificing mailer integration with Pine), nano is the way to go.
The U of W license for Pine and Pico is not considered truly Free Software according to both the Free Software Foundation and the Debian Free Software Guidelines. The main problem regards the limitations on distributing derived works: according to UW, you can distribute their software, and you can modify it, but you can not do both, i.e. distribute modified binaries.
If you are looking to use a Free Software program similar to Pine and emacs is not your thing, you should definitely take a look at mutt. It is a full-screen, console based mail program that actually has a lot more flexibility than Pine, but has a keymap included in the distribution that allows you to use the same keystrokes as Pine would to send and receive mail. It's also licensed under the GPL.
You're really not asking the right person here. I (Chris) waited a long time to see if UW would change their license because of the amount of high quality software being released and developed under the GPL without being taken advantage of by malicious corporate entities or other baddies, but no such luck so far.
Honestly nothing would make me happier than to see that happen. nano would continue to be developed independently until such time as Pico had all the features nano did or the projects merged. That just does not seem very likely given that there has been no sign of any changes in the past few years in a positive direction.
There are three mailing lists for nano hosted at Savannah, info-nano, help-nano and nano-devel. info-nano is a very low traffic list where new versions of nano are announced (surprise!). help-nano is for getting help with the editor without needing to hear all of the development issues surrounding it. nano-devel is a normally low, sometimes high traffic list for discussing the present and future development of nano. Here are links to where you can sign up for a given list:
info-nano - http://mail.gnu.org/mailman/listinfo/info-nano/
help-nano - http://mail.gnu.org/mailman/listinfo/help-nano/
nano-devel - http://mail.gnu.org/mailman/listinfo/nano-devel/
That's fine. Send it our way! Better yet, fix a bug in the program or implement a cool feature and send us that instead (though cash is fine too).
See Section 7.2.
The easiest way is to consistently send in good patches that add some needed functionality, fix a bug or two and/or make the program more optimized/efficient. Then ask nicely and you will probably be added to the Savannah development list and be given CVS write access after awhile. There is a lot of responsibility that goes along with being a team member, so don't think it's just something to add to your resume.
Re-read Section 7.4 and you should know the answer.
2007/04/18 - Add a new section 4.14 to explain how autoindent affects pasted text. (John M. Gabriele, minor tweaks by DLR)
2007/04/04 - Update email address. (DLR)
2007/01/01 - Update section 4.1 to describe how to open files with names beginning with '+' at specified columns as well as lines. (DLR)
2006/11/25 - Add miscellaneous wording and capitalization fixes. (DLR)
2006/10/28 - Update various links for the 2.0 branch of nano. (DLR)
2006/10/06 - Update the question in section 4.13 to match the version of it in the answer section. (DLR)
2006/07/25 - Update section 5.3 again to not state "the latest development version" before 1.3.12, as it's no longer accurate. Also add some minor spacing fixes. (DLR)
2006/06/12 - Update section 5.3, due to the display fix for two-column Unicode characters. (DLR)
2006/06/05 - Add a new section 4.8, and move all section 4 entries after it down one number, to explain how to deal with glibc 2.2.3's crashes involving extended regular expressions. (DLR)
2006/06/04 - Add minor punctuation, wording, and typo fixes. (DLR)
2006/05/27 - Update section 3.8 to mention the new "Unicode Input" prompt, and how Unicode input only works when Unicode support is enabled. (DLR)
2006/05/12 - Remove section 4.4, and move all section 4 entries after it up one number, since it no longer applies. Meta-] and Meta-[ are no longer used to indent and unindent marked text, since they require that the bracket matching key change to Ctrl-], which is used as the telnet escape key (found by Chris). Also, make the link to the nano CVS page a bit more readable. (DLR)
2006/05/08 - Add a new section 4.5, and move all section 4 entries after it down one number, to explain a problem that can occur when holding down keys to generate Meta sequences. Also add a few more capitalization and wording fixes. (Benno Schulenberg, minor tweaks by DLR)
2006/05/01 - Add a new section 4.4, and move all section 4 entries after it down one number, to explain how to deal with problems typing Meta-[. Also add a few capitalization and wording fixes. (DLR)
2006/04/14 - Clarify section 1.4: help menu -> help text display. (DLR, suggested by Benno Schulenberg)
2006/03/16 - Update the Free Translation Project's address, change the character set to UTF-8, and remove broken links to contributed RedHat nano packages. (DLR)
2005/11/21 - Clarify section 5.3 to better explain how to enable Unicode support, and remove the mention of quirks, since they turned out to not be a nano problem. (Mike Frysinger and DLR)
2005/11/19 - Add a new section 5.3 to explain the status of nano's Unicode support. (Mike Frysinger, minor tweaks by DLR)
2005/08/27 - Update email address. (DLR)
2005/08/10 - Add a new section 4.3, and move all section 4 entries after it down one number, to explain how to deal with numeric keypad problems. (DLR)
2005/08/08 - Update section 3.8 to mention that verbatim input mode now takes a six-digit hexadecimal number. (DLR)
2005/07/04 - Update section 4.10 to mention that pasting from the X clipboard via the middle mouse button also works when the Shift key is used. (DLR)
2005/06/15 - Update description of --enable-extra, and add missing line breaks. (DLR)
2005/06/13 - Minor capitalization and wording fixes. (DLR)
2005/06/08 - Updated section 1.1 to mention the current maintainer. (DLR)
2005/03/09 - Added question about opening files with names beginning with '+'s, and added a few more miscellaneous cosmetic fixes. (DLR)
2005/01/03 - Removed now-inaccurate note about verbatim input's not working at prompts, and update its description to mention that it handles hexadecimal values now. (DLR)
2004/11/21 - Listed sh as an example of a Bourne shell. (DLR)
2004/11/05 - Fixed inaccuracy: Pico compatibility mode was made the default in nano 1.1.99pre1, not 1.2.2. Also added question about how to type F13-F16 on terminals lacking keys past F12 (suggested by Chris), question about how to select text for the clipboard in X terminals with nano's mouse support turned on (answer found by Joseph Birthisel), and misc. fixes and link updates. (DLR)
2004/04/07 - Removed NumLock glitch question, as it's no longer needed. (DLR)
2004/01/30 - Fixed inaccuracy: multibuffer mode was first in nano 1.1.0, not 1.1.12. (DLR)
2003/12/31 - Added question about the new verbatim input function, and a few minor fixes. Removed reference to "set pico" (DLR).
2003/07/02 - Added question about nano's not showing color when it's compiled with color support (DLR; suggested by Jordi).
2003/02/23 - Updated RPM links for nano 1.2.x (DLR).
2003/01/16 - Split section 4.5 into 4.5a and 4.5b for search string behavior. Added --enable-all docs.
2002/12/28 - More misc. fixes (David Benbennick, DLR).
2002/10/25 - Misc. fixes and link updates (DLR).
2002/09/10 - Another typo fix (DLR).
2002/05/15 - Typo fix (DLR).
2001/12/26 - Misc. fixes (Aaron S. Hawley, DLR).
2001/10/02 - Update for Free Translation Project.
2001/10/02 - Assorted fixes, Debian additions.
2001/06/30 - Silly typo fix.
2001/05/05 - Spelling fixes by David Lawrence Ramsey.
2001/05/02 - Misc fixes.
2001/03/26 - Typo fix in an URL.
2001/02/17 - Advocacy updates.
2001/02/15 - Added GNU notes for 0.9.99pre3.
2001/02/06 - Typo fixes.
2001/01/14 - Added note about NumLock glitch.
2001/01/10 - Linux -> GNU/Linux.
2001/01/09 - Added "making exe smaller" section.
2000/12/19 - Typo and assorted error fixes.
2000/11/28 - Added blurb about make install-strip.
2000/11/19 - Changed Debian frozen to stable.
2000/11/18 - Previous string display (4.5).
2000/09/27 - Moved addresses to nano-editor.org.
2000/06/31 - Initial framework.
$Id: faq.html,v 18.104.22.168 2007/04/26 12:00:33 dolorous Exp $