Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.3: Eject your external CD drive from the keyboard System
I've got an external FireWire CD writer, and one thing that's really irritated me is having to nudge the tray until it pulls it back in. However, I've just found drutil in Panther; it lets you control your cd writers from the command line, including ejecting and closing the tray! Using one of the freeware F-key modifiers, i've saved this applescript as an application and attached it to F15:
set home to path to home folder as string
set mypath to home & "discCheck"
set testVar to true
try
  set mypath to mypath as alias
on error
  set testVar to false
end try

if testVar is true then
  do shell script "drutil tray eject; rm -f ~/.discCheck"
else
  do shell script "drutil tray close; touch ~/.discCheck"
end if
[robg adds: A previous hint talked about using drutil and cron to automatically close the internal CD tray...]
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[15,238 views]  

10.3: Eject your external CD drive from the keyboard | 16 comments | Create New Account
Click here to return to the '10.3: Eject your external CD drive from the keyboard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Eject your external CD drive from the keyboard
Authored by: gopes on Mar 17, '04 11:22:34AM

In the second line, there should be a period before diskCheck for it to work properly....
Thanks for this! This had bugged me for a while, but not enough to do anything about it....



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: Alrescha on Mar 17, '04 12:25:28PM

In 10.2 (prior to 10.2.6) you could open/close the second drive with Option-Eject. Why this went away is a mystery to me.

A.



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: scotty321 on Mar 17, '04 01:17:34PM

This looks like a great AppleScript! However, when I run it, it ejects BOTH my external AND internal drives. Does anybody know how to modify this script so it only ejects the EXTERNAL drive?

Thanks,
Scott



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: aaron128 on Mar 17, '04 02:13:56PM

try this:

drutil tray eject -drive firewire
drutil tray close -drive firewire



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: SJT on Mar 17, '04 06:22:23PM

Yeah, sorry about that folks, it should read ".discCheck" as the comment above suggests.

Perhaps rob can spare a mo' and edit it for all those poor souls that don't read the comments...:)



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: milhouse on Mar 17, '04 01:34:40PM

You can also use this nifty program:

http://themacaddress.com/ardiem/

It puts an eject menu in your menu bar and it's programmable for both internal and external drives.



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: chanamasala on Mar 17, '04 04:15:54PM

Don't forget the freeware DocJector. It works with all ejectable items: internal drives, external drives, .dmg volumes, and network servers. Its drawbacks are that it doesn't hide itself from the Dock if you use it as a menubar item and it won't close drives.

http://www.monkeyfood.com/software/docJector/



[ Reply to This | # ]
Change DockJector - no dock icon
Authored by: mclbruce on Mar 17, '04 09:25:17PM

I like the way DockJector works in the menu bar, but I don't want it in my Dock. Fortunately there is a hint that allowed me to modify DockJector so it doesn't show up in the dock.

http://www.macosxhints.com/article.php?story=20010701191518268



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: Anonymous on Mar 19, '04 04:27:23AM

I don't know why shoud we use any third party in-menu eject utility while there is ready to use system one:

Just go to /System/Library/CoreServices/Menu Extras
and double-click on Eject.menu to have in-menu eject function for all system-recognized drives.

---
--
Pawel POLONUS Soltysinski
priv: polonus@webnet.pl



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: cougar718 on Mar 17, '04 04:45:42PM

Hello all,

I don't understand this hint at all. Why not use F12 to open and close the CD tray? This is what I use to open and close the tray. Why an AppleScript mapped to a modifier when Apple already has it mapped by default? Seems like alot of trouble for something that is already implemented in the operating system *OR* I missed something. Anyone care to explain?

---
Rick alias cougar



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: kray on Mar 17, '04 04:55:22PM

Yes, unfortunately you are missing something. :)

Some of us have EXTERNAL additional firewire type drives (I have two external DVD+/-RW's myself) -- how do you quickly eject/close a EXTERNALLY attached drive?

Per previous hint: http://themacaddress.com/ardiem/



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: cougar718 on Mar 18, '04 12:21:51PM

Hehe ok,

I definitely did miss something :D I thought F12 would eject the trays of every CD/DVD drive connected to the computer. I'm pretty sure I remember my friend's firewire drive connected to my Mac and it ejected both cds. Maybe Panther removed this feature!

---
Rick alias cougar



[ Reply to This | # ]
'drutil tray close' and TB2
Authored by: josephaw on Mar 18, '04 07:37:35AM

I was unable to press F12 using Timbuktu to close a cd tray; it would pass that keystroke to my local computer, now using the 'drutil tray close' via terminal on the remote machine, I can close up the tray; without rebooting; after burning a cd or dvd to test the contents.
Thanks, Joe



[ Reply to This | # ]
forgot about 'Eject.menu'
Authored by: josephaw on Mar 25, '04 09:42:48AM

I forgot about the 'Eject.menu' in
/System/Library/CoreServices/Menu Extras/
That works best.



[ Reply to This | # ]
10.3: Eject your external CD drive from the keyboard
Authored by: jonahlee on Jul 02, '04 11:05:52AM

I was trying to do this from single user mode, so I could quickly restart off my diskwarrior CD. All I got was a bus error for my problems. I wonder if that has anythign to do with having 2 External Firewire CD-RW's, as well as my internal Superdrive?

---
- Jonah Lee



[ Reply to This | # ]
single user mode
Authored by: dump on Aug 27, '04 06:35:28PM

No, it just doesn't work, even when you only have the internal drive. I get the impression several things are broken in single user mode under Panther.
-dave



[ Reply to This | # ]