<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/index.php?action=history&amp;feed=atom&amp;title=Preventing_accidental_DVD_eject</id>
	<title>Preventing accidental DVD eject - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/index.php?action=history&amp;feed=atom&amp;title=Preventing_accidental_DVD_eject"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Preventing_accidental_DVD_eject&amp;action=history"/>
	<updated>2026-04-21T06:34:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Preventing_accidental_DVD_eject&amp;diff=50263&amp;oldid=prev</id>
		<title>Tonko: â†Created page with 'On selected ThinkPads the Optical drive eject button is located on the curved area of the bezel. As an effect, I found it almost impossible to move the ThinkPad without ac...'</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Preventing_accidental_DVD_eject&amp;diff=50263&amp;oldid=prev"/>
		<updated>2011-01-12T07:42:03Z</updated>

		<summary type="html">&lt;p&gt;â†Created page with &amp;#039;On selected ThinkPads the Optical drive eject button is located on the curved area of the bezel. As an effect, I found it almost impossible to move the ThinkPad without ac...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;On selected ThinkPads the Optical drive eject button is located on the curved area of the bezel. As an effect, I found it almost impossible to move the ThinkPad without accidentally touching the button and ejecting the drive.&lt;br /&gt;
&lt;br /&gt;
The good thing is that I have very little use for an Optical drive these days, So my workaround to this issue is to software lock the drive on boot, and have 2 scripts to lock/unlock the drive when needed.&lt;br /&gt;
&lt;br /&gt;
To lock the drive on boot, simply add the following line to {{path|/etc/rc.local}}&lt;br /&gt;
 /usr/bin/eject -i 1 /dev/sr0&lt;br /&gt;
&lt;br /&gt;
Then I created two scripts, /usr/bin/lock and /usr/bin/unlock to quickly lock the drive or unlock+eject when needed.&lt;br /&gt;
&lt;br /&gt;
{{path|/usr/bin/lock}}&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/bin/eject -i 1 /dev/sr0&lt;br /&gt;
&lt;br /&gt;
{{path|/usr/bin/unlock}}&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 /usr/bin/eject -i 0 /dev/sr0&lt;br /&gt;
 /usr/bin/eject /dev/sr0&lt;br /&gt;
&lt;br /&gt;
Lastly, the scripts need to be owned by root, set executable and SUID root so you can run them as a regular user without having to resort to sudo.&lt;br /&gt;
 chown root:root /usr/bin/lock /usr/bin/unlock&lt;br /&gt;
 chmod 6555 /usr/bin/lock /usr/bin/unlock &lt;br /&gt;
&lt;br /&gt;
===Effected ThinkPads===&lt;br /&gt;
* {{T410}}, {{T410i}}, {{T410s}}, {{T510}}, {{T510i}}&lt;br /&gt;
* {{W510}}&lt;br /&gt;
[[Category:Scripts]]&lt;/div&gt;</summary>
		<author><name>Tonko</name></author>
		
	</entry>
</feed>