Skip to content

Instantly share code, notes, and snippets.

@AGhost-7
Last active February 19, 2016 02:13
Show Gist options
  • Select an option

  • Save AGhost-7/6347d10e2b69e1c30336 to your computer and use it in GitHub Desktop.

Select an option

Save AGhost-7/6347d10e2b69e1c30336 to your computer and use it in GitHub Desktop.
Play music from the command line lol
# Make sure to run `paprefs` and make pulseaudio discoverable.
serverIp=something
# Send your client's ip over to the server.
wget http://ipinfo.io/ip -qO - | ssh $serverIp 'cat - > client_ip'
# Install x11 server and add the client ip to the list of allowed clients.
# TODO: https://razor.occams.info/blog/2009/02/11/pulseaudio-sound-forwarding-across-a-network/
ssh $serverIp 'sudo apt-get install xorg -y && xhost `cat client_ip`'
ssh -X $serverIp
sudo apt-get install mpg123 -y
wget http://www.youtubeinmp3.com/fetch/?video=https://www.youtube.com/watch?v=8qnQCt7WEEE -O kiasmo_gaunt.mp3
mpg123 kiasmos_gaunt.mp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment