You want to be able to disconnect and reconnect to your terminal session on the fly for any of a number of reasons:
- You're connected to a remote host and you don't want an unexpected network issue to kill your session
- You want to be able to periodically check on the status of something on a remote host but don't feel like keeping the connection open all the time
- You want to connect to the same session from different clients
- You may need to restart you graphical session and don't want that to kill your terminal session
A really simple way you could get this working is what abduco and detach do: the demon just blindly shuttles input and output between the client tty and the virtual tty that the interactive process is running in. However, when you reconnect to an existing session, you get no context, because the server doesn't know what it would need to tell the client for it to reassemble the tty state.
In order for that to be possible, the daemon would need to keep track of the terminal state internally. It's really annoying that that's necessary because now your actual terminal emulator isn't directly communicating with the process it's displaying, and you won't be able to access any features of your terminal that the daemon doesn't support.
But once you already have this background process that's keeping track of terminal state, you might as well build in other features that would require that, like window management, otherwise people who want those features will end up having yet another layer of terminal. If you don't want those features, you can pretend they're not there.
- You're connected to a remote host and you don't want an unexpected network issue to kill your session
- You want to be able to periodically check on the status of something on a remote host but don't feel like keeping the connection open all the time
- You want to connect to the same session from different clients
- You may need to restart you graphical session and don't want that to kill your terminal session
A really simple way you could get this working is what abduco and detach do: the demon just blindly shuttles input and output between the client tty and the virtual tty that the interactive process is running in. However, when you reconnect to an existing session, you get no context, because the server doesn't know what it would need to tell the client for it to reassemble the tty state.
In order for that to be possible, the daemon would need to keep track of the terminal state internally. It's really annoying that that's necessary because now your actual terminal emulator isn't directly communicating with the process it's displaying, and you won't be able to access any features of your terminal that the daemon doesn't support.
But once you already have this background process that's keeping track of terminal state, you might as well build in other features that would require that, like window management, otherwise people who want those features will end up having yet another layer of terminal. If you don't want those features, you can pretend they're not there.