Unix administration - correct term setting?

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > October 2005 > correct term setting?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author correct term setting?
Troy Piggins

2005-10-02, 8:50 pm

I log into my linux machine from a windows machine using puTTY over ssh,
and most programs I run using screen.

I posted the below originally on comp.editors thinking it was a vim
issue, but now am thinking it is a term/puTTY problem:

----- originally posted comp.editors -----
Something has bothered me for ages but have managed to do without is the
use of the numbers on my keypad with numlock on.

In my shell (bash) I can type keypad numbers and they work, but in vim
they don't. Searched the vim help for numlock, keypad, and numpad etc
only turned up bindings.

Is there a setting to enable them? What is it?
----- end -----

I should clarify that when I say they don't work in vim, they do send
"some characters" but I don't know what they are, and they certainly
aren't the numbers.

In the bash shell (no screen running) $TERM is xterm; in bash using
screen $TERM is xterm; in vim term defaults to $TERM; in
puTTY->terminal->keyboard->"Function keys and keypad" are set to "ESC[n~"

In vim I tried setting term=ansi, and the keypad worked then, but the
function keys didn't.

Any ideas? Not sure what other information to provide:
vim 6.1, bash 2.05b, puTTY 0.58, 104 key qwerty keyboard?

--
Troy Piggins
Where I live: 27 27 44 S 153 02 28 E
http://earth.google.com
Troy Piggins

2005-10-03, 7:50 am

* Stephane CHAZELAS wrote:
> 2005-10-02, 23:12(+00), Troy Piggins:
> [...]
>
> Go to the default settings in putty and use TERM=putty. Ensure that
> the terminfo entry for putty on your system is there:


Sorry to sound like a complete noob, but what do you mean by the first
sentence in that last paragraph? Do you mean just use all the default
putty settings, and on the linux machine I am connecting to put
TERM=putty in the ~/.bashrc? Tried that and no joy. In fact the
function keys no longer worked correctly either.

> infocmp putty


Yes, it showed up.

[troy@armadillo:troy]$ infocmp putty
# Reconstructed via infocmp from file: /usr/share/terminfo/p/putty
putty|xterm clone (win32),
am, bw, ccc, km, mir, msgr, xenl,
colors#8, cols#80, it#8, lines#24, pairs#64,
[snip]

> If not, get the source from
> http://www.chiark.greenend.org.uk/~...t/terminfo.html
>
> and compile it as root using tic(1).


Looked at that website and there were 2 terminfos, no idea which one you
mean for me to use, and since I have one already do I need it?

Thanks anyway.

--
Troy Piggins
Where I live: 27 27 44 S 153 02 28 E
http://earth.google.com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com