Jay Taylor's notes
back to listing indexHow do you detach the 2nd screen from within another screen? - Unix & Linux Stack Exchange
[web search]Stack Exchange Network
Stack Exchange network consists of 178 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange-
18
- +1418
I've accidentally attached to a 2nd GNU screen session from within an existing screen session and cannot detach or issue commands to the inner screen. I remember figuring out how to do that before but completely forgot and would like to keep it as reference.
One way is to detach the inner screen by doing
screen -dr
from shell, but what is the key combination to do that from within screen itself?ctrl-a a d
answered Mar 16 '09 at 22:12If you've customized screen's escape character to something other than Ctrl-A, then the key sequence will be quite different. :)– slacyMar 16 '09 at 22:28Yeah, you're on your own with that. <esc> a d may work; the man page is ambiguous, since it says that a sends the escape character, then clarifies that what it means by that is ctrl-A. So it's a crapshoot.– chaosMar 16 '09 at 22:37Thanks, there we go, that's exactly what I remembered too and when I told it to my co-worker who was having this problem, he said it didn't work. Of course, now I found out he was pressing ctrl-a, ctrl-a, d, instead of ctrl-a, a, d. Voted and closed.– Artem RussakovskiiMar 16 '09 at 23:32@brandizzi: Have you tested this? Because I deeply suspect it is not the case, and that the sequence you would use isctrl-t a d
.– chaosOct 24 '13 at 15:19@chaos have you tested this? I tried it right now and, yes, C-t t d detaches the screen inside a screen. Can you try it? Just addescape ^Tt
to your~/.screenrc
. Oct 24 '13 at 16:47Well, there is a hack for this. Just remotely de-attach the required screen by following command
screen -r -d screen_name or screen -rd screen_name
In general, if you have a screen
s3
within another screens2
within another screens1
, you can execute a command ctrl-a d in the screen:s1
by doing: ctrl-a ds2
by doing: ctrl-a a ds3
by doing: ctrl-a a a d...
ctrl+a a
will pass the escape sequence (ctrl+a) to the sub-screen.. So,ctrl+a a d
will doctrl+a d
in the sub-screen (detaching it)It works with any screen command, for example
ctrl+a, a, c
will create a window in the sub-screenYour Answer
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Not the answer you're looking for? Browse other questions tagged gnu-screen or ask your own question.
-
-
-
-
-
-
7
The Overflow BlogFeatured on MetaHot Meta PostsLinked
Related
Hot Network Questions
-
Should I ground outdoor speaker wire? If so, how?
-
How would the ability to make binding oaths of truth affect people's view on politics
-
How can a 9mm square antenna pick up GPS?
-
How to know which application or user put the SQL Server Database in single user mode
-
Finder can show milliseconds - is this new in macOS?
-
What is the likelihood of you remembering how to fight after your brain was pierced by a skull shattering projectile spear if it was regenerated?
-
What is the word that is synonym to "right", and sound like "rido"?
-
This long, skinny plant caused red bumps on my son's knee within minutes. Is it poisonous?
-
What is the point of washing produce in cold water?
-
Heteropalindromes in a Word Square
-
2 Samuel 11:14 In what form of Hebrew did David write in?
-
Why are only infrared rays classified as "heat rays"?
-
Examiner agreed to write a positive recommendation letter but said he would include a note on my writing skills. Will this have a negative impact?
-
how to calculate the probability that one random variable is bigger than second one?
-
Sudoku on a countably infinite board
-
Did the Jerusalem council allow believers to eat e.g., rabbit meat?
-
Do you have to use an instrumentation amplifier to measure voltage across a 0.01 ohm shunt?
-
Why would the U.S. exclude Europe from the new Indo-Pacific security alliance?
-
Foundation models : Is it a new paradigm for statistics and machine learning?
-
How should i tell my boss that i'm going away for another company?
-
I can't print my return boarding passes using the TUI website, how should I proceed?
-
First aid: alternatives to hydrogen peroxide
-
Who defines which countries are permanent members of UN Security Council?
-
Ping-Pong Node Smoothing
Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group.
This site is not affiliated with Linus Torvalds or The Open Group in any way.