How do you detach a remote screen session in byobu (tmux)?

后端 未结 7 2072
[愿得一人]
[愿得一人] 2020-12-29 04:01

I am currently in a byobu-tmux session and am ssh\'ed into a screen session. How do I detach the remote screen session without detaching byobu-tmux session? Some things to

相关标签:
7条回答
  • 2020-12-29 04:23

    You should be able to double-escape with Ctrl-a.

    To send a detach message to the inner byobu-screen session, press:

    Ctrl-a Ctrl-a d

    Full disclosure: I am the author and maintainer of Byobu.

    0 讨论(0)
  • 2020-12-29 04:23

    I was able to do this by listing all clients inside the current client:

    $ byobu list-clients
    /dev/pts/67: 1 [80x24 xterm] (utf8) 
    /dev/pts/70: 1 [157x48 xterm-256color] (utf8) 
    

    Then detach the remote client (determined based on screen size):

    $ byobu detach -t /dev/pts/67
    

    Now I can use my full window size

    0 讨论(0)
  • 2020-12-29 04:23

    You need to switch the prefix of your local session if it conflicts with the remote session. For example, if both are using CTRL+A then you'd be in trouble. You can either send a raw command (there's a sequence for that, but I can't remember it), or go the easy route and remap your local session to Ctrl+B, then you can input Ctrl+A that will get routed to the remote session. Also not related to tmux but the ssh connection itself you can input "~." and it'll disconnect from the ssh session. Hope it helps.

    0 讨论(0)
  • 2020-12-29 04:25

    It is easy when you use tmux commands:

    byobu-tmux detach
    byobu-tmux
    

    or even just:

    byobu detach
    byobu
    
    0 讨论(0)
  • 2020-12-29 04:29

    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.

    Source: https://askubuntu.com/a/309215/106100

    0 讨论(0)
  • 2020-12-29 04:37

    I've been an avid user of byobu on Linux for the best part of a decade. After struggling with configuring the brew install of byobu on OSX for most of these years, I finally managed to setup my byobu configs in a round about way. First I executed this:

    echo '/usr/local/lib/python2.7/site-packages' | sudo tee /Library/Python/2.7/site-packages/homebrew.pth
    

    Then I ran the byobu config file:

    byobu-config
    

    Finally I cleaned up

    sudo rm /Library/Python/2.7/site-packages/homebrew.pth
    

    Python crashed along the way with a few pop-ups, however, byobu now works for me as it should. I do need to repeat these steps when I want to change config again though... still looking for a cleaner solution.

    0 讨论(0)
提交回复
热议问题