0

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

2 Answers 2

1

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!

1
  • +1 a use for screen I never would have come up with! clever. Jan 5, 2010 at 5:36
1

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

1
  • 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. Jan 5, 2010 at 5:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .