View Single Post
Old 10-01-2015, 12:30 PM   #10
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by barobach_so View Post
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.

Last edited by tshering; 10-02-2015 at 06:52 AM.
tshering is offline   Reply With Quote