Want to start a Python GUI at boot which requires root access

I’ve got a Python script which is a fullscreen GUI that controls devices connected to the GPIOs. It uses the Adafruit_BBIO library, so it only works properly if it’s run with root access.

The problems/questions I have are:

  • By default, Debian boots into the desktop as the ‘debian’ user. That user does not have root access. Can I auto-start the Python script with root access?
  • I would settle for booting to the desktop as ‘root’ instead. How do I change this?
  • I would even settle for having to click the python script, placed on the desktop, from either the ‘debian’ or ‘root’ accounts (as long as it runs with root access!), but in both cases I get a dialog asking if I want to execute, execute in terminal, display contents, or cancel. Neither “execute” or “execute in terminal” does anything. “Display contents” will open the script in a text editor.

The only method of running it successfully I’ve found is from the terminal. the problem is that this will be a touchscreen setup with no keyboard, and no network access.