When I press the button on the dvd player, it doesn't open.
If I press it during the boot (before starting ubuntu), it opens fine.
So, what I have to do to eject the dvd?
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
or maybe you may need to specify the device:
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.