I have a simple script for ssh-ing messages to my wife through the Ubuntu notification system (notify-osd):
# Send a message through ssh to notify-osd on a remote host.
ssh -X -p #### username@remote-host DISPLAY=:0 notify-send $1
Now, the $1 is the problem I'm having, and I'll get to that in a second.
I should say first that this command works as an alias in the remote-host, but with the ssh part stripped off, such that:
alias chat='DISPLAY=:0 notify-send'
After SSH-ing to the remote machine, type 'chat' at a prompt, and enter your message "surrounded by double quotes" to have it appear as a notification bubble on the remote screen.
In script form, without the $1 variable there, I get an error, "No summary specified." With the $1 variable, if I type more than one word separated with a space, I get the error "Invalid number of options." A little research led me to believe that if I substituted in $@ instead of $1, it might work better, but it doesn't.
Seems to me that there has to be a variable there - what should I use?