Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-08-2005, 01:28 PM   #1
LQ Newbie
Registered: Nov 2003
Location: washington
Distribution: still looking
Posts: 16

Rep: Reputation: 0
TTY echo / redirection / monitor howto

Is there a way to view a session of another user logged in via terminal?


'w' lists current users on pty/0, pty/1, pty/2.

From pty/0 I want to see all commands and output from pty/2.


(I also vaguely recall being able to export the display in X windows to run things under a different user context? Would this be related?)
Old 06-09-2005, 07:18 AM   #2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
You could add these lines in the ~/.bash_profile of the user
(assuming bash is the default shell)
rm -f /tmp/myoutput > /dev/null 2>&1
mkfifo /tmp/myoutput
script -f /tmp/myoutput
Then after he logged, just type in your terminal :
cat /tmp/myoutput

Last edited by keefaz; 06-09-2005 at 07:24 AM.
Old 06-28-2005, 01:46 PM   #3
LQ Newbie
Registered: Nov 2004
Posts: 6

Rep: Reputation: 0
Is there any other way to do this? While this works really good for the monitoring of specific users, many times a who is executed and suspicious terminals are open. I need to know what is going on in that terminal immediately; not next time they login.

Can a terminal be set up to pipe to a FIFO while it is active?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitor Refresh Rate on TTY WolfBLN Linux - Hardware 1 06-17-2005 08:07 AM
Kphone echo (echo echo) scabies Linux - Software 0 10-18-2004 02:59 PM
change tty => system crashes (ati driver/tty resolution) mosca Debian 6 08-05-2004 07:37 AM
HowTo disable LCP echo request fransemail Linux - Software 2 05-04-2004 03:08 PM
Disable Monitor Sleep [in fluxbox and from tty] VxJasonxV Red Hat 7 01-29-2004 04:43 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration