Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question

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

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

1 Answer 1

up vote 2 down vote accepted

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
share|improve this answer
    
also see this question which is remotely related –  Francesco Mar 6 '13 at 16:37
    
and just for further reference, here is another related question –  Francesco Mar 7 '13 at 7:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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