Using Screen to share your terminal.

As a consultant who works with remote clients and, before that, a telecommuting systems engineer for companies who used linux I have often encountered the problem of collaborating inside of a remote client that does not have X and who’s only access is ssh. Servers with GUI interfaces like Windows or Mac OS X have a long history of tools to share the desktop with multiple users, oddly enough both are called Remote Desktop. Servers that only have a command line interface, like most linux servers, do not have such an obvious tool for sharing the terminal with another user. While bash and ssh can be manipulated to accomplish this, screen fills this roll nicely.

Screen allows you to create virtual terminals that you can detach from and attach to at will. Detaching from a screen will leave it running in the background. Attaching to it again allows you to keep executing commands where you were or see the current state of a process you left running. If you are the user who started the screen you can attach to a screen that is already attached to, this is is how the shared screen is accomplished.

To set it up, one user logs in to the server and, using su or sudo su, changes to either the second users account or an account that all parties can access. Next, start screen with the -S option and give it a meaningful name.

me@jjtest:~# sudo su – theOtherGuy
theOtherGuy@jjtest:~# screen -S blogTest

If screen is not installed, it is available as a package on most popular linux distributions. You are now in a screen session as theOtherGuy. Now just tell theOtherGuy to log in and that your screen is called blogTest and he will simply need to run screen with the -x option and give the screen name.

theOtherGuy@jjtest:~# screen -x blogTest

At this point you are both in the same screen session and can both interact with it. This is great for showing another user what kind of problems you may be having or how to do a certain process. It can also be used to accomplish remote pair programing on the remote system. And this doesn’t have to be limited to just two users, as long as someone can get to that system as that user they can join the screen as well.

Typing exit at this point will kill the screen and kick both of you out. If one user wants to leave but not kick the other person off the user just presses Ctrl+a and then d, this will detach you from the screen. Ctrl+a is the default hot key for activating screen commands. You can read more about the variety of command available on screen at this site or read abut it fully on the man page.

Screen can be used to do so much more than I’ve talked about here but it’s ability to facilitate the sharing of a terminal between users can be a life saver when you need it. It is not normally installed by default to may linux systems so you may have to install it or ask that it be installed.

  1. I’m curious to find out what blog platform you have been working with? I’m experiencing some small security issues with my latest site and I’d like to find something more risk-free. Do you have any recommendations?

  2. Hello, you used to write magnificent, but the last few posts have been kinda boring… I miss your tremendous writings. Past several posts are just a bit out of track! come on!

  3. I’m no longer sure the place you are getting your information, but great topic. I must spend some time studying much more or working out more. Thank you for magnificent information I was on the lookout for this info for my mission. Regards Tom

  4. I was very happy to search out this web-site.I wanted to thanks in your time for this excellent read!! I definitely having fun with every little bit of it and I have you bookmarked to take a look at new stuff you weblog post.

  5. I really like what you’ve done with the thmeme but I was asking myself if you are the one that created it or you just bought it and customized it?

  6. I am John, how are you everybody? This piece of writing posted at this web site is in fact fastidious.

  7. Thank you for your smart review. Me and my dad were really preparing to do some research about it. We got a book from our neighborhood bookstore but I consider I learned more from this article. I am just really pleased to see this type of good information and facts being distributed freely on the internet.

  8. Thanks for the sensible critique. Me & my neighbor were just preparing to do a little research about this. We got a grab a book from our local library but I think I learned more from this post. I am very glad to see such great information being shared freely out there.

  9. Thank you for the sensible critique. Me and my neighbor were just preparing to do a little research on this. We got a grab a book from our area library but I think I learned more from this post. I am very glad to see such fantastic info being shared freely out there.

  10. The following time I read a blog, I hope that it doesnt disappoint me as a lot as this one. I mean, I know it was my choice to learn, however I really thought youd have one thing fascinating to say. All I hear is a bunch of whining about one thing that you may fix for those who werent too busy on the lookout for attention.

  11. I have learn a few excellent stuff here. Certainly value bookmarking for revisiting. I surprise how so much effort you set to create such a excellent informative website.

  12. Very nice style and design and excellent subject material , very little else we require : D.

  13. Excellent read, I just passed this onto a friend who was doing a little research on that. And he just bought me lunch as I found it for him smile Thus let me rephrase that: Thank you for lunch! “England and America are two countries separated by the same language.” by George Bernard Shaw.

  14. I know this website presents quality dependent posts and other stuff, is there any other web page which offers these kinds of stuff in quality?

  15. Hey! This post could not be written any better! Reading this post reminds me of my good old room mate! He always kept chatting about this. I will forward this post to him. Pretty sure he will have a good read. Thank you for sharing!

  16. salutations from over the ocean. excellent post I must return for more.

  17. I am in fact delighted to glance at this website posts which carries plenty of helpful information, thanks for providing such data.

  18. I am curious to find out what blog system you happen to be using? I’m experiencing some small security issues with my latest website and I’d like to find something more secure. Do you have any recommendations?

  19. Hello there! This is kind of off topic but I need some help from an established blog. Is it difficult to set up your own blog? I’m not very techincal but I can figure things out pretty quick. I’m thinking about creating my own but I’m not sure where to start. Do you have any points or suggestions? Thank you

  20. Believed I would comment and say cool theme, did you create it on your own? It looks excellent!

  21. Located your content quite intriguing indeed. I really liked looking at it therefore you make quite some good points. I’ll bookmark this site for the future! Relly good post.

  22. Really like your website. I’m not completely sure If I agree with what was stated but it’s still very good food for thought. I will make absolutely sure to bookmark you guys. I have been searching for this kind of content for a very long time“, Thank you. But why is there not more activity on this board. It’s kind of dead here. Anyone out there?

  23. Hahahaha, what a comic this YouTube video is! I’m still laughing, thanks to admin who had posted at this site.

  24. Great squidoo lens.

  25. It is really a great and helpful piece of information. I¡¦m glad that you simply shared this useful information with us. Please keep us up to date like this. Thanks for sharing.

  26. It’s a legitimate nice and helpful piece of information. I are satisfied that you just shared this particular useful information around. Please preserve us informed similar to this. Thanks regarding sharing.

  27. Wow that was strange. I only wrote an extended comment but when i clicked post my review didn’t appear. Grrrr… well Now i’m not writing everything that over again. Anyway, just desired to say great blog!

  28. Virtually all of whatever a person articulate can be supprisingly appropriate knowning that makes me ponder the reason why I hadn’t viewed this with this particular light formerly. This content really did turn the actual light on for me personally as much as this specific topic goes. However truth be told there is just one factor We are not actually too comfortable with thus while I try and reconcile that with all the main concept of the placement, allow me see what other subscribers have to say. Nicely done.

  29. I was first wondering if you ever thought connected with changing all the page layout from your website? Its actually written; I really enjoy what youve had got to say. But you may could a tad bit more in the form of content which means that people could talk with it greater. Youve got for the better of written text for just having some pictures. Maybe you could potentially space the application out more effective?

  30. Awesome, Thx!

  31. Hi there! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly? My site looks weird when viewing from my apple iphone. I’m trying to find a theme or plugin that might be able to correct this problem. If you have any suggestions, please share. Many thanks!

  32. Its definitely good YouTube video in terms of quality, truly nice, its quality is genuinely appreciable.

  33. I really appreciate this post. I¡¦ve been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thx again

  34. Excellent blog right here! Additionally your web site quite a bit up very fast! What web host are you the usage of? Can I am getting your associate link to your host? I desire my website loaded up as fast as yours lol

  35. Do you mind if I quote a few of your posts as long as I provide credit and sources back to your site? My blog site is in the exact same niche as yours and my visitors would truly benefit from a lot of the information you provide here. Please let me know if this alright with you. Cheers!

  36. excelent publish

  37. Fathom for yourself how hard is to create, but thanks to him we may live. New opportunities targeted right seeking us.

  38. hey friend, i liked your article so much i even bookmarked it here. cheers .http://www.detetizar.com

  39. Very interesting details you have observed , appreciate it for putting up. “My work is a game, a very serious game.” by M. C. Escher.

1 ... 5 6 7
  1. No trackbacks yet.