Suppose I'm connected to a computer A (ssh-server), via ssh through a computer B (ssh-client).

When I run the command "tput bel", how to make the noise on the computer A instead of making it, as default,on the computer B ?

link|improve this question
paste the command you use please – mugen kenichi Mar 15 '11 at 22:33
ssh hostname ; - tput bel; – anonymous Mar 15 '11 at 23:16
tput bel outputs the bell character defined for $TERM, which is usually \a. – geekosaur Mar 15 '11 at 23:23
feedback

2 Answers

you can use

echo -e "\a"

instead

link|improve this answer
1  
That will still ring the bell on the current terminal, which is to say, the ssh session. It needs to be redirected to the console or an allocated virtual terminal, or possibly use something like the PC-speaker driver. – geekosaur Mar 15 '11 at 22:10
1  
how about cat /bin/touch > /dev/audio – jet Mar 15 '11 at 23:57
I was trying to avoid invoking the audio subsystem; if the remote is a server, it might not even have ALSA installed, much less connected to speakers. – geekosaur Mar 16 '11 at 3:31
feedback
$ sudo -s 'tput bel >/dev/console'

is the best you're likely to do, I think. (I can't test it properly here.)

link|improve this answer
And there is no way to do that without being root ? – anonymous Mar 15 '11 at 23:01
1  
/dev/console usually prohibits non-root from accessing /dev/console. /dev/tty1, the first virtual console, can also be written to by group root by default. Someone would have to change those permissions, which might require hacking whatever passes for getty in the case of tty1. There's also stackoverflow.com/questions/4447166/… (probably same permissions issues). – geekosaur Mar 15 '11 at 23:22
feedback

Your Answer

 
or
required, but never shown

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