Triggering an action when a specific volume is connected

Posted by ereOn on Ask Ubuntu See other posts from Ask Ubuntu or by ereOn
Published on 2012-11-12T10:02:03Z Indexed on 2012/11/12 11:21 UTC
Read the original article Hit count: 279

Filed under:
|
|

I have a USB key that contains my keepass2 password database and I'd like to perform some actions when it is plugged into my computer, namely:

  • Auto-mount it to some specific location
  • When the mounting is done properly, launching keepass2 on the password database file

Simple tasks I guess, but I can't find how to do that.

I'm using Ubuntu 12.10, and it auto-mounts the device as a "media usb-key" and tries to open the images on it (even though there are none).

What is the best way to do that and to disable the ubuntu auto-mounting (so it doesn't conflict) ?

© Ask Ubuntu or respective owner

Related posts about 12.10

Related posts about automount