LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-17-2008, 01:46 AM   #1
kkpal
Member
 
Registered: Oct 2007
Posts: 101

Rep: Reputation: 15
Exclamation How to detect CD/DVD in linux


hi all

How can I detect CD/DVD in my drive? Or How can I detect tray open/close?



Thanks & Regards
KKPal
 
Old 07-17-2008, 01:58 AM   #2
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
well, mount will tell you if theres nothing in the drive when you try it, if there isnt.
 
Old 07-17-2008, 01:59 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Can you please brief a little bit more about what you need to know?
Also it will help if you mention what distro you are using.
 
Old 07-17-2008, 02:16 AM   #4
kkpal
Member
 
Registered: Oct 2007
Posts: 101

Original Poster
Rep: Reputation: 15
Exclamation

Quote:
Originally Posted by resetreset View Post
well, mount will tell you if theres nothing in the drive when you try it, if there isnt.
I did it. But problem is that whenever I try to put CD/DVD in tray it will automatically closed because of it continues try to mount the disk. I used "sleep 20" in script to keep stop the tray but it is not the proper solution.

I want to write a script whenever CD/DVD is inserted in rom in detect the CD/DVD and mount that.

with regards
KKPal

Last edited by kkpal; 07-17-2008 at 02:23 AM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help getting Wine to detect dvd-drive SWnerd525 Linux - Hardware 5 07-05-2007 02:09 AM
How can I detect a blank DVD fudam Linux - General 3 08-15-2006 08:23 PM
How to detect CD/DVD drives on Linux nibl Programming 7 08-15-2006 07:36 PM
DVD decrypter can not detect dvd drive through Wine lnthai2002 Linux - Software 2 01-15-2006 08:36 PM
Can't detect DVD-RW drive dualith Linux - Hardware 5 11-30-2004 04:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:50 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration