I recently started to work in a shared Linux cluster that a version of gnu-screen that I consider unacceptably old (4.01, from 2006).

I was not able to convince the system's administrators to install a more recent version of gnu-screen, so I installed my own off my home directory, using conda.

Unfortunately, even after I installed my long-trusted ~/.screenrc file, my conda-installed instance of gnu-screen does not work well at all.

For example, the backspace key does not erase the character to the left of the cursor; instead, it behaves like the space key, at least as far as what shows up on the screen. Hitting the C-r key, which I use all the time to search my history, disfigures my screen grotesquely. Other than gnu-screen's "command key" (which I have set to C-h), pretty much any chord involving Ctrl is messed up. Etc.

I should emphasize that all these problems emerge only after I start a new gnu-screen session, using my conda-installed instance of gnu-screen. Outside of screen, or when I use the ancient /usr/bin/screen, my terminal behaves normally.

Still, I suspect that the problem may have something to do with my TERM variable's setting at the time of invoking screen (namely TERM=xterm-256color), and/or the terminal emulator I am using (iTerm2 running on OS X), but I don't know how to go beyond these hunches.

When I search online for solutions to this problem I come across massive amounts of trial-and-error.

Is there a systematic, reasonable way to troubleshoot this problem?

  • 1
    If there is a systematic, reasonable way, I don't know it so I'm looking forward to the answers you might get! That said, it is probably worth checking out your ~/.inputrc if you have one.
    – terdon
    Feb 23 at 17:53
  • @terdon: As it happens, I don't have an ~/.inputrc file at all. In fact, if ever in my life I had one, I never noticed it! Now I wonder if my not having an ~/.inputrc file could be the problem... Time for me to find more about ~/.inputrc. Thank you for the pointer!
    – kjo
    Feb 23 at 18:04
  • 1
    No, if you don't have one that won't be a problem. It's just the default file where you can set user-specific settings for the readline library. I tend to play with it and this results in unexpected issues on new systems where my inputrc isn't set up as I want it. But that's also where you set things like allowing Ctrl+arrows to act like Alt+B and Alt+F (jump to the next/previous word) so you might be able to set some things there to help you out. Please note that I have a very limited understanding of the details of this though, this is just a shot in the dark.
    – terdon
    Feb 23 at 18:27


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy