Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 ?

share|improve this question
    
paste the command you use please –  matthias krull 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
add comment

2 Answers 2

you can use

echo -e "\a"

instead

share|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
add comment
$ sudo -s 'tput bel >/dev/console'

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

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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