2

I was wondering if there was a program like GNU/screen or tmux that would allow me to attach or detach a session with a running process but would not provide all of the other features such as windows and panes. Ideally the program would be able to run in a dumb terminal (a terminal without clear).

My use case is to use either the shell or the terminal that are built into emacs to run a program and have that program keep running even if emacs crashes. Tmux and screen are incompatible with shell because shell does not support clear. And although they work in the terminal the output is improperly formatted in part because of the bottom bar and also because of the quirks of term-mode.

Thank you!

Jules
  • 123
  • Instead of using an Emacs shell buffer, use an Emacs terminal buffer. – Barmar Apr 01 '16 at 17:42
  • @Barmar the issue with that is that if emacs crashes the process running in the terminal will be lost – Jules Apr 01 '16 at 17:54
  • I mean run tmux or screen inside the Emacs terminal emulator buffer. That will work because the terminal emulator supports clear. – Barmar Apr 01 '16 at 17:55
  • 1
    How often does your Emacs crash that this is a problem? I usually have Emacs running for weeks or months at a time. – Barmar Apr 01 '16 at 17:56
  • @Barmar but then the output gets very messed up – Jules Apr 01 '16 at 17:56
  • @Barmar I use exwm as my window manager and it has some issues occasionally. Also when writing elisp packages it is sometimes very helpful to restart emacs – Jules Apr 01 '16 at 17:57
  • @thrig dtach is wonderful, thank you so much. If you'd like to post that comment or a similar one as an answer I'd love to accept it to mark this question as closed – Jules Apr 01 '16 at 18:47
  • Could you use disown or nohup for this? – Wildcard Apr 01 '16 at 20:11

2 Answers2

1

dtach is a wafer-thin terminal session manager, now forked on github, or doubtless easily installed via the ports or package system for your operating system.

(Of historical interest may also be the dislocate example script distributed with expect.)

thrig
  • 34,938
1

In addition for dtach, which has already been mentioned, there is http://www.brain-dump.org/projects/abduco