Score:0

Looking for a stripped down version of tmux or screen

de flag

I would like to be able to ssh to a system and run a shell that will be persistent if my network goes down. The usual answer for this is to run screen or tmux, and then just reconnect to your disconnected session. Both of these programs basically run their own terminal emulator, so if you are running this in something like mate-terminal or xfce4-terminal, you can't use the normal scrolling methods to scroll backwards through your window. I am looking for something that would do something like their disconnected session code, but that does the minimum needed.

For example, I am envisioning something that where you would ssh into a system and start this program. It would run your shell behind a pty (which is how I think that screen does it) and would initially spit out something to identify the session name. If your network connection drops, you could just ssh back in, and run the program with an option to tell it to reconnect to that session. Basically, just like screen does but without all of the other stuff that comes along with it.

I've read about mosh, but if it runs across an encrypted channel like ssh for anything other then the initial connection I've missed that.

Score:1
in flag

I'm not aware of a "stripped down" version of tmux/screen that does what you describe, but it probably would not be hard to write one, and it may exist.

However, you can get what you want and still use the normal screen. You can do this by disabling the termcap feature that prevents your graphical terminal from accumulating scrollback data.

Add the following line to your .screenrc to do this:

termcapinfo xterm* ti@:te@

I'm not sure what the equivalent for tmux would be, but it may be very similar.

You will have to start a new screen session for this to take effect.

de flag
Thanks, that works like a champ!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.