Quote:
Originally Posted by barobach_so
hi
tshering you said this patch can run on its own and not as a part of KSM
can u tell how to run it that way ?
|
I meant to say that it is possible if you know how to do it and that I do not support it.
I do not recommend to do this, but if you insist:
- You need the executable kbbouncer (from the KSM package; you will find the executable in kbmenu\kbbouncer\)
- You need also the Qt libraries provided in this package.
- Look at kbmenu\kbbouncer\kbbouncer.sh which variables you have to set and export, in order to run kbbouncer (note that you also have to point to a directory containing a usable font)
- call kbbouncer with the valid password as first argument
- If you enter the correct password, kbbouncer will print "ok". If you enter a wrong password, it will print "false".
Example (script fragment):
Code:
# ... set here variables and so on
# ...
answer=$(PATHTOEXECUTABLE/kbbouncer MYPASSWORD -qws)
if [ "$answer" == "failed" ]; then
/bin/busybox poweroff
fi
Depending at which point you start the script, you might have to deal with screen rotation.
Note: Use only a-z, A-Z, 0-9 as part of the password!
Edit: You may also have a look at checkpw.sh in the spoiler of post #8.