Get notified when remote task ends

So most of the time, I deal with a lot of remote programs that run for an annoying amount of time (e.g. 2 minutes or 5 minutes). The most annoying thing is that I end up wasting more than say 2 minutes on something else, waiting for the program to end, simply because I’m not notified about the process finishing.
There are many ways out there to get notified when a job ends. Some send you an email, which in my opinion is overkill for small programs that don’t take hours. Here’s my version (tested on Ubuntu):
alias notify=$'ssh <username>@$(echo $SSH_CLIENT | awk {\'print $1\'}) \'export DISPLAY=":0"; notify-send -t 30000 "Done"; \''Basically, it’s ssh-ing back to your machine, and calling the notify-send command.
You can copy this into your .bashrc and replace <username> with your local machine’s username. Of course you need to have enabled incoming SSH. Here’s how to do that in Ubuntu.
Now to use it, you just add notify to the end of your programs. For example:
> ./long_program.sh; notify; When the remote program ends, you get a notification popup on your machine that says “Done”!
