Linux: Using screen and screen under su
Linux: Using screen and screen under su
To list the screen sessions, you can run "screen -ls" command:
debian:~# screen -lsTo re-attach to a screen session you can run "screen -r {session name}":
There are screens on:
14573.pts-1.debian (03/27/2019 06:59:01 PM) (Attached)
14546.pts-1.debian (03/27/2019 06:58:55 PM) (Detached)
debian:~# screen -r 14573.pts-1.debianIn order to attach to the same screen session from different shells, you need to use the "-xr" arguments, enabling multi-display mode.
debian:~# screen -xr 14573.pts-1.debian
When you need to run it under su, you'll face the issue below:
debian:~# sudo su - silviuTo override it, you can run the "script /dev/null" command. After that, you'll be able to open a screen shell:
silviu@debian:~$ screen
Cannot open your terminal '/dev/pts/5' - please check.
silviu@debian:~$ script /dev/null
Script started, file is /dev/null
silviu@debian:~$ screen
Comments
Post a Comment