TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:1420] how do I make a beep?



The automating part I can handle - my question is about a program to run
to make the beep. Then I can just add it into his bashrc file or whatever.
Does someone have a program that will beep when executed? (The one someone
send before doesn't work, maybe if they could attach the file it would
work, beacuse I had to copy and paste in chunks because of screensize)

Thanks,

Ben


> There are more direct ways to do this. The "real" unix way is to write
> a program that reads the utmp file. Have a look at the utmp(5) and
> getutent(3) man pages for info on how to get information out of
> utmp. A copy of stevens' Advanced Progamming the UNIX Environment will
> come in handy if you want to send signals to other peoples tty's.
> 
> A possibly easier way would be to have your friends .login create a
> file in /var/tmp (or some unimportant place you agree on) Then you can
> run a program periodically that will inform you when he logs in. The
> easiest way to do that is to use bash's PROMPT_COMMAND--it will run a
> command before you get your next promt, have it look for the that file
> & print a message/beep/restart your computer, etc. Of couse this only
> works if you use the shell with some reasonable frequency...
> 
>     Bob> Not sure, but you can run swatch which monitors your log
>     Bob> files and you can set a pattern that looks for telnet in the
>     Bob> logs and beeps when it finds one.
> 
>     Bob> vi ~/.swatchrc
> 
>     Bob> /in.telnetd/ echo=inverse,bell=1
> 
>     Bob> This will make the login msg in your swatch window inverse
>     Bob> and ring the bell 1 time.  -- Bob Tanner
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@listserv.real-time.com
> For additional commands, e-mail: tclug-list-help@listserv.real-time.com
> Try our website: http://tclug.real-time.com
>