I am currently using a portable version of Keepass on my USB Stick. Now I am searching for a way to automatically start that when I connect my USB Stick to my machine.
The Stick already gets automatically mounted by KDE upon connect so if there is a way to catch an event determining if some given files already exist that would probably be fine as well.
If possible I do not want to use polling.
Edit: So I just found out about DBUS which seems to be the right thing to look into to solve my problem. Still haven't solved it yet as DBUS seems to be quite complex.
Edit2: I learned that you can add Actions to the Device Manager in KDE. These pop up when the USB Stick gets connected. This is still not an autostart feature, but it reduces my work to one click.