
The How-To Geek weblog recently made a post on creating desktop and keyboard shortcuts to eject your CD/DVD drive. Wow! this is so coool... I mean, I have been using Linux for a couple of years now. I have been using keyboard and desktop shortcuts to eject (and close) CD/DVD tray in my Ubuntu/Fedora box long back and never once realized that this was a hot blogable topic that could hit the front of lifehacker.
Me dump. Me idiot. Well, since How-To Geek doesn't appear to know about a stuff called "Linux", here goes my How-To on doing the same on Linux... Better late than never.
HowToGeek uses a piece of software from NirSoft to do the above said magic. Linux users might be a bit disappointed here, because they don't have to install another software to do this magic. ;)
Create a Shortcut to Eject the CD/DVD Drive
- Right click anywhere on the desktop and select "Create Launcher..."
- Enter the name as "Eject DVD" and command as "eject /dev/scd0"

- Do you mind if I don't spoon feed you on getting a CD/DVD icon for your shortcut?
Create a Shortcut to Close the CD/DVD Drive
Same as above, except that the command is eject -t /dev/scd0
Assign a Hotkey to the Shortcut
Well, (unlike in Windows) you don't have to create a shortcut to have a Hot Key in Linux.- Hit Alt + F2. In the run dialog enter "gconf-editor" and hit enter.
- Go to "apps" -> "metacity" -> "global_keybindings"
- Double click on e.g. "run_command_1"
- Type in <Control><Alt>c
- Go to "apps" -> "metacity" -> "keybinding_commands"
- Double click on e.g. "command_1"
- Type in "eject /dev/scd0"
This creates a hot key - Control + Alt + c to eject your CD/DVD drive. Similarly create another hot key with run_command_2 = <Control><Alt>v and command_2 = eject -t /dev/scd0 which will eject your CD drive using Control + Alt + v.
Happy Ejecting.
It´s so simple. Thanks. I´ve been looking for this HOWTO for dummies on several ubuntu forums and this one it´s the only one I undestood.
An even more simpler command (if you just have one drive) is:
eject -T
This will automatically open/close your cdrom drive and would require just one hokey :)
-[deXter]
Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post.
Post a Comment