Created
February 23, 2014 20:56
-
-
Save quickshiftin/9177170 to your computer and use it in GitHub Desktop.
Set the volume on a mac over the network with SSH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remote_volume | |
{ | |
local user="$1" | |
local host="$2" | |
local vol="$3" | |
ssh "$user"@"$host" 'osascript -e "set volume output volume '"$vol"'"' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will let you set the volume on a Mac on your network. It's designed to work over an SSH key. If you don't know how to set those up, look here. Set the public SSH key on the remote box, then put the above function in ~/.profile on your mac. Now from your mac you can run this function from the terminal like so