Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm wondering if this is possible: I have stuff happening in TTY1 (i.e. the big console I get by hitting ctrl-alt-F1), and if at all possible I'd like to "watch" it in some way from my graphical interface (ctrl-alt-F7), possibly in a terminal window.

Is this possible? Can I tell a terminal window not to spawn a shell, but just use an already existing one? I don't need to be able to interact with it, although that would also be nice. I really just want to see it. The reason for having it on TTY1 instead of just running the shell in the graphical env is because I might need to restart the graphical environment and don't want the process to end.

Thanks
Mala

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I feel like a goofball answering my own question, but as often happens I finally found / figured out a working answer shortly after I posted here... Anyway, for anyone else who wants to do the same thing:

  • Install 'screen' (http://www.gnu.org/software/screen/)
  • run screen from the TTY window you want to connect to
  • start whatever process it is you want to monitor
  • switch to your graphical environment, open a terminal and 'su' to the correct user
  • run 'screen -x' to connect to the session

Hope that helps someone :)

That being said, if anyone has a way of actually connecting to another running shell (is that even possible) without using other programs I would like to hear it!

share|improve this answer
    
+1 a use for screen I never would have come up with! clever. –  DaveParillo Jan 5 '10 at 5:36

ttysnoop comes to mind. I'm sure there are others.

share|improve this answer
    
Not as many as you'd think, but you could write your own using snp. On bsd systems there is a program "watch", which uses snp: sudo watch /dev/tty1, but on most other distros, use ttysnoop. –  DaveParillo Jan 5 '10 at 5:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.