Why is CD/DVD tray not opening?

Try this:

Steps:

  1. sudo eject /dev/sr0
  2. file /dev/sr0
  3. sudo eject -i off

Some CD/DVD eject buttons send a signal, so that the operating system knows to eject. Some do not send a signal. So just pretend you do not have an ejection button on the device and use eject instead. If you are already on the command line...

eject

or maybe you may need to specify the device:

eject /dev/sdc

If you are not on the command line, you might use [ALT]+[F2] to run a command... and the same commands would work that way, too.