2

For quite some time I've been using screen to detach and let them run in the background. Then I discovered byobu to have mutliple tabbed shells running. Now I have a problem that I'm no longer able to detach from a screen inside my byobu shells, since Ctrl-a-d detaches the byobu session and not the screen session inside it.

I read a few times that Ctrl-a is supposed to work, which would make this Ctrl-a-a-d, but this simply switches tabs (Ctrl-a-a) and then quits the shell (Ctrl-d).

Is there a simple solution to be able to detach again?

1 Answer 1

10

Try letting go of ctrl after the first a, so the sequence is ctrl-a, a, d. Man screen:

   C-a C-a     (other)       Toggle  to  the  window  displayed previously.  Note that this
                             binding defaults to the command character typed twice,  unless
                             overridden.   For instance, if you use the option "-e]x", this
                             command becomes "]]".

   C-a a       (meta)        Send the command character (C-a) to window.  See  escape  com‐
                             mand.

Or if you're using tmux instead of screen for Byobu, try just ctrl-a d. Byobu's default prefix key is ctrl-b, so if you're using that default, doubling up the ctrl-a keystroke would not be necessary.

4
  • Sadly this did not work, I have my byobu backend configured to be tmux, I'll check out the tmux documentation to see whether that works.
    – cdecker
    Jun 17, 2013 at 14:50
  • Ah, I did not know that was possible. In that case, the extra ctrl-a may not be necessary; I have updated my answer to cover tmux.
    – Paul
    Jun 17, 2013 at 17:15
  • Hm, that detached byobu as well. But as far as I can see there is no similar detach binding in tmux. I'll quickly switch to the screen backend.
    – cdecker
    Jun 18, 2013 at 8:39
  • This works for detaching screen inside of a tmux session when you have bound the tmux to C-a. I think these comments are googlable :) Aug 28, 2014 at 10:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .