I am trying to develop a "kiosk mode" application based on the Chromium CEF web browser. I want to prevent the user from leaving the browser. This entails disabling keyboard shortcuts such as (but not limited to) the following:

  • Alt-F4
  • Ctrl-Super-D
  • Ctrl-Alt-Del
  • Super-S

I currently have a script that, prior to starting my app, uses xmodmap to load in a special keymap and mouse pointer configuration. It also uses gsettings to set various keys within the following:

  • org.gnome.settings-daemon.plugins.media-keys
  • org.gnome.desktop.wm.keybindings

Under Ubuntu 14.04, this approach seems to work for most keys, but it is very cumbersome. Furthermore, ot all keys seem to be accounted for under Ubuntu 12.04. I may have to set keys here:

  • /apps/metacity/window_keybindings/close
  • /apps/compiz-1/plugins/core/screen0/options/close_window_key

How can I make this completely work under both Ubuntu 12.04 and 14.04? Is this even the right approach? Is there perhaps an easier way than setting each individual key? I thought using xmodmap would work best, but it appears that the OS intercepts some keystrokes prior to them reaching my app.

  • If I want to quit an app, and it "won't allow me" I kill it at once. And then erase it. It's not app author's (nor is it yours @gonzobrains) place to tell me I can't exit the app when I need to (my computer, my circumstances, my usage scenario - can you know them all?). – LIttle Ancient Forest Kami Nov 17 '15 at 8:15
  • umm. i did say "kiosk mode" application, right? ding google it. – gonzobrains Nov 17 '15 at 14:28
  • 1
    Darn. You did and I missed it. Comment irrelevant then. – LIttle Ancient Forest Kami Nov 17 '15 at 14:55

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.