Although the new question is related, it is in a different topic area so it would be preferable to start a new thread (for the benefit of anyone searching to solve a similar question) so I'll answer briefly; if it is not enough then please start a new thread.
udev rules can be used to run a script (with root privileges) when a device is plugged in or on power up. See
Daniel Drake's "Writing udev rules" but is a little dated, for example udevadm has replaced udevinfo on recent systems. Potential gotchas are that udev may not set a sane PATH (so set PATH in the script or give full paths to all executables) and any error messages (essential while debugging) will not be recorded (so use syslog to capture debugging output and error messages).
If you are using a graphical desktop environment then there are several utilities that a script can use to display an interactive dialog; zenity is popular, yad would be a good choice. One gotcha is that the script run by udev does not know which X display to use. On a single user system (so only one X display in use) this can be solved by
export DISPLAY='localhost:0.0'.