Automatically run script when a dvd is inserted
I'm hoping someone will be able to help me... I have been googling for a couple of days now and I haven't come up with much.
I am running Ubuntu 10.4 LTS Server Edition on a headless server and I would like to be able to have it automatically execute a script when a DVD Movie is inserted.
In particular I want to be able to run vobcopy automatically so I can backup my DVD's and then later encode them with handbrake. (I have already written a very simple Python script for this and I can automate it's use on the desktop edition by using Nautilus's feature to open certain programs upon detection of certain types of media...)
I have read a few pieces of information on the web about using halevt, or ivman, to automate actions upon certain system events, but as I understand it hal has been removed from Lucid. Thus I need to find another way.
I have also found a little information on udev, but I have not been able to find any information on how I would write a rule that would execute a code when a DVD is inserted. It would be good if I could get the code to only execute when a DVD Movie is inserted ( as opposed to running every time a anything is inserted into the DVD drive...)
Anyone have any ideas on how I would do this? Any help will be appreciated.
Macbook 6,1 - Triple Boot OS X, Lucid and Win7
P4 - Lucid Lynx 10.4LTS Server Edition