Start screen using
screen -d -R session_tomcat
Replace session_tomcat with any other helpful name for the session you’re about to create.
Sharing your Session
Ask your friend to connect using (assuming they are logged in using the same user account):
screen -x session_tomcat
Now it’s simply magical. Multiple persons can type and work on the same terminal – it works best when you’re coordinating over the phone. Note that the dimensions of your terminal output will be the same for every user – to change it, press Ctrl-A and then capital F. This will make the screen output fit your current terminal size, and change it to that size for every connected user.