This is a little yet useful bash script that shows notifications when any USB device is plugged/unplugged.
Honestly, I don't quite understand why this essential feature is not implemented in major Linux distributions by default. There are notifications about removable storage, but not much more than that: e.g. no notifications about usb-to-com converters, etc. I really want to know when my devices get recognized by the system, or disconnected for whatever reason (be it a bad USB cable connection, or whatever).
Project is hosted at GitHub.
/path/to/my-udev-notify/my-udev-notify.sh” to real path to the
my-udev-notify.shscript (where you cloned it).
After this, it should work for newly attached devices. That is, if you unplug some device, you won't get notification. But when you plug it back, you will. (yes, for me it works without any udev restarting. If it doesn't for you, try rebooting)
To make it work for all devices, just reboot your system. Note that there will be many notifications during first boot (see known issues below). On second boot, there will be no notifications (unless you plug in new device when system is off)
There is example configuration file:
Which you can copy as
/etc/my-udev-notify.conf and edit as necessary.