If you need to disable the physical button in CD/DVD/Blu-ray drives in Linux, you can use these instructions on Ubuntu based distributions:
- Copy
/usr/lib/udev/rules.d/60-cdrom_id.rules
to/etc/udev/rules.d
- Edit
/etc/udev/rules.d/60-cdrom_id.rules
- Comment out the line that has
ENV{DISK_EJECT_REQUEST}
- Use the eject utility to disable the physical button:
sudo eject -i on /dev/cdrom