I have tested playing sound via ssh console and it works with this: https://superuser.com/questions/276596/play-mp3-or-wav-file-via-linux-command-line

I am wondering how to do the same in someone else's session.

Ex.: my son is logged in computer full awake while he sleeps and I would like to play him a army wake up call trumpet so he turns the laptop off. I'm the one paying the electrical bill.

Anyone has an idea. I am stumped!


make sure the target computer is on, or you are able wake it from the LAN, log in via SSH, and run the command. You might have to scp those executables necessary to invoke the command.

Or, show him how laptops have sleep settings.

  • LOL. Thanks. He's got an anvil for a brain. He knows all that already. It so happens that the above link did work... Just had to unmute the laptop first. He must have been looking at undressed ladies and didn't want to wake the house... Unmute... 100% volume... Playlist go! then shutdown. That's the lesson from tonight on. It's scripted and cron'd. If the laptop's off... no problem. If CPU is unused for a while... it runs every minute until it's turned off or the CPU gets used again! – Marc Arbour Jan 26 '16 at 14:57

Log in to his computer by ssh. In his computer, do the following commands.

sudo apt-get update
sudo apt-get install festival
echo "Wake up, anvil brain. Turn off the computer. Now!" | festival --tts

Have fun!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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