Bug 145843 - CD-ROM lock, unlock; Better graphical eject, close
Summary: CD-ROM lock, unlock; Better graphical eject, close
Alias: None
Product: Fedora
Classification: Fedora
Component: eject   
(Show other bugs)
Version: 7
Hardware: All Linux
Target Milestone: ---
Assignee: Zdenek Prikryl
QA Contact:
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2005-01-22 04:33 UTC by Christopher Beland
Modified: 2008-03-01 03:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-02-28 13:00:31 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Christopher Beland 2005-01-22 04:33:25 UTC

Right now...

When there is a CD-ROM mounted, you can eject it by:
 - Right-clicking on the CD icon on the desktop and selecting "Eject"
 - Running "eject" at the command line

When there is no CD-ROM mounted, you can open the drive tray by typing
"eject" at the command line.

You can close the CD-ROM tray by typing "eject -t" at the command
line, if your hardware supports this operation.

There is no easy way that I know of to intentionally lock or unlock
the drive tray.


I have a laptop which I carry in a travel case.  When moving the
computer in or out of its case, it's very easy to accidentally hit the
"eject" button on the CD-ROM drive.  If I'm not careful, this could
easily result in serious damage to the hardware if the edge of the
drive gets caught on part of the bag.

So I desperately needed a way to software-lock my CD-ROM drive at
will.  After about an hour of poking around online and tweaking the
code I found at

a.k.a. http://zentara.net/perlplay/cdrom-tray-control-inline-c.html

...I had myself a working command that can lock and unlock (and eject
and theoretically close) my drive.


It seems to me that CD-ROM users in general and especially laptop
users, could benefit from a graphical method to lock, unlock, and
close their drives.  After looking at the existing facilities, it also
seems that the "eject" command might benefit from being accessible in
more places.  This would help keep it near the other CD-ROM commands
when appropriate, and also make it possible to open the drive when it
is empty.

There are several places worth thinking about putting a hook into some
or all of the {eject, close, lock, unlock} commands:
 - On the Actions menu.
 - In the file browser, when right-clicking on the CD-ROM drive, or
   when viewing its properties.
 - In the file browser, on the File menu, when browsing files on a
   mounted CD-ROM.
 - On the menu you get when you right-click on a mounted CD-ROM's
   desktop icon.
 - Applications that use CDs and DVDs (like burning or music software)

In an ideal world, certain graphical options would either not be
present or would be grayed out if they are not actionable.
Unfortunately, I'm not sure if there's a reliable way to determine
this.  For example, my /proc/sys/dev/cdrom/info claims "Can close
tray: 1", but my drive is not physically capable of doing so on its

Also note that "eject" should imply "unmount file systems, unlock, and

Comment 1 Matthew Miller 2006-07-10 23:01:05 UTC
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!

Comment 2 Christopher Beland 2007-08-26 19:52:41 UTC
This was originally reported for Fedora Core 3, and is still a problem with
Fedora 7.

Comment 3 Zdenek Prikryl 2008-01-24 10:21:46 UTC
I could add a support to lock and unlock devices to eject. But eject is only a
console application. So if you want to have lock/unlock commands available
through a graphical menu, you have to make request for Future Feature in these
graphical applications (like nautilus etc.).

Comment 4 Zdenek Prikryl 2008-02-28 13:00:31 UTC
Locking support added into rawhide. If you want to graphical interface, please
fill REF into these graphical applications.

Comment 5 Christopher Beland 2008-03-01 03:40:22 UTC
Awesome, thanks!

Note You need to log in before you can comment on or make changes to this bug.