Use ACPI to lock your're screen when closing the lid

For further information look at http://web.utk.edu/~rmahurin/inspiron5100/node5.html