Skip to content

Comment on Scripting GNU Screen with Pythonparent

Comments

I suppose I use screen heavily — I run it a lot, but usually forget that I am. When I connect to remote hosts, I use a script (which among various other things) runs:

  ssh -t remote.host.net screen -D -R -S "$(hostname)_$PPID"
Then if/when I lose the connection I hit [Up][Enter] to run the previous command. I get logged back in to the same screen session where my terminal session will still be running.

My screen configuration is mostly set up to hide that I'm running screen as much as possible. Rather than using screen's multiple windows I tend to ssh in multiple times and use a tiling window manager to manage the terminal windows. ssh ControlMaster stuff means I can still do everything over one network connection.

PS Whenever screen comes up on HN, someone mentions tmux. I haven't checked it out because my setup works for me, but new users might want to.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.