Optical drive eject icon?

Gentlemen, The Optical drive eject button on my laptop is somewhat sensitive, requires several prods in the approx location before ejecting. When I use Windows I create a desktop short cut of the drive and then right click on the shortcut and select the eject button from the drop menu. Is it possible to do the same thing in 12.1?
as always all help is greatly appreciated,
Eddie.

It depends on your desktop; if you have KDE, simply click on the notify icon and you should see the eject icon next to name of the disk.

Haven’t used any cd/dvd disks for a year two now (only got the drive if it’s a laptop), but if memory serves you also get an icon in dolphin on the left-hand side but it only appears if a disc is in the drive I believe

Also if you want this capability as an icon on your desktop and you use kde you can add it by right-clicking the desktop and doing Add Widgets, scroll across until you see Device Notifier in the bar that’s popped up on the bottom of the screen, then double-click the icon, I think the widget gets placed wherever you last left-clicked on the desktop before you right-click to bring the menu up

But I just realised in Device Notifier I think the drive also only appears if you have a disk in there, so both the above aren’t of much use if the drive is empty, so what can ya do?

There is an eject command, something like eject --cdrom /dev/dvdrw should work (the options are cdrom, cdrw, dvdrom & dvdrw but I think cdrom works on all 4 type drives if you only have the one drive)

You could simplify the command further by adding it to a script, create a file something like this:


#/bin/bash
eject --cdrom cdrom
exit 0

Save it in your path, somewhere like /home/youruser/bin/ejectcd would do, then make it executable by typing a command like this in a terminal (like konsole):

chmod +x /home/your/user/bin/ejectcd

You could then create a launcher on the desktop if you so wished, but personally I’d find it more convenient to just hit Alt & F2, type ejectcd then hit Enter, especially on a laptop

As for gnome and other desktops, the eject command works just the same so using a simple script should work just fine there too

On 01/25/2012 10:16 AM, dened wrote:
> I create a desktop short cut of the drive
> and then right click on the shortcut and select the eject button from
> the drop menu.

open a terminal and issue the following command


eject -T

if it is closed it should open, and if open it should close (if your
hardware supports both directions)

if that works on your machine then you can make a very short script and
assign it to an icon of your choice…

hmmmm…i’m not sure if you (as a use) have permissions to open/close,
so if that command doesn’t work, holler…


DD http://tinyurl.com/DD-Caveat http://tinyurl.com/DD-Hardware
http://tinyurl.com/DD-Software
READ all the neat stuff about openSUSE here http://tinyurl.com/SUSEonDW

DenverD mate I tried the script I gave the OP before I posted it and yeah it works as a normal user, it actually complained when I tried as root

On 01/26/2012 05:56 PM, Ecky wrote:
>
> DenverD mate I tried the script I gave the OP before I posted it

i [shame faced] admit i (obviously) did not read all the way to the
bottom of your post! sorry.

> yeah it works as a normal user, it actually complained when I tried as
> root

that is what i expect also…but sometimes folks have (somehow?) damaged
permissions with chown (or other like chmod, policykit, apparmor,
paranoid system file permissions. . .), or have lost being part of the
cdrom group, or any number of other things which show up as “it only
works when i am root!”

so, i give the direction i did, in the way i did so i could learn if it
worked as user, or not–which sometimes gives a hint for the next step…

but, (again) i didn’t see your move to ‘eject’ or i would have saved my
time…


DD http://tinyurl.com/DD-Caveat
have you TODAY checked what they say about us at
http://tinyurl.com/SUSEonDW

If we reach the desired outcome of the user asking gets a way round his problem then it’s all good eh mate :slight_smile: