Have you ever wondered how to execute scripts with some notification after they finish on your local or remote machine? As a physics student, I run many simulations on remote servers or lab PCs. These days I contribute to my supervisor’s package quantarhei (also we need developers) and I need to run package tests on a regular basis. Since these tests take approximately 5 min, that is a reasonable time indeed, but our school lab can do a bit better. I don’t want to wait all this time staring at unit test output and I would like to continue in package development! So what do I do?
I tried to solve this inconvenience. Because I had VPS, I created my own Rest API, with MongoDB database and telegram bot. This way I had smartphone notifications and desktop notification with the telegram web app. This solution, however, created many different problems (which I had fun solving). I was searching for some online tools but didn’t find anything for a reasonable price or for free.
For my local machine I use sound notification, with these aliases in .zshrc (or .bashrc if you don’t use zsh)
alias sn1="mpg123 ~/Music/never.mp3 > /dev/null 2>&1"
alias sn2="spd-say 'Yo'"
alias sn3="mpg123 ~/Music/doot_doot_mr_skeletal.mp3 > /dev/null 2>&1"
...
then simply run the following
sleep 5; sn2
What about remote machines? I use Pushbullet together with ntfy ntfy utility! Ntfy also supports Pushover, but they do not support older versions of Android OS. You have to go to the Pushbullet website and get Access Token in the settings. Then create ntfy config file ~/.config/ntfy/ntfy.yml
backends:
- pushbullet
pushover:
user_key: YOUR_ACCESS_TOKEN
Set your alias in .zsrhc (or .bashrc)
alias msg="ntfy send"
If you do not have rights to change files outside your home folder you can also execute ntfy directly with the token
alias msg="ntfy -b pushbullet -o access_token YOUR_ACCESS_TOKEN send"
Enjoy your notifications!
msg “ARE YOU READY?”

Top comments (0)