Re: screen, PuTTY, and kernel config

2009-03-20 Thread Chris Lieb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 3/10/2009 3:20 PM, Chris Lieb wrote:
> Micah Cowan wrote:
>> Chris Lieb wrote:
>>> Micah Iowan wrote:
 GNU ncurses has a specific entry for putty, so you might want to "tic"
 the latest terminfo definitions from ncurses (it's in a file named
 misc/terminfo.src, IIRC). And then, of course, have PuTTY set TERM to
 "putty". (You'd need to compile these terminfo descriptions on each
 system you use screen on.)
>>> What do you mean by "tic" the latest terminfo?  I was unable to find a
>>> file called terminfo.src on my system using slocate.
>> What I meant is, download the latest ncurses package from GNU, and run
>> "tic" on that file, which you should find within the extracted directory.
> 
> Tried just 'tic'ing the terminfo.src from ncurses 5.7 (I'm running 5.6
> currently), but it spit out a bunch of warnings about unknown
> capabilities.  I also tried upgrading to ncurses 5.7 and cleaning the
> kernel (build against new ncurses), but that did not fix it either.
> 
 Otherwise, typing your cursor keys while running
 cat-under-screen-under-putty, and comparing with what terminfo/termcap
 say about what the cursor keys should be, is often illuminating.
>>> I get the same output from cat whether I am in PuTTY-screen or
>>> PuTTY-screen-ssh-screen, even though the latter does not work in curses
>>> applications.
>> What specific values do you get?
> 
> up-> ^[[A
> down  -> ^[[B
> left  -> ^[[D
> right -> ^[[C
> 
>> You might need to compare what screen says they should be, too ("infocmp
>> screen" in your shell: look for the values of kcub1, kcud1, etc). Check
>> also to see if their values differ between your host system and the
>> remote system.
> 
> screen-in-PuTTY:
> kcub1=\EOD
> kcud1=\EOB
> kcuf1=\EOC
> kcuu1=\EOA
> 
> screen-over-ssh-in-screen-in-PuTTY:
> kcub1=\EOD
> kcud1=\EOB
> kcuf1=\EOC
> kcuu1=\EOA
> 
>> Also, what is the value of $TERM in 
>> (a) just putty,
> xterm
>> (b) screen-in-putty
> screen
>> (c) screen-over-ssh-in-screen-in-putty.
> screen
> 
>> (Actually, I should probably have had you test with "tput smkx; cat;
>> tput rmkx", rather than cat by itself; please try that and see if you
>> get anything different)
> 
> screen-in-PuTTY:
> up-> ^[OA
> down  -> ^[OB
> left  -> ^[OD
> right -> ^[OC
> 
> screen-over-ssh-in-screen-in-PuTTY:
> up-> ^[[A
> down  -> ^[[B
> left  -> ^[[D
> right -> ^[[C
> 
>> In particular, you should compare what you get for the tput/cat combo
>> when you type the cursor-down key directly, with what you get when you do
>>   C-a : stuff $:kd:
>> (with the tput/cat combo running).
> 
> screen-in-PuTTY:
> direct: ^[OB
> C-a:^[OB
> 
> screen-over-ssh-in-screen-in-PuTTY:
> direct: ^[[B
> C-a:^[OB

Do you know how to fix this, Micah?  I'm running into more and more apps
that don't work in this nested screen, such as less and htop.

Thanks,
Chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJJw8R+AAoJEJWxx7fgsD+CI98IAJzhdtgC862GyclGq9fxgnXS
8i0COKdcYRMLhl1SJwe6BINOPtrpGLrLReRBBCVwUVQ4AHCX1trMDYwoxFPeDCzn
rlCh0EDZAHgsFEFY9gQJzh0pwjGGkvSepLaGTWaCuvBB4sPCH9aB39YfR4+sgxqY
MwXsZeU7xSqKESIiLgP1JdBCGlV1r4xikViXCnL0IFiscTXxwCQJofLnBsdE930W
i7OiS4YJnbg6mcowwMYrmCLnHV+Zn0ha5iP7X8MOvQnOO1nYOf5NOtiGZyzbEzhC
IdSCZgt/+uF0HYYcqAkWtE6wZ4IaMByb0iL7NGWbvgbhvWkKtWBIVgplovouK4c=
=isxN
-END PGP SIGNATURE-



___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


Re: screen, PuTTY, and kernel config

2009-03-10 Thread Chris Lieb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Micah Cowan wrote:
> Chris Lieb wrote:
>> Micah Iowan wrote:
>>> GNU ncurses has a specific entry for putty, so you might want to "tic"
>>> the latest terminfo definitions from ncurses (it's in a file named
>>> misc/terminfo.src, IIRC). And then, of course, have PuTTY set TERM to
>>> "putty". (You'd need to compile these terminfo descriptions on each
>>> system you use screen on.)
>> What do you mean by "tic" the latest terminfo?  I was unable to find a
>> file called terminfo.src on my system using slocate.
> 
> What I meant is, download the latest ncurses package from GNU, and run
> "tic" on that file, which you should find within the extracted directory.

Tried just 'tic'ing the terminfo.src from ncurses 5.7 (I'm running 5.6
currently), but it spit out a bunch of warnings about unknown
capabilities.  I also tried upgrading to ncurses 5.7 and cleaning the
kernel (build against new ncurses), but that did not fix it either.

>>> Otherwise, typing your cursor keys while running
>>> cat-under-screen-under-putty, and comparing with what terminfo/termcap
>>> say about what the cursor keys should be, is often illuminating.
>> I get the same output from cat whether I am in PuTTY-screen or
>> PuTTY-screen-ssh-screen, even though the latter does not work in curses
>> applications.
> 
> What specific values do you get?

up-> ^[[A
down  -> ^[[B
left  -> ^[[D
right -> ^[[C

> You might need to compare what screen says they should be, too ("infocmp
> screen" in your shell: look for the values of kcub1, kcud1, etc). Check
> also to see if their values differ between your host system and the
> remote system.

screen-in-PuTTY:
kcub1=\EOD
kcud1=\EOB
kcuf1=\EOC
kcuu1=\EOA

screen-over-ssh-in-screen-in-PuTTY:
kcub1=\EOD
kcud1=\EOB
kcuf1=\EOC
kcuu1=\EOA

> Also, what is the value of $TERM in 
> (a) just putty,
xterm
> (b) screen-in-putty
screen
> (c) screen-over-ssh-in-screen-in-putty.
screen

> (Actually, I should probably have had you test with "tput smkx; cat;
> tput rmkx", rather than cat by itself; please try that and see if you
> get anything different)

screen-in-PuTTY:
up-> ^[OA
down  -> ^[OB
left  -> ^[OD
right -> ^[OC

screen-over-ssh-in-screen-in-PuTTY:
up-> ^[[A
down  -> ^[[B
left  -> ^[[D
right -> ^[[C

> In particular, you should compare what you get for the tput/cat combo
> when you type the cursor-down key directly, with what you get when you do
>   C-a : stuff $:kd:
> (with the tput/cat combo running).

screen-in-PuTTY:
direct: ^[OB
C-a:^[OB

screen-over-ssh-in-screen-in-PuTTY:
direct: ^[[B
C-a:^[OB
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJJtsurAAoJEJWxx7fgsD+C5mQH/1a5a2DUQnuh5+ThrbT4VYPc
3kciFCagcKH7pMqRUXwF0Kps+p4PyLB9WIHEnFbma6jf+AsiS8jNereRpQ2VaD+L
meASNozqLVrQBRJNCxN5GeMAKESApWyQ3JBQmpKTqlaPXVZSeg1jU6Z0pF2q8kHU
+72dw02MwgzFOVvl/b8vHlibIxSyR9JOYVvvcG9F18XCTUKPLAmV2tYz4uleqmqR
YioqPw6g+ImEVOKZN/Sp7pVkgT0htB00htyJs1mVOtw20eMl7g9Yd7jcSwpEASkD
8/HlLmUTjavEnYWoGoBRrvCthg08/Pgue+9V2k/ghBS6yns9vTtKf+V34GWF10g=
=CE0m
-END PGP SIGNATURE-



___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


Re: screen, PuTTY, and kernel config

2009-03-10 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris Lieb wrote:
> Micah Iowan wrote:
>> GNU ncurses has a specific entry for putty, so you might want to "tic"
>> the latest terminfo definitions from ncurses (it's in a file named
>> misc/terminfo.src, IIRC). And then, of course, have PuTTY set TERM to
>> "putty". (You'd need to compile these terminfo descriptions on each
>> system you use screen on.)
> 
> What do you mean by "tic" the latest terminfo?  I was unable to find a
> file called terminfo.src on my system using slocate.

What I meant is, download the latest ncurses package from GNU, and run
"tic" on that file, which you should find within the extracted directory.

>> Otherwise, typing your cursor keys while running
>> cat-under-screen-under-putty, and comparing with what terminfo/termcap
>> say about what the cursor keys should be, is often illuminating.
> 
> I get the same output from cat whether I am in PuTTY-screen or
> PuTTY-screen-ssh-screen, even though the latter does not work in curses
> applications.

What specific values do you get?

You might need to compare what screen says they should be, too ("infocmp
screen" in your shell: look for the values of kcub1, kcud1, etc). Check
also to see if their values differ between your host system and the
remote system.

Also, what is the value of $TERM in (a) just putty, (b) screen-in-putty
(c) screen-over-ssh-in-screen-in-putty.

(Actually, I should probably have had you test with "tput smkx; cat;
tput rmkx", rather than cat by itself; please try that and see if you
get anything different)

In particular, you should compare what you get for the tput/cat combo
when you type the cursor-down key directly, with what you get when you do
  C-a : stuff $:kd:
(with the tput/cat combo running).

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
Maintainer of GNU Wget and GNU Teseq
http://micah.cowan.name/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkm2wjkACgkQ7M8hyUobTrGSfwCeOok78kCSn7aCPCa2pNuV2vML
+VAAni/Ui0gzu+pkdgbXIIqSMgBSA5eV
=1aDW
-END PGP SIGNATURE-


___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


Re: screen, PuTTY, and kernel config

2009-03-10 Thread Chris Lieb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Micah Iowan wrote:
> Chris Lieb wrote:
>> Florian Bender wrote:
>>> Chris Lieb wrote:
 I have run into two issues getting screen to work with the Linux kernel
 configuration utility (make config).

 First, in PuTTY, the display is garbled when the config utility is
 running.  I have attached screenshots of the output I am getting
 (PuTTY-garbled.png) and what I get when I'm not running in screen
 (PuTTY-good.png).  This problem does not affect me if I do a console login.

 Second, if I am in a screen session and SSH into another server running
 screen (resulting in a 'nested' screen session), the arrow keys do not
 work in the kernel configuration utility.  Other keys seem to work ok,
 just not the arrow keys.  The arrow keys work fine when I am at a
 prompt.  This problem does not seem to be associated with PuTTY since a
 console login exhibits the same behavior.

 Does anyone know how to fix these?

 Thanks,
 Chris Lieb
>>> Hi,
>>> when using Curses dialogs (I assume that eLinks has the same problem)
>>> within screen, changing the character encoding in PuTTY to UTF-8 usually
>>> works. I'm sure this depends on $LANG on the linux machine.
>>> Regards,
>> Thanks, that solved my first problem.  Now to figure out how to get the
>> arrow keys to work in a curses application.  It's probably some cryptic
>> incantation of termcap that I need.
> 
> IIRC, PuTTY claims to be an "xterm" in $TERM by default, without
> actually being 100% compatible with true xterm (this same problem exists
> with other terminals, such as Terminal.app and gnome-terminal).
> 
> GNU ncurses has a specific entry for putty, so you might want to "tic"
> the latest terminfo definitions from ncurses (it's in a file named
> misc/terminfo.src, IIRC). And then, of course, have PuTTY set TERM to
> "putty". (You'd need to compile these terminfo descriptions on each
> system you use screen on.)

What do you mean by "tic" the latest terminfo?  I was unable to find a
file called terminfo.src on my system using slocate.

> As a quick-fix solution, you may find that placing "termcapinfo xterm*
> ks@:ke@" in your ~/.screenrc's will help. It certainly did for a
> different (but similar) problem that cropped up on IRC.

Adding that line to my ~/.screenrc actually broke arrow keys in a normal
screen session.

> Otherwise, typing your cursor keys while running
> cat-under-screen-under-putty, and comparing with what terminfo/termcap
> say about what the cursor keys should be, is often illuminating.

I get the same output from cat whether I am in PuTTY-screen or
PuTTY-screen-ssh-screen, even though the latter does not work in curses
applications.

For reference, I have included my .screenrc at the end of the message.
I don't know what some of the stuff in it does since it originally came
from the internet.

Chris

- -
~/.screenrc
- -
activity "%c activity -> %n%f %t"
autodetach on
altscreen on
bell "%c bell -> %n%f %t^G"
defflow auto
defscrollback 1
defutf8 on
msgwait 0 # 1 second messages
startup_message off# disable the startup splash message
vbell_msg "[[[ ding ]]]"
vbell off

termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
# I got this from you when I was trying to fix the numpad
termcapinfo screen* ks@:ke@

# this is all one line
caption always '%{gk}[%H][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f
%t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}][%{Y}%l%{g}]%{=b C}[%m/%d
%C%a]%{W}'
# end of 'this is all one line'
- -
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJJtrsDAAoJEJWxx7fgsD+C0zIH/0gFU9qaM7KDvby+5nBtnbkp
MsPu1jEU6c9l2k+BwEq5eFZLxRdl0NXs2A3rsVjPXkw2Rxhl0ligxJSoVHehvrP9
y9UJ0vY0P6+QNsvDpPrKzMCZGkqyf84j69XBcMw4TxcRaLtFc6SCJ0ELIk5l2qZL
vTmPHKMdDo99U3xfEJKM6IAkJliGy57m/TrLqaek1CNmvq2COnrJp/T8+uQzCNAM
XrupNRJyarOy7lzF87eyjq2TehBuQBm6by7D1p5IcYE94gbmhC8w7ve58qcN+CW2
9fYbjZQ47vB0ILshv/LHA36nxZjmDcwsxdVNFe5F/ydKQ76BEOUBgS3emHQ6Esk=
=jIYM
-END PGP SIGNATURE-



___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


Re: screen, PuTTY, and kernel config

2009-03-10 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris Lieb wrote:
> Florian Bender wrote:
>> Chris Lieb wrote:
>>> I have run into two issues getting screen to work with the Linux kernel
>>> configuration utility (make config).
>>>
>>> First, in PuTTY, the display is garbled when the config utility is
>>> running.  I have attached screenshots of the output I am getting
>>> (PuTTY-garbled.png) and what I get when I'm not running in screen
>>> (PuTTY-good.png).  This problem does not affect me if I do a console login.
>>>
>>> Second, if I am in a screen session and SSH into another server running
>>> screen (resulting in a 'nested' screen session), the arrow keys do not
>>> work in the kernel configuration utility.  Other keys seem to work ok,
>>> just not the arrow keys.  The arrow keys work fine when I am at a
>>> prompt.  This problem does not seem to be associated with PuTTY since a
>>> console login exhibits the same behavior.
>>>
>>> Does anyone know how to fix these?
>>>
>>> Thanks,
>>> Chris Lieb
>> Hi,
>> when using Curses dialogs (I assume that eLinks has the same problem)
>> within screen, changing the character encoding in PuTTY to UTF-8 usually
>> works. I'm sure this depends on $LANG on the linux machine.
> 
>> Regards,
> 
> Thanks, that solved my first problem.  Now to figure out how to get the
> arrow keys to work in a curses application.  It's probably some cryptic
> incantation of termcap that I need.

IIRC, PuTTY claims to be an "xterm" in $TERM by default, without
actually being 100% compatible with true xterm (this same problem exists
with other terminals, such as Terminal.app and gnome-terminal).

GNU ncurses has a specific entry for putty, so you might want to "tic"
the latest terminfo definitions from ncurses (it's in a file named
misc/terminfo.src, IIRC). And then, of course, have PuTTY set TERM to
"putty". (You'd need to compile these terminfo descriptions on each
system you use screen on.)

As a quick-fix solution, you may find that placing "termcapinfo xterm*
ks@:ke@" in your ~/.screenrc's will help. It certainly did for a
different (but similar) problem that cropped up on IRC.

Otherwise, typing your cursor keys while running
cat-under-screen-under-putty, and comparing with what terminfo/termcap
say about what the cursor keys should be, is often illuminating.

- --
HTH,
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
Maintainer of GNU Wget and GNU Teseq
http://micah.cowan.name/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkm2tcgACgkQ7M8hyUobTrFyfwCeLcbV4l6kXXSPzQVJsW7ddvPF
htIAn3/WgZPMaZUzgqKD809x3pq16INt
=YLh0
-END PGP SIGNATURE-


___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users


Re: screen, PuTTY, and kernel config

2009-03-10 Thread Chris Lieb
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Florian Bender wrote:
> Chris Lieb wrote:
>> I have run into two issues getting screen to work with the Linux kernel
>> configuration utility (make config).
>> 
>> First, in PuTTY, the display is garbled when the config utility is
>> running.  I have attached screenshots of the output I am getting
>> (PuTTY-garbled.png) and what I get when I'm not running in screen
>> (PuTTY-good.png).  This problem does not affect me if I do a console login.
>> 
>> Second, if I am in a screen session and SSH into another server running
>> screen (resulting in a 'nested' screen session), the arrow keys do not
>> work in the kernel configuration utility.  Other keys seem to work ok,
>> just not the arrow keys.  The arrow keys work fine when I am at a
>> prompt.  This problem does not seem to be associated with PuTTY since a
>> console login exhibits the same behavior.
>> 
>> Does anyone know how to fix these?
>> 
>> Thanks,
>> Chris Lieb
> 
> Hi,
> when using Curses dialogs (I assume that eLinks has the same problem)
> within screen, changing the character encoding in PuTTY to UTF-8 usually
> works. I'm sure this depends on $LANG on the linux machine.
> 
> Regards,

Thanks, that solved my first problem.  Now to figure out how to get the
arrow keys to work in a curses application.  It's probably some cryptic
incantation of termcap that I need.

Chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJJtqo7AAoJEJWxx7fgsD+CKzAH/i4ZDrjgKf2BKiU6kG0FiY75
fCrJJOT/453R685JxYfHn4/nx2FsLuIp5UyfUboTIdH5lMdErPp7pYWdDoNEBYkq
QeEEwEmaLstQUHwzBXrtzqlQ17Te2j6KYOUzTmAcX4l3X/j6nJl4ay+iWq3tdAhH
qS+m89G7RUIzKAiY2UYWfn1AhJmL16peYk9fegqkkbco0wiO5SDeCDs/lUxEDpNV
Zj1iDuNhp1qYHb1KsBQI9imMhQvL2GNrsgL0J6jYRT5iyzu4/+OQQ/W0fPJ13lPe
OUs+NV+APGutqe37ak9jrYat9YoaJzY9OhRCH35DY2PV3p6pIWIR+p2f1Y8TN8w=
=vKbS
-END PGP SIGNATURE-



___
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users