Hacker News new | past | comments | ask | show | jobs | submit login

This is useful for those cases where you didn't start screen first, such as when you either forgot or didn't think you'd need it but it turned out you did.



I just alias my terminal shortcut/command to start screen/tmux every time


Doesn't using screen have some drawbacks? For example it breaks native scrolling in the OS X terminal app, so I wouldn't want to run screen unless I really needed it.


Yeah I don't know. I only mentioned screen to be fair. I use tmux and I don't usually have any problems, although I get problems when I use it with mosh sometimes (particularly weechat mouse support doesn't seem to work well).


This may be a dumb question, but wouldn't this work?

* press ctrl-z to put the program in the background

* start screen

* run fg within screen


screen (and tmux) start a new instance of the shell, which would have no knowledge of the backgrounded process. You'd just see the message "fg: no current job"


And even if you could(1), the background process typically has the terminal open - and screen uses a separate pseudo terminal aka pty -- As suggested by the name - rePTYr

(1) ^Z sends SIGSTOP; to continue you can signal SIGCONT. But then what?!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: