WebUpd8 Reader Jim Bauwens sent us a small but very interesting script. The script uses NotifyOSD and displays a message (see the screenshot) when someone logs in to your computer (remotely or local), or when a terminal session is started.
The script can also notify you by email using sendmail. You'll of course need to set that up but we have a post on that - for using it with Gmail (it's quite easy - just make sure you create a new Gmail address just for this task because the password will be saved in plain text): Use Gmail To Send Emails From A Terminal (Shell)
Using the script
1. Install libnotify-bin:
sudo apt-get install libnotify-bin
2. Download the script and then make it executable by right clicking it, then go to the "Permissions" tab and check the "Allow executing file as program" box.
3. Add the script to your startup applications: go to System > Preferences > Startup Applications, click "Add", then browse for the script and give it a name. That's it!
4. Optional: If you want to be notified by email (make sure you set that up first - read the beginning of the post), you'll need to edit this part of the script:
and set the variable "mail" to "1" and "mailto" to your email adress.
Credits for the script (and many thanks!): Jim Bauwens