5

I have a fresh install of Ubuntu Server 11.10 that I am logging into SSH via PuTTy. When I am inside screen, I cannot use the up arrow to recall bash history (though this works outside of screen). I cannot seem to find the exact same problem on the Interwebs (though many similar ones). My .screenrc is below:

# Look and feel
caption always "%{= bb}%{+b w}Screen: %n | %h %=%t %c"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"

# Our warning of activity
activity "Activity in %t(%n)"

# Left Right meta key mods
#ALT-,. and ALT-<>
bindkey "^[<" eval number !echo $WINDOW-1|bc
bindkey "^[>" eval number !echo $WINDOW+1|bc
bindkey "^[," prev
bindkey "^[." next

#disable startup banner
startup_message off

#see http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html
termcap  xterm 'XT:AF=\E[3%dm:AB=\E[4%dm:AX'
terminfo xterm 'XT:AF=\E[3%p1%dm:AB=\E[4%p1%dm:AX'
termcapinfo xterm 'XT:AF=\E[3%p1%dm:AB=\E[4%p1%dm:AX:hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
termcap  xtermc 'XT:AF=\E[3%dm:AB=\E[4%dm:AX'
terminfo xtermc 'XT:AF=\E[3%p1%dm:AB=\E[4%p1%dm:AX'
termcapinfo xtermc 'XT:AF=\E[3%p1%dm:AB=\E[4%p1%dm:AX:hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'

#scrollback
termcapinfo xterm ti@:te@

shell -$SHELL

UPDATE: The up arrow works properly in other apps such as vim and less. This problem occurs on the physical console as well as in PuTTy.

Mike S
  • 420
  • 4
  • 13
  • 2
    When in screen what is the value of the $TERM variable? – mdpc Nov 02 '11 at 23:11
  • "screen". I have tried changing it to "vt100" with no change in behavior. – Mike S Nov 03 '11 at 18:30
  • The default terminal type in Putty is "xterm" have you tried using that setting? – mdpc Nov 03 '11 at 18:47
  • Good point, however I do not think Putty is the issue for two reasons: 1.) Other Ubuntu (10.04LTS) servers' screen+bash work fine with the default PuTTy config, 2.) This issue crops up even when logged into the physical console. – Mike S Nov 03 '11 at 19:00
  • I have the same problem too on all my CentOS system. I want to know the answer too. :) – garconcn Nov 04 '11 at 04:29
  • Added mystery: This issue is on one of my local VMs. I installed another VM on our cluster with the same install ISO and same .screenrc, and bash history works as expected with the up arrow. Now I am really scratching my head! – Mike S Nov 04 '11 at 18:39

2 Answers2

2

I had a similar problem. Turns out the user account I created didn't have a default shell set.

1

I use Ctrl-a Esc to enter copy/scrollback mode and then navigate using h j k l or arrow keys.

Read this for navigation options - http://web.mit.edu/gnu/doc/html/screen_11.html

holydevil
  • 491
  • 4
  • 4