CD Eject

David Zeuthen david at
Fri Jan 6 18:49:53 UTC 2006

On Fri, 2006-01-06 at 06:51 -0500, Alan Cox wrote:
> On Thu, Jan 05, 2006 at 02:18:37PM -0500, John (J5) Palmieri wrote:
> > As for drives opening I would guess we could listen for the button press
> > and do an unmount/eject.  The question is do we get eject button signals
> > from the kernel.
> Or from the hardware. Late ATA supports polling and the like for button
> changes but AFAIK nobody ever implemented the user space polling tool and 
> most drives don't support it

Since a recent release, we poll for this in HAL and emit a signal on the
system message bus when the button is pressed. I believe recent version
of gnome-volume-manager is able to intercept the signal and attempt the
unmount / eject dance. 

Of course, the unmount operation might fail if one or some processes
have open files on the media; I don't think g-v-m yet spams the user
with a dialog a'la "The application Foo is preventing ejection of your
optical disc" but I wouldn't be surprised if it does.

Yes, it only works on some drives.


More information about the fedora-devel-list mailing list