1

I want to run GNU screen in another screen session. Running is not a problem but the keyboard shortcuts are captured by the "parent" screen session. Is there a way to pass these keyboard shortcut to the other screen session.

You might think running screen in screen is quite useless. This holds maybe if you run both on the same computer, but if you connect in a screen session for example with SSH to another server and using there also screen its quite useful.

Thanks in advance!

migrated from stackoverflow.com May 1 '13 at 10:55

This question came from our site for professional and enthusiast programmers.

3

You have to escape your command character to pass it to the inner screen. Assuming you have kept the standard C-a as command character, you'll have to hit C-aa to send it to the inner screen

As an example :

  • switch between two windows in the outer screen : C-aC-a
  • switch between two windows in the inner screen : C-aaC-aa

A way to avoid this consists in changing the command character of the inner screen using the -e command-line switch. For example, given the following settings

screen                  # outer screen
screen -S foo -e"^Bb"   # inner screen

the following key bindings will be available:

  • C-ac : create a new window in the outer screen
  • C-bc : create a new window in the inner screen

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.