Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm in a ssh connection and I would like to play a sound after a command completes (not on the server where I connected).


make && play-sound-local

I have built-in pc-speaker disabled so echo -e "\a" doesn't work.

Any suggestions?

share|improve this question
up vote 1 down vote accepted

You can configure PulseAudio to allow network connections, then use ssh port forwarding and paplay -s on the remote side to send audio back through the ssh connection. Note that the audio may be delayed or stutter based on the fidelity of the audio and the speed of the connection.

share|improve this answer

Set up primitive server (for example, on port 1234) that plays sound on local computer when someone connects, and forward that port to remote server.

On local machine:

nc -l -p 1234 -e "mplayer sound.ogg"


ssh -L 1234:localhost:12345
make && nc localhost 12345

PS: you should use ; instead of && if you want to be notified even when make failed.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .