New answers tagged screen
The ownership of the terminal device is not changed when using sudo, but changing its permissions is actually not the only solution (not a great solution though, because it opens a security hole). The common approach is to start a "script" session (but don't save the output, send it to the trash), which works because it uses another terminal device. sudo -...
I haven't tried it myself, but this answer suggests you could detach from the screen session and run: screen -S session_name -X at window_number stuff $'\003' Alternately, could you try sending a ctrl-z and then using bg to put the process in the background? That is, if the ctrl-z gets passed through correctly.
There is a better trick: su - user script /dev/null screen
Top 50 recent answers are included