Klaptop is the answer if you're running KDE. Not to sure about Gnome.

Jeremy