Starring the best communication protocol known to man: ssh+screen+irssi

Most nights I am done with my computer for the night and I want to leave IRC on one computer. To detatch the screen session and returnĀ  to it later I do ctrl+a and then ctrl +d. Then I type ‘logout’ and then ‘exit’ go to bed. To get back in the morning I do ssh user@server.com and then i authenticate. I return to irc using the screen -rd command. Very simple.

Sometimes I try to leave by doing this. ctrl+a and then ctrl+d and then +exit+exit. The next morning I get mad and have to log back into IRC.

Explanation. Ctrl+a followed by ctrl+d in screen will detatch the screen at the server. However, by using ‘exit exit’ twice to close my connection to the server and the terminal/konsole/bash shell on the laptop, I am killing screen and the attached irssi/irc sessions. This is the opposite of why I want to use screen+irssi+ssh.

The proper way is to do ctrl+a and then ctrl+d for screen on the remote server. Type ‘logout’ to end the connection and then type exit to close my terminal.

So don’t do what I do, follow proper screen+ssh+irssi technique unless you want to wake up in the morning, curse at yourself, and sign back into all your irc rooms.

10 Responses to “Silly Things I do: vol. 2”

  1. Tiago said

    Weird, as I always exit+exit and never had a problem.

  2. Richard said

    Just hit ctrl+a, and without taking your finger off ctrl, keep mashing d till it all dies. Much easier than this ‘exit’ and ‘logout’ nonsense I keep hearing about.

  3. EvilDead said

    To detach a screen session, it’s “ctrl+a d”, not “ctrl+a ctrl+d”.

  4. RainCT said

    What do you have against Ctrl+D? :)

  5. woot said

    You should just make an alias for

    ssh user@server.com -t screen -RD

    Then to disconnect, you simply do a ctrl-a d, and your back to your local machine.

  6. schwuk said

    Why not Ctrl+a, shift+d, shift+d (also known as power detach)? This will detach your screen session and disconnect your ssh session, leaving you back at the local terminal.

  7. exit doesn’t kill screen for me.

    Other key sequences to try:
    enter ~ .
    or
    ^a ^d ^d ^d

  8. arakoczy said

    Okay, so I just use CTRL+D to close a terminal anyway, not “exit”.

    maybe that will help. I believe a ctrl+d does a logout by default.

  9. I just close the terminal window. I wonder how bad that is? Whenever I log back in and screen -rd everything is fine, though.

  10. delor said

    Before commenting about anything read manual. “C-a d” and “C-a C-d” does the same thing.

Leave a Reply