[ltp] How does a uevent work for dock/undock on thinkpads?

Daniel Castro linux-thinkpad@linux-thinkpad.org
Sun, 8 Feb 2009 12:56:54 +0000


--0016e6d9a13bdfff63046267c923
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hello!

I have a T61(and a T61p) running Ubuntu 8.10 (2.6.27-11-generic) and I have
a advanced mini
dock<http://www.thinkwiki.org/wiki/ThinkPad_Advanced_Mini_Dock>which
works great. The eject button will release usb devices attached and
docking back in just works. It is a 1 second dock/undock experience (with
external monitor) compared with the more than 10 seconds it takes in
Windows.
At work I undock and dock a lot, and there are certain tasks I would like tu
run when I do this. So I would like to run a script when I undock and
another one when I dock.

I asked here a few days ago if the dock/undock was handled by an acpi event
and the answer was *no*, it is handled by a uevent (udev or HAL).

I know nothing about udev or HAL. Is there a simple way to do what I want to
do?
I would appreciate if anyone could give any help or direction.

Thanks!

-- 
________________________

Daniel Castro, M.Sc.
+353 083-318-2058
dancasmo@gmail.com
castromd@tcd.ie
________________________

--0016e6d9a13bdfff63046267c923
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello!<br><br>I have a T61(and a T61p) running Ubuntu 8.10 (2.6.27-11-gener=
ic) and I have a <a href=3D"http://www.thinkwiki.org/wiki/ThinkPad_Advanced=
_Mini_Dock">advanced mini dock</a> which works great. The eject button will=
 release usb devices attached and docking back in just works. It is a 1 sec=
ond dock/undock experience (with external monitor) compared with the more t=
han 10 seconds it takes in Windows.<br>
At work I undock and dock a lot, and there are certain tasks I would like t=
u run when I do this. So I would like to run a script when I undock and ano=
ther one when I dock.<br><br>I asked here a few days ago if the dock/undock=
 was handled by an acpi event and the answer was <b>no</b>, it is handled b=
y a uevent (udev or HAL).<br>
<br>I know nothing about udev or HAL. Is there a simple way to do what I wa=
nt to do?<br>I would appreciate if anyone could give any help or direction.=
<br><br>Thanks!<br clear=3D"all"><br>-- <br>________________________<br><br=
>
Daniel Castro, M.Sc.<br>+353 083-318-2058<br><a href=3D"mailto:dancasmo@gma=
il.com">dancasmo@gmail.com</a><br><a href=3D"mailto:castromd@tcd.ie">castro=
md@tcd.ie</a><br>________________________<br>

--0016e6d9a13bdfff63046267c923--