Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wrote a python GUI in Tkinter for a time-clock system. The micro machine is wall mounted and the employees only have access to the touchscreen menu I programmed and a barcode swipe. I know how to get the script to start on startup, but how do I prevent them from exiting out or opening other menus? Basically the sole purpose of this console is to run the time-clock GUI.

share|improve this question
up vote 0 down vote accepted

I'd consider replacing the whole frontend with something like nodm. I've already covered the details for this in another answer.

You'd essentially start with Ubuntu Server, layer on a few packages and then create a ~/.xsession script to load your Python application. It's extremely lightweight and users can't mess around with anything else.

If the application crashes or the user finds a way to exit it, nodm will restart and will just load the app back up. Perfect for single-purpose machines.

share|improve this answer

I'll give the same answer I gave on stackoverflow:

You can use wm_overrideredirect, then make the UI full screen. This will remove all window decorations so there's no way to close the window. If that's not enough, as a final step you can do a global grab. With that, you effectively control everything that they can do.

Be very careful about coding global grabs -- make sure you can ssh into that box to kill the process, otherwise you can effectively denial-of-service your box.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.