Wednesday, September 17, 2008

Open the CD tray using Terminal

This might come pretty hand, once I get my beloved Happy Hacking Keyboard because, unlike the Mac Pro Keyboard, the Happy Hacking does not have a dedicated key to open/ close the CD tray on the Quicksilver.

Open Terminal, and execute:

drutil list

On my case I have only 1 CD ROM unit:

% drutil list
Vendor Product Rev Bus SupportLevel
1 SONY DVD RW DRU-700A VY02 ATAPI Vendor Supported

Then, to open the tray, you can type:

drutil tray eject 1

If like me, you only have 1 CD ROM installed, you directly type:

drutil tray eject

There is more information for drutil on its man page, a little snip:

tray command
Performs a tray/media related command. Note that some drives
do not have trays, and some have trays but may lack motorized
eject or inject capability.

Tray commands:
open Opens a drive's tray, if no media is present and the
drive has a tray capable of motorized eject.

close Closes a drive's tray, if the drive has a tray capa-
ble of motorized inject.

eject Ejects media from the drive, if the drive has a tray
capable of motorized eject. If no media is present,
this is equivalent to open. If media is present and
can be unmounted, it will be unmounted and then
ejected. If media is present but cannot be
unmounted, the eject will fail.

Labels: , , ,

0 Comments:

Post a Comment

<< Home