monitoring on virtual terminal: HOW?

I want to have other programs than getty/login running on my virtual terminal. For example, I want to have pppstatus running on vt8, top on vt9, or a "tail -f /var/log/messages" on vt10. But I don't want to log in for that...

Furthermore, I want those to be restartet if they are accidently closed.

I remember that with an old Suse 5.0 one could monitor the installation process on vt3 or so. And during install of my Debian/GNU Linux I too have a monitor on vtXYZ.

So, somehow it must be possible to have something else than getty on a vt...

I've been searching Howtos, LDP, man-pages, info-pages, FAQs for several hours now and I didn't come any closer to a solution. Please help me!

Can I somehow tell the program on which vt it should run (just like getty is told)? Is there some tool that could run the program on a specified vt? Do you actually understand what my problem is?



housetierAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
GnsConnect With a Mentor Commented:
Use "open" and possibly a combination of scripts/init.

man open

You'll need to specify the -w option, otherwise open will return immediately (not good with init;-).
eg: open -c 10 -w -s /usr/bin/top
would start top in vt10, wait for completion of command, and switch to vt 10 (-s option).
I think you can figure out the inittab entry from ahoffmanns comment;-).

Please note that several textbased "monitors" may present a grave security risk, if run this way, since they let you affect the system (top lets anyone sitting at the keyboard renice or kill arbitrary processes etc). If you run from init, you are root.

-- Glenn
0
 
ahoffmannCommented:
never tried it, but should work as follows
add to your /etc/inittab:

10:3:respawn:tail -f /var/log/messages>/dev/ttyv10
0
 
housetierAuthor Commented:
it started tail but not on a (v)tty. Are you sure about /dev/ttyv10?

---Lasse
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
GnsCommented:
(Answering for ahoffmann, many excuses:)
No it should (in all probability) be /dev/tty10.

-- Glenn
0
 
housetierAuthor Commented:
Thats what I was looking for! Thanks a lot :)

Maybe I should start a HOWTO for this...

---Lasse
0
 
GnsCommented:
Gör det... erhm do that:-)

-- Glenn
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.