2002-06-11 02:53:49

by Nathan Neulinger

[permalink] [raw]
Subject: Locking CD tray w/o opening device

With a 9 month old, going on 2, in the house, I've been made painfully
aware of the need to have some way to lock the CD-ROM tray. I saw a post
about some patches way back in 1996 to enable user-space control of
this, but haven't seen much in the way of tools to control it.

Is there any straightforward way of disabling the buttons on the CD and
locking all the time? I'm not averse to an ugly hack to 2.4.18+ source
if necessary.

Any suggestions?

-- Nathan

------------------------------------------------------------
Nathan Neulinger EMail: [email protected]
University of Missouri - Rolla Phone: (573) 341-4841
Computing Services Fax: (573) 341-4216


2002-06-11 03:20:33

by Erik Andersen

[permalink] [raw]
Subject: Re: Locking CD tray w/o opening device

On Mon Jun 10, 2002 at 09:53:46PM -0500, Nathan Neulinger wrote:
> With a 9 month old, going on 2, in the house, I've been made painfully
> aware of the need to have some way to lock the CD-ROM tray. I saw a post
> about some patches way back in 1996 to enable user-space control of
> this, but haven't seen much in the way of tools to control it.
>
> Is there any straightforward way of disabling the buttons on the CD and
> locking all the time? I'm not averse to an ugly hack to 2.4.18+ source
> if necessary.
>
> Any suggestions?

Put in a CD and mount it....

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

2002-06-11 03:28:42

by Hank Leininger

[permalink] [raw]
Subject: Re: Locking CD tray w/o opening device

On 2002-06-11, Nathan Neulinger <[email protected]> wrote:

> Is there any straightforward way of disabling the buttons on the CD and
> locking all the time? I'm not averse to an ugly hack to 2.4.18+ source
> if necessary.

I'm not sure exactly what you mean. If there is a CD in the drive and
mounted, the eject button should be software-locked. Do you mean that this
does not happen for you? ...As long as it does, a stupid workaround would
be "leave a CD in the drive mounted all the time".

--
Hank Leininger <[email protected]>

2002-06-11 05:01:23

by Austin Gonyou

[permalink] [raw]
Subject: Re: Locking CD tray w/o opening device

You could echo "1" >/proc/sys/dev/cdrom/lock

If you do this, even when a cd is *not* in the drive it will be locked.
For information like this, it might be best to open xchat, and head to
openprojects.net and join #linuxhelp. This is a good question, just
perhaps not right for the lkml?

:)


On Mon, 2002-06-10 at 22:28, Hank Leininger wrote:
> On 2002-06-11, Nathan Neulinger <[email protected]> wrote:
>
> > Is there any straightforward way of disabling the buttons on the CD and
> > locking all the time? I'm not averse to an ugly hack to 2.4.18+ source
> > if necessary.
>
> I'm not sure exactly what you mean. If there is a CD in the drive and
> mounted, the eject button should be software-locked. Do you mean that this
> does not happen for you? ...As long as it does, a stupid workaround would
> be "leave a CD in the drive mounted all the time".

--
Austin Gonyou <[email protected]>

2002-06-11 10:23:27

by Andreas Roedl

[permalink] [raw]
Subject: Re: Locking CD tray w/o opening device

Hello!

Am Dienstag, 11. Juni 2002 04:53 schrieb Nathan Neulinger:
> With a 9 month old, going on 2, in the house, I've been made painfully
> aware of the need to have some way to lock the CD-ROM tray. I saw a post
> about some patches way back in 1996 to enable user-space control of
> this, but haven't seen much in the way of tools to control it.
>
> Is there any straightforward way of disabling the buttons on the CD and
> locking all the time? I'm not averse to an ugly hack to 2.4.18+ source
> if necessary.

What about the power and reset buttons?


Andi

--
Web: http://www.flood-net.de/
Mail: [email protected]
Phone: +49-(0)-30-680577-44

2002-06-13 20:06:01

by Jim Nelson

[permalink] [raw]
Subject: Re: Locking CD tray w/o opening device

At 12:00 AM 6/11/02 -0500, you wrote:
>You could echo "1" >/proc/sys/dev/cdrom/lock
>
>If you do this, even when a cd is *not* in the drive it will be locked.
>For information like this, it might be best to open xchat, and head to
>openprojects.net and join #linuxhelp. This is a good question, just
>perhaps not right for the lkml?


Um, No. My /proc/sys/dev/cdrom/lock defaults to a 1, and the drive opens
when a disc is not present at the touch of the button.


2002-06-14 05:46:09

by Jens Axboe

[permalink] [raw]
Subject: Re: Locking CD tray w/o opening device

On Thu, Jun 13 2002, Jim Nelson wrote:
> At 12:00 AM 6/11/02 -0500, you wrote:
> >You could echo "1" >/proc/sys/dev/cdrom/lock
> >
> >If you do this, even when a cd is *not* in the drive it will be locked.
> >For information like this, it might be best to open xchat, and head to
> >openprojects.net and join #linuxhelp. This is a good question, just
> >perhaps not right for the lkml?
>
>
> Um, No. My /proc/sys/dev/cdrom/lock defaults to a 1, and the drive opens
> when a disc is not present at the touch of the button.

Yeah, the above explanation of 'lock' is wrong. It merely controls
whether the tray should be locked when someone is using the CD-ROM. If
noone is using it, it will still be unlocked. There _is_ a var that
controls permanent locking, however it isn't exported through proc.
You'll have to use the CDROM_LOCKDOOR ioctl.

--
Jens Axboe