How can I remotely (SSH) make my Linux Computer Beep (built-in speaker, as there are no external ones)? I have ubuntu 9.04 and can install extra packages if need be. This would be good for finding a certain box if you have more than one standing around and forgot which IP is which box.
feedback
|
|
Try:
| |||||||
feedback
|
|
Just type
Tested on Ubuntu Desktop 8.x, this will beep on the remote server, even if no local session on that server is active (thus: even if the GNOME login screen is shown on the monitor attached to the server). Have a look at
for more details. On Debian/Ubuntu, the beep package has to be installed and the speakers must not be muted. | |||||||||||
feedback
|
|
From the beep man page on my Ubuntu machine:
This could well be the reason why beep refuses to work remotely. You can check if this is the root cause by invoking ssh with the -t option, which forces pseudo-tty allocation. A less desirable solution would be to create a wrapper script that executes beep, and grant this script root permissions. If executing this script over ssh duly produces a beep, you'll know that the issue is the lack of a controlling terminal. | |||
|
feedback
|
|
You can use: ssh user@remote-machine sudo sh -c "echo -e '\a' > /dev/tty1"
ssh user@remote-machine sudo echo -e '\a' > /dev/tty1 -bash: /dev/tty1: Permission denied ls -la /dev/tty1 crw------- 1 root root 4, 1 2009-09-28 16:33 /dev/tty1 | |||||||
feedback
|
|
Run a remote command to the remote machine:
| |||||||
feedback
|
|
Or, you could simply run the following once: chmod o+x `which beep` This will allow all users to use the beep executable, which probably is safe enough in most cases. | ||||
|
feedback
|
|
first:
then solutions from topic, like
| |||
|
feedback
|
