Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Hardware > Notebooks > MacBook Pro

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 1, 2011, 05:38 PM   #1
tjb1
macrumors 68000
 
Join Date: Aug 2010
Location: Pennsylvania, USA
How To: Eject External CD/DVD Drive with Eject Button

I have been trying to figure this out ever since I got an optibay and then ended up with a useless button on the keyboard. After hours of frustration and trying different things I have found the way to make the Eject button on the keyboard eject the external cd/dvd drive and not affect any hdd/ssd/flash drives or anything else connected via usb or sata.

Notice: I am not sure if this will work for Leopard or Tiger, only that the software used does work on those operating systems.

What you will need:

KeyRemap4Macbook - Works for Lion, Snow Leopard, Leopard, and Tiger.

Steps:

1. Download and install KeyRemap4Macbook. Restart is required for use.

2. Open System Preferences > KeyRepma4Macbook

3. Make sure you are on the "Change Key" menu and click in the search bar in KeyRemap4Macbook, not the search for System Preferences.

4. Type "eject" in the search bar and check the box next to "Eject to Command+Control+Option+Shift+E"

5. Exit System Preferences and open Automator.

6. Choose the template "Service" and hit "Choose" at the bottom right.

7. In the search bar at the top left, type "Run Shell Script"

8. Drag "Run Shell Script" from the left to the Workflow Area.

9. At the top above "Run Shell Script" click the arrows next to "Service receives selected text" and pick "no input" at the bottom of the list.

10. Next delete "cat" from the Shell Script and type this "drutil eject"

11. While in Automator go File > Save As > Eject

12. Close Automator and open System Preference > Keyboard > Keyboard Shortcuts

13. In Keyboard Shortcuts choose Services in the left box.

14. In the right, scroll down to "General" and you should see "Eject" listed.

15. Make sure the box beside "Eject" is marked and double click on the right side just to the left of the scroll bar.

16. This should bring up a textbox, in this box type "Command+Control+Option+Shift+E"

17. After you do that it should close the box and you will then see the key combination listed beside "Eject"

18. Close System Preferences and the Eject key should now eject your external cd/dvd drive.



Note 1: The eject key needs to be held down for a short time, similar to before. It will not work if you just press it like any other key.

Note 2: There is a slight delay for the service to run, I am not sure if adding "drutil list" before "drutil eject" would fix this or not.

Note 3: KeyRemap4Macbook takes a little bit to startup on my MBP, your experience may differ.

Note 4: "Eject to Command+Control+Option+Shift+E" must be selected in KeyRemap4Macbook before you apply the shortcut in Keyboard Shortcuts, if you disable it in KeyRemap4Macbook and renable it you may need to redo the shortcut also.

Thanks to subsonix for helping me with the Shell Script.
__________________
15" 2010 MBP, 2.66 GHz i7, 8GB Ram, 120GB OWC SSD, 500GB Momentus XT, Windows 7-32 and Snow Leopard

Last edited by tjb1; Jul 21, 2011 at 09:43 PM.
tjb1 is offline   3 Reply With Quote
Old Jul 14, 2011, 09:40 AM   #2
acdold
macrumors newbie
 
Join Date: Jul 2011
How to undo

Thanks for your efforts. I tried your fix, but unfortunately it's now ejecting both my internal and external drives simultaneously. Any ideas on how to fix this?

Alex
acdold is offline   0 Reply With Quote
Old Jul 14, 2011, 09:00 PM   #3
tjb1
Thread Starter
macrumors 68000
 
Join Date: Aug 2010
Location: Pennsylvania, USA
Quote:
Originally Posted by acdold View Post
Thanks for your efforts. I tried your fix, but unfortunately it's now ejecting both my internal and external drives simultaneously. Any ideas on how to fix this?

Alex

Did you do the script right? drutil??

I used drutil because it should only work cd/dvd drives. Diskutil may work but you would have to call the specific drive number and that changes based on my experience with using it and it wouldnt be consistent...

Here is the terminal listing for drutil -

NAME
drutil -- interact with CD/DVD burners

SYNOPSIS
drutil verb [options]

DESCRIPTION
drutil uses the DiscRecording framework to interact with attached burning
devices. Common verbs include burn, erase, eject, help, info, list,
status, and tray.

The rest of the verbs are: bulkerase, cdtext, discinfo, dumpiso, dumpudf,
filename, getconfig, poll, size, subchannel, trackinfo, and version.
__________________
15" 2010 MBP, 2.66 GHz i7, 8GB Ram, 120GB OWC SSD, 500GB Momentus XT, Windows 7-32 and Snow Leopard
tjb1 is offline   0 Reply With Quote
Old Jul 21, 2011, 09:44 PM   #4
tjb1
Thread Starter
macrumors 68000
 
Join Date: Aug 2010
Location: Pennsylvania, USA
KR4M works with Lion, ttt.
__________________
15" 2010 MBP, 2.66 GHz i7, 8GB Ram, 120GB OWC SSD, 500GB Momentus XT, Windows 7-32 and Snow Leopard
tjb1 is offline   0 Reply With Quote
Old Aug 26, 2011, 06:32 AM   #5
pryfster
macrumors newbie
 
Join Date: Aug 2011
Thanks for the detailed guide. I'll give that a go.
I do find it strange though that in windows 7 (bootcamped) the eject button works just fine for external usb dvd without affecting other connected usb hard drives.
Isn't it funny that Apple saw the need to include support for this in their windows bootcamp drivers but left it out on mac osx side? Especially as they expect a lot of people these days to ditch the internal dvd and replace it with an expensive SSD.
pryfster is offline   0 Reply With Quote
Old Sep 19, 2011, 07:05 PM   #6
robots3humans0
macrumors 6502
 
Join Date: Sep 2009
Location: London, Ontario
Works perfectly. Thanks for the tutorial!
robots3humans0 is offline   0 Reply With Quote
Old Sep 19, 2011, 08:20 PM   #7
boki108
macrumors newbie
 
Join Date: Sep 2011
Works perfectly for me too

Thanks!!!
2009 iMac with broken superdrive and a new External LG Slim DVD drive
boki108 is offline   0 Reply With Quote
Old Oct 22, 2011, 11:58 PM   #8
gtwonder
macrumors newbie
 
Join Date: Oct 2011
Exactly what I needed. Thank you!
gtwonder is offline   0 Reply With Quote
Old Oct 23, 2011, 01:29 AM   #9
creator2456
macrumors 68000
 
creator2456's Avatar
 
Join Date: Jul 2007
Location: Chicago
Thanks for the detailed walkthrough for this. Very easy to follow and does the job perfectly.

Something I found useful to go with this hack/mod - Make DVD Player work with external DVD drives

Working just fine on 10.7.2.
__________________
I have stuff...but I am also lazy.
Buy some of my stuff!!!
creator2456 is offline   0 Reply With Quote
Old Jan 15, 2012, 12:22 AM   #10
terraphantm
macrumors 68020
 
Join Date: Jun 2009
Location: Pennsylvania
Thanks for the guide; works great! Is there any way to get that eject graphic to pop up like it does with a mac with an internal drive? (I've got an old Macbook air and am using a generic external drive with it)

----------

Quote:
Originally Posted by pryfster View Post
Thanks for the detailed guide. I'll give that a go.
I do find it strange though that in windows 7 (bootcamped) the eject button works just fine for external usb dvd without affecting other connected usb hard drives.
Isn't it funny that Apple saw the need to include support for this in their windows bootcamp drivers but left it out on mac osx side? Especially as they expect a lot of people these days to ditch the internal dvd and replace it with an expensive SSD.
I'm pretty sure that Apple simply went out of their way to make sure that OSX only ejects native drives. In their mind it's probably a feature.
terraphantm is offline   0 Reply With Quote
Old Jun 1, 2012, 07:12 AM   #11
player1024
macrumors newbie
 
Join Date: Jan 2012
Thumbs up

fantastic it works flawlessly Thank you!

OS X 10.7.4 (Lion)
player1024 is offline   0 Reply With Quote
Old Jun 1, 2012, 07:52 AM   #12
Ccrew
macrumors 68000
 
Join Date: Feb 2011
Just curious, rather than go through all these convolutions, does Option-Media Eject or Option-F12 not work for the external? Maybe I'm just used to it since I have 2 drives in my Mac Pro... and thinking since it's the second drive you're essentially working with with the optibay out.
Ccrew is offline   0 Reply With Quote
Old Jun 20, 2012, 05:37 PM   #13
m4tic
macrumors member
 
Join Date: Apr 2011
Location: SoCal
This worked for me, I used this command:
Code:
drutil eject -drive external
I installed the optical drive into a mbp lookalike ebay enclosure.
m4tic is offline   0 Reply With Quote
Old Jul 9, 2012, 09:47 PM   #14
greenvomit8
macrumors newbie
 
Join Date: Mar 2012
Smile Perfectly Done - Thank you

Thanks so much for the incredibly detailed and easy to follow instructions tjb1. Worked Flawlessly. All the best!
greenvomit8 is offline   0 Reply With Quote
Old Aug 5, 2012, 02:24 PM   #15
creator2456
macrumors 68000
 
creator2456's Avatar
 
Join Date: Jul 2007
Location: Chicago
Just ran through the instructions again on 10.8. Working great.

Now I just need to get DVD Player to recognize the external drive since the old method is not working properly.
__________________
I have stuff...but I am also lazy.
Buy some of my stuff!!!
creator2456 is offline   0 Reply With Quote
Old Oct 15, 2012, 04:51 PM   #16
edwarda909
macrumors newbie
 
Join Date: Aug 2011
everything went well until i double clicked next to the checked eject, step 15. a textbox came up but it would not receive any thing i tried to type in. please help
edwarda909 is offline   0 Reply With Quote
Old Apr 5, 2013, 08:10 AM   #17
hemmick reef
macrumors member
 
Join Date: Sep 2012
It's a matter of changing the shortcut in Finder from cmdE to Fn eject key... but I don't know how to do that.

Shouldn't this just work without all this fuss?
hemmick reef is offline   0 Reply With Quote
Old May 10, 2013, 06:51 PM   #18
Broadbent
macrumors newbie
 
Join Date: Sep 2012
now DVD player not recognizing drive

I replaced my optical drive with a SSD, then put my Mac Superdrive in external case. I wanted my eject button to work on the drive, so I followed these instructions, and tried using a DVD. Now DVD player now does not recognize my external drive as a valid Drive? It seemed to have worked before I did this.
Any Suggestions? I found a thread on getting DVD player to recognize external drives, but it said it doesn't wrk on 10.8

I was also hoping eventually to plug this drive into an airport extreme and use it through that, would the eject button still work using this method?

Anyone have the answers?

MBP 10.8.3 mid 2012 i7 2.9GHZ 8GB RAM, crucial 240GB SSD in optical Drive. 1TB Seagate SSHD

Last edited by Broadbent; May 12, 2013 at 12:26 PM. Reason: starting new thread
Broadbent is offline   0 Reply With Quote
Old Dec 21, 2013, 02:26 PM   #19
McGiord
macrumors 68040
 
McGiord's Avatar
 
Join Date: Oct 2003
Location: Dark Castle
Worked really nice! Thanks!
McGiord is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Notebooks > MacBook Pro

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Installing OS 10.5 onto new internal drive from external CD/DVD drive musicdad61 MacBook 4 Aug 16, 2011 01:26 PM
Problem: CD/DVD drive automatically ejects disc marcel-v Mac Basics and Help 4 Apr 1, 2010 11:50 PM
External CD/DVD drives txpeg Mac Peripherals 1 Jan 26, 2008 04:31 PM
macbook pro DVD drive emergency eject button? zombieprom MacBook Pro 1 Nov 26, 2007 11:09 AM
Macs and external cd/dvd drives Bobdude161 Mac Peripherals 1 Jun 3, 2006 03:23 PM


All times are GMT -5. The time now is 10:48 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC