Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run a script when either locking or unlocking Windows XP

I have a Windows XP machine and a Linux machine running Ubuntu. I share the keyboard/mouse from the Windows machine via Synergy. What I would like to do is lock/unlock the Linux machine whenever I lock/unlock the Windows machine.

So I'd like to be able to run a script of some description when Windows either locks or unlocks the screen.

like image 735
ljc Avatar asked Nov 06 '08 22:11

ljc


1 Answers

The standard way in Windows is to write a package (a dll) that subscribes to Winlogon notification events.

I don't know of any tool that provides an easy way to hook into those events, but you could make your package launch a script from some specific place if you really need your actions to be inside one.

like image 121
Rômulo Ceccon Avatar answered Oct 13 '22 19:10

Rômulo Ceccon