Tuesday, December 26, 2006

OpenPCD application

Wrote my second OpenPCD application, now my KDE desktop can be locked-unlocked using my OpenPCD board.
Update:
Tarique asked for adding some more lines with this.
For this code again taking help from Harald's librfid-tool.c in the utils directory of the librfid source. The main idea is to show how OpenPCD can be used. First I was looking for a way to keep unlock my laptop as my OpenPCD card is near to the OpenPCD reader & as I(the card) move away from the reader it should get unlocked automatically,, which it turn produced my first application.
Last night found a simple way to do that with dcop.

dcop kdesktop KScreensaverIface lock
dcop kdesktop KScreensaverIface quit

The first line will lock your KDE desktop & the second one will unlock it. Still don't understand makefiles well, tried to avoid any more dependencies in the code thus calling these two commands as need using system().

3 Comments:

At 4:42 AM, Blogger Tarique said...

Hey! good going write longer post for non-C aware people like me :)

 
At 6:36 AM, Anonymous Anonymous said...

the link is wrong... just a typo

 
At 10:13 PM, Blogger Kushal Das said...

Thanks , fixed :)

 

Post a Comment

<< Home