Wednesday, November 08, 2006

Cygwin terminal problem fixed

I have Cygwin ("a Linux-like environment for Windows") on two computers which both run Windows XP. If you want to use some Unix-based utilities with real shell scripts, but your employer won't let you install Linux on your computer, Cygwin is the way to go. Anyway, I have been annoyed for a couple of months with one of these installations.

On Cygwin on my laptop, I always got an error message, "WARNING: terminal is not fully functional" whenever I tried running the man command. On my other installation, I got nicely formatted and colored documentation, which paged nicely. I tried lots and lots of tweaks to get the Cygwin installation on my laptop to work properly, including reinstalling Cygwin, the groff program, and messing with .bashrc and everything else, but nothing fixed the problem.

Today I set both systems side-by-side and set out to conquer this gremlin. I ran "cygcheck -c -s -v" on each system, output the results to a disk file, and ran a diff on them. Many differences turned up, but nothing special jumped out at me. The cygcheck comparison, helpful as it was, did not give the solution.

Somehow I noticed that the home directory of my desktop computer (the one which worked) did not have a ".termcap" file, at all. The home directory on my laptop computer (the one that always gave that error message) did have a ".termcap" file.

"Hmmm . . .," I thought. "I wonder if that could be the problem." I renamed the ".termcap" file in my home directory to something else, restarted Cygwin, and instantly the problem disappeared. Now less and man work exactly the way they should. Problem solved!

I'm sure most people have no interest in this, but for me, it was a small victory worth saving to the web. Hope it helps somebody else who uses Cygwin.


Blogger Oberon said...

.......i hope they grow a t-rex.

6:51 PM  
Blogger Jon Trott said...

Eric, funny you're putzing around with Linux. I just rebuilt my rather antique 400mhz Linux server box (an old but cool IBM 300PL), and installed Ubuntu 6.06 on it. From there, I upgraded fairly easily to 6.10 over the internet. Very slick Gnome-based desktop...

Anyway, your tweak will, I'm sure, come in VERY handy to someone, just as my struggle to get vsftpd (the ftp server) in Ubuntu up and tweaked to do what I wanted it to do was helped by a guy's (mis)adventures with its /etc/vsftpd.conf file.

I've now linked to you from yet another page: -- also accessible from


6:25 PM  

Post a Comment

<< Home