disable cd/dvd button on linux laptop (ubuntu)
At the command line:
eject -i 1
To return to normal:
eject -i 0
Or you can software eject it using:
eject
In all cases, you can add a device name if you have more than one ejectable device.
Apparently, this doesn't work with all versions of eject. If it doesn't with yours, you can bypass eject completely and do it the "hard" way:
echo 1 | sudo tee /proc/sys/dev/cdrom/lock
You might want to try this out...
http://www.poweradded.net/2009/09/cddvd-tray-lockunlock-under-linux.html
Ubuntu's default automounter doesn't lock the CD/DVD try when it mounts an inserted disc. But if you mount the disc manually (say, with sudo
), the tray should lock and stay locked until you dismount the disc.
So this process would accomplish what you want, without disabling other functionality, and you could even script it for quick access:
- Insert a disc,
- Run
sudo umount /media/cdrom
, then - Run
sudo mount /dev/cdrom /media/cdrom
Obviously, replace those paths and devices with ones your system uses.