Kushal Das

FOSS and life. Kushal Das talks here.

kushal76uaid62oup5774umh654scnu5dwzh4u2534qxhcbi4wbab3ad.onion

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().