Thread: Locking down the computer

  1. #1
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459

    Locking down the computer

    G'day,

    Anyway I'm writing a kiosk sort of thing to run on Windows. But I'm having a few problems and research hasn't turned up much. I'm using Java and C where required.

    Basically is there a way for my program to lock the screen? and prevent from being unlocked unless X happens? Where X might be putting coins into the computer for example. And I mean it can't be used until it's unlocked.

    Which brings me to my second question, what's the best way to prevent the user from killing my process? That is a JVM process... or C program if need be.

    Perhaps it has something to do with group policies?

    Thanks!
    Zac

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    A hardware disconnect for the keyboard and mouse woudl be the best solution to adding coin-op. As for creating an unkillable process, write it as a system service and dont let the users log in as an admin. Of course you wont be using java for a system service, it will have to be C/C++. There are programmatic ways of doing the coin-op, but you wil lneed external hardware anyway, so best to just inegrate it directly into the system. All it takes is blockig the signals form teh keyboard and mouse electronically when the coin-o is timed out. I can design you such a system if you want, Ill send contact details by PM if you are interested call me.

  3. #3
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    IDK about windows, but if you can use Linux instead it should be easy. I did a similar thing with POS software I wrote in java + swing. Basically You just load the program when X loads, but before any WM. You end up with a program running and no way (that I can tell atm) to get out until the prog ends. If it sounds of any use to you I can find out what the bash file was called.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    But in Linux you can switch to another console with CTRL-ALT-Fn where n is the console number - or have you removed that functionality somehow?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Oh yeah, I think there was some flag you have to set or something to stop switching from X. I have all the steps written down in a python script somewhere but its not on this machine.

    Edit: yeah, it was DontVTSwitch:
    http://www.x.org/archive/X11R6.8.0/d...f.5.html#sect4
    Last edited by mike_g; 02-27-2009 at 07:15 AM.

  6. #6
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Great, but this is for Windows mainly.

    abachler thanks for the offer, but I also need the keyboard to work when there aren't coins. For example, users might have cards with username/passwords that they can use instead.

    My basic idea is to write the coin validator interface in C as a system service, that locks the keyboard when there is no credit and spawns the interface in Java when there is. And they talk to each other over TCP/IP this is the most portable solution as the Java interface is modular and may also connect with other sorts of things other than a coin validator.

    But I still have the problem of allowing users to log-in without closing the interface? They need the keyboard but the coin validator will have disabled that because there is no credit.

    Any ideas?

  7. #7
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    Are you using this?
    Code:
    SetWindowsHookEx(WH_KEYBOARD_LL)
    Just GET it OFF out my mind!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 34
    Last Post: 02-26-2006, 01:16 PM
  2. Major Computer Problem
    By Olidivera in forum Tech Board
    Replies: 10
    Last Post: 07-15-2005, 11:15 AM
  3. Tabbed Windows with MDI?
    By willc0de4food in forum Windows Programming
    Replies: 25
    Last Post: 05-19-2005, 10:58 PM
  4. Computer will not boot.
    By RealityFusion in forum Tech Board
    Replies: 25
    Last Post: 09-10-2004, 04:05 PM
  5. This is my last night on this computer.
    By joshdick in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 07-12-2003, 01:33 AM