eject cdrom

Utilities

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

1
Become a Fan
5.0

Available as/for:
Description:
Eject Cdrom, forcefully ejects your cdrom/cdwriter device.

It is especially useful when you are in a hurry, and don't know which application is using the cdrom device. Instead of pressing the Reset Button use Eject Cdrom

Eject Cdrom, will try the "normal" eject first, if it fails then it will forcefully eject the cdrom.

Make sure that you have your cdrom device linked to /dev/cdrom, check with:

ls -l /dev/cdrom

if you get
/dev/cdrom -> /dev/hdd (or something) then it is ok

else create a symbolic link:
ln -sf /dev/hdd /dev/cdrom (or)
ln -sf /dev/hdc /dev/cdrom

How to Install:
just save the eject.desktop file on your desktop or add to your menu. just click it to eject your cdrom (normally else forcefully)!

Requirements:
cdrecord (for forced ejection) and/or eject (for normal ejection of cdrom)


Load/Unload or insert/eject cdrom script:
-----------------------------------
# cdrom load/unload script
if [ -e ~/.cdmounted ];
then
echo loaded or cdmounted trying to eject &&
eject && echo trying to eject normally &&
rm ~/.cdmounted && exit ||
echo normal ejection failed, trying forced eject &&
cdrecord -eject dev=/dev/cdrom &&
rm ~/.cdmounted && exit ;
else cdrecord -load dev=/dev/cdrom &&
touch ~/.cdmounted;
fi
-------------------------------------
Last changelog:

1.0 initial release


Ratings & Comments

11 Comments

AlexeyK

GenericName[ru]=Принудительное извлечение привода CDROM или CDRW Name[ru]=Извлечь привод CD-ROM Comment[ru]=Принудительное извлечение привода CDROM или CDRW

DIHLOFOS

Sometimes you need to get some “real” work done. This would be useful: - spin/stop a hard disk, fans - use/not use RAM - blink LEDs - don't crash within next 10 minutes - actually work

BorgQueen

Hey I was wondering if you can make a close drive menu? You know, hit the .desktop and the cdrom closes etc. I'm going to try and see if I can do it myself but I'm still new to Gnu Linux. Thanks again, The Borg Queen

dancelis

try eject -t

BorgQueen

Hey Thanks! There's so much I need to learn. What a wonderful (open source) world! (It must be killing M$) The Borg Queen

jeffers1957

eject -t closes the CD tray so it is not hard to add this to the script in eject.desktop and renaming it close.desktop and save to desktop then you have 2 icons one for opening and one for closing. I'm no Linux guru but no doubt with a bit of fiddling about the two could be combined.

BorgQueen

Yes, I already did it. I took dancelis' instructs to use eject -t and added the needed /dev/xxx to control a given device. I've adapted your eject.desktop to do the following, load and now mount. So I have 3 .desktops per device. I can also use it to eject my zip drives. Very cool. The only thing it doesn't do, which I'm assuming there's a way to do this, is unmount the drive once I use the mount.desktop. There must be a way to force unmount. The system refuses to unmount a cdrom if konq is opened to the given media. Which is silly I think. Thanks to you both, The Borg Queen

BorgQueen

I love it! I'm adapting it to eject all my ejectable removable media. Both cdroms, zip drives, anything with an eject capability. It really helps since my computer isn't within arm's reach. I just eject via my little taskbar menu and stretch over to the ejected media. Saves me a great deal of time and hassle. Its KDE's nifty little things that make it such a great DTE to use. One actually gets work done, rather than dealing with nonesense. And its little things like "eject cdrom", that make it more so. Well done you! Don't let anyone tell you, your contribution is a waste of time. Thank you, The Borg Queen

trancelis

When I wanna eject the cd/dvd, I just press the eject button on the rom, letting HAL handle the rest of the stuff... that's the button's purpose, innit ?? I don't get what's this thingy for...

maarizwan

not all GNU/Linux has HAL+DBUS+kernel 2.6, hence, one is stuck with cdrom. BTW, I know supermount very well. But because of the stubborn people who don't want supermount into kernel, this thing could help *normal* users to eject their cdrom, when in trouble. Sometimes, when we insert a *bad* cd, then the cdrom continuously try to seek the sectors (lights just blink continuously) neither we can eject the cd nor we could access it. Then this small "eject cdrom" works wonder. try a very crappy cdrom mouting and eject it...

trancelis

Aah ... okay then :) I'm that kind of person who instead of trying workarounds (like this one, a good one as I see) employs whichever means necessary to make it work the right way :D

Pling
0 Affiliates
Details
license
version 1.1
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

More Utilities from maarizwan:

Alltray - Docks all apps into tray
maarizwan
last update date: 20 years ago

Score 5.0

Other Utilities:

Gis Weather
RingOV
last update date: 8 years ago

Score 8.0

Splash Screen Manager
zorinos
last update date: 14 years ago

Score 7.4

BashStyle-NG
Chrispy
last update date: 9 years ago

Score 6.1

anymeal
wedesoft
last update date: 6 months ago

Score 5.0

MonA3XN 01
A3XN
last update date: 2 years ago

Score 5.0

SuperCalc (By Keshav bhatt)
keshavnrj
last update date: 10 years ago

Score 5.0



System Tags