LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 12-26-2006, 05:49 PM   #1
CrownAmbassador
Member
 
Registered: Mar 2005
Location: Cape Town, South Africa
Distribution: Ubuntu 8.10
Posts: 374

Rep: Reputation: 30
Unmount and Eject with CD-Rom Eject Button?


Is it possible to unmount and eject a cd in Linux simply by pressing the eject button on the drive?
 
Old 12-26-2006, 06:21 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697

Rep: Reputation: 61
Not sure if it can be done. It does not produce a keycode so that is not possible that way. Only thought is a script that you can place on the desktop and checks to see if mounted. If it is then it unmounts and runs the eject command to finish.

Brian
 
Old 12-26-2006, 06:26 PM   #3
freelancer42
LQ Newbie
 
Registered: Sep 2006
Posts: 17

Rep: Reputation: 0
Yep, as far as I know the operating system is not aware of when the eject button is pressed, it's just aware of whether (sp?) or not the tray is out.
 
Old 12-26-2006, 08:45 PM   #4
CrownAmbassador
Member
 
Registered: Mar 2005
Location: Cape Town, South Africa
Distribution: Ubuntu 8.10
Posts: 374

Original Poster
Rep: Reputation: 30
Okay. Now the other problem I have is that I can't always right click on my CD-Rom and click eject. It gives me a failed message. Then, when I go to the command line and su as root and then run eject /dev/hda it only ejects sometimes. Other times it tells me the device is busy and I then have to use fuser to find what process is using it and then kill it before I can use eject again. So my question is basically this: Why does processes still access the drive, how can I prevent this from happening and why can I sometimes eject from root without any problems but not when i right click on the drive?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling CD-ROM drive eject button Nobber Linux - Hardware 16 06-05-2009 09:45 AM
Eject/unmount problem in FC6? staham Fedora 6 10-30-2006 02:21 PM
VCD does not eject even eject button pressed ic_torres Linux - Software 4 12-01-2005 05:40 PM
switch unmount for eject in gnome? tallest Linux - Software 2 02-08-2005 10:19 PM
eject cd-rom drive using (gasp) the button on the front pcweirdo Linux - Hardware 3 12-26-2004 07:28 PM


All times are GMT -5. The time now is 11:59 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration