snpd is a small server written in Python which translates incoming SNP 3.0 requests and displays them using Notify OSD.
What you need
To complete this tutorial you’ll need the following:
- Ubuntu 14.10 (other distributions will undoubtedly work but the tutorial was written using this version)
- Python 3.4 (included with Ubuntu 14.10)
Before you begin
- snpd is still in development – we’re hoping this tutorial will encourage people to try it out and provide feedback on what doesn’t work and what can be improved (being able to specify the TCP port to listen on is already on the to-do list);
- snpd-linux relies on features included with Python 3.4 – earlier versions of Python (especially 2.x) will not work.
Download snpd-linux (see link above) and unzip its contents somewhere handy, such as your home folder.
Launch a terminal session, navigate to ~/snpd-linux (or wherever you unzipped it to) and run snpd.py as follows:
You should see the following text displayed:
SNP3daemon for Linux 0.1 Copyright (C) 2015 full phat products Server started on port 9887; press CTRL+C to exit.
SNPd is now running! We’ll now test connectivity from the same computer. Leave this terminal window alone and launch another terminal window. Enter:
telnet 127.0.0.1 9887
To connect to port 9887 on this computer. You should see the following:
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'.
Enter the following lines, pressing return in place of the ¬ characters:
SNP/3.0¬ notify?title=Hello, Ubuntu!&text=From Snarl&icon=!snarl¬ END¬
With luck, you should see the following displayed on screen:
And this returned in the terminal window:
SNP/3.0 OK END
Awesome! Now we’ve proven everything seems to be working, let’s test it using Snarl.