
eject cdrom
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
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
-------------------------------------
15 years ago
1.0 initial release
15 years ago
1.0 initial release
AlexeyK
15 years ago
Name[ru]=Извлечь привод CD-ROM
Comment[ru]=Принудительное извлечение привода CDROM или CDRW
Report
DIHLOFOS
15 years ago
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
Report
BorgQueen
15 years ago
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
Report
jeffers1957
15 years ago
I'm no Linux guru but no doubt with a bit of fiddling about the two could be combined.
Report
BorgQueen
15 years ago
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
Report
dancelis
15 years ago
Report
BorgQueen
15 years ago
There's so much I need to learn.
What a wonderful (open source) world!
(It must be killing M$)
The Borg Queen
Report
BorgQueen
15 years ago
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
Report
trancelis
15 years ago
Report
maarizwan
15 years ago
Report
trancelis
15 years ago
Report