I want to use my PI for a ventilation system front end. I want it to boot up into my own simple GUI written in something like TKinter. We have occasional power cuts in the village so it must be able to re-boot and start up on its own.

I have played around with Debian but I can only make the program run within the Debian UI. If I include it in rc.local to start at boot without the GUI running it says it cannot find $display.

A simple PI GUI where I can automatically start my program once the GUI has loaded and I can occupy the whole screen (well most of it) would work.

Any suggestions please?


  • With "Debian UI" you mean LXDE phoronix.net/… ?
    – Mark
    Mar 8, 2017 at 8:03
  • I vote -1 for you question. Please read How to ask a good Question. Please go into more details what are your requirements are. There are almost endless possibilities how to setup a GUI in fullscreen. What programming language do you intend to use? What other requirements do you have? What did you look until now and what did you find usefull?
    – MadMike
    Mar 8, 2017 at 8:47
  • 2
    $display is set as soon as your GUI (the Xserver really) is started. Your desktop environment (I can't go into more detail as you don't specify what you've installed on your Pi) will provide a way to auto-start programs after the X environment is ready. Use that.
    – MadMike
    Mar 8, 2017 at 8:50
  • I am useing raspbian from the NOOBS release, but I can use anything that supports the GUI language I end up with, currently Tkinter/Python3. Mar 8, 2017 at 9:21
  • If I could auto-start the Python program after Raspbian comes up that might be fine. My requirements are simple, a simple self made GUI with Pi I/O activity behind it to control fans etc and display some activity. Mar 8, 2017 at 9:22

2 Answers 2


Any distro should be fine. You should probably avoid using an X server, if you just want a simple UI. You can use SDL to access the framebuffer, from a console program. If you are planning on using Python, PyGame is an option. A search for rasberry pi pygame brought up a number of tutorials for using it, including one from Adafruit.


Some clarifications to my answer. The first paragraph sounds like you want an alternative to TKinter. If I were doing this project I would try to develop it without the overhead and complexity of the X server. In the last paragraph you mention wanting it to be fullscreen. Pygame using something like OcempGUI, shouldn't be much more complex than TKinter. You'd also benefit from having complete control, no accidentally moving the window offscreen, minimizing it on accident or something of that nature.

If you just want to start your existing TKinter Application, I think this question has the solution How to boot into own python script (GUI) only?

  • It sounds to me that the OP already have written a program, since they mention "playing around" with it in Debian. Not sure if switching to SDL is sensible at this point. Mar 8, 2017 at 9:59
  • Hi, as mentioned earlier I have only written a very simple UI in TKinter just to test the process so no problem ditching it. I will look at anything for now. One other point is that I want to use the XPT2046 5 inch touch screen display so at some time I need to make this work with it - later project after I get the basics working I think! Mar 8, 2017 at 10:20

Depending on what you are familiar with, Windows 10 IoT with a UWP app is perfect for this (on a Raspi2/3).

It does require a bit of a learning curve if you arent familiar with C# and XAML but the platform is easy to configure and deploy to, especially for a full screen 'Kiosk Style' application. They have full GPIO support straight out of the box, with loads of great samples.

I'm a big fan of Linux but not so much of Python - Win10IoT is a compiled application running on a secure platform and it's UWP big brother means that you can write code that is much more reusable and scalable.

Start here - https://developer.microsoft.com/en-us/windows/iot

You can get Visual Studio 2017 Community Edition for 'no money' with everything you need to build, test and deploy this project.


  • 1
    As I understand the question, the OP already have written a program using TKinter, and only have trouble to auto-start it after a reboot. Rewriting the whole thing in C# doesn't sound very reasonable to me. Mar 8, 2017 at 9:56
  • 1
    Thanks, I have only written a very simple UI in TKinter just to test the process so no problem ditching it. I am familiar with Visual Studio and I will investigate Win10loT. Thanks for the links. Mar 8, 2017 at 9:59
  • I understand what you are saying Dmitry but as a person who has been sitting on the Linux/Windows fence for quite a few years, it is obvious to me that a lot of other RaspiNoobs are in a similar situation but feel coerced to 'Learn Linux' to get stuff done on a Pi. Most Developers come from a MS background, thats the reality of the situation and @user3707423 has confirmed this to be the case. IoT is the best of both worlds in my opinion and answers his question quite nicely. The rewrite to C# will be time well invested for a newly written application that is only at POC stage.
    – Alan
    Mar 8, 2017 at 10:35
  • On a side point - IoT actually allows you to write in Python too, so most of the code could just be migrated over, if there is more than 'just a little'. link
    – Alan
    Mar 8, 2017 at 10:44
  • I notice lower that you want to use a XPT2046 screen - looks like someone has this (nearly) working on IoT on Pi... hackster.io/dotMorten/windowsiottouch-44af19
    – Alan
    Mar 8, 2017 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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