Q&A: Remote control over the optical drive

Q I often control one of my Macs using screen sharing software. However I cannot find a way of opening and closing its optical drive without using a keyboard attached to it. Can you suggest one?

A The quickest and simplest way to do this is to open Disk Utility: select the optical drive icon in the left pane of its window, and use the Open and Close button.

It is also easy to perform in Terminal’s command line, using the command
drutil tray open
and to close it again
drutil tray close

Note that open only works when no optical disk is in the drive. If you want to open the drive irrespective of whether there is a disk present, use
drutil tray eject

You can find further relevant commands in Terminal, by typing man drutil

Comments You can embed those into Automator or AppleScript scripts or applications, so an even simpler approach would be to make an Automator application for each of the two commands. You would then only have to double-click on the right application to access the drive.

Updated from the original, which was first published in MacUser volume 26 issue 11, 2010.