I know a bit of python and I own a rPi B+ with a PiTFT. I was wondering If it's possible to create a GUI application that will show a dashboard with some buttons and some charts on the TFT display without using lxde or gnome or whatever, just from terminal. Is it possible with tkinter, Qt etc. or with any other framework ?


without using lxde or gnome or whatever

Gnome and LXDE are both "desktop environments" (DE's); I have a more in-depth explanation of what that means here (this is WRT a question about Lubuntu, but it applies equally to any normative GNU/Linux distribution including those used on the pi). You will need to understand that.

You don't need to use a DE, and you can write GUI software that will run with or without one but it will still require Xorg.

You can write software that will run without Xorg on the framebuffer, but that would not be the normal way to do this kind of thing, since it can't then be used any other way and (more importantly) will be ridiculously labour intensive. I'm sure you can write a normal (Xorg windowing system based) GUI in python in minutes with a few dozen lines of code. To replicate that on the framebuffer, set aside a few weeks and multiply the LOC by several orders of magnitude. To complete a genuinely useful, reasonably complex app this way, get yourself a team and (presuming you are all putting in at least a few dozen hours a week) consider a release date for sometime next spring. I.e. don't. No one else does.

What you most likely want to do is just run bare Xorg with one application, yours. There's already a question about that here -> "X11" and "Xorg" (or just plain "X") all refer to the same thing; X11 is just an older name.

  • can you please show the minimum possible example ? – Radolino Dec 19 '14 at 5:20
  • I'm not really a python user, which is why I said "I'm sure you can...", because I am sure it can be done, just not by me in python. I'm also sure there must be a kazillion tutorials about creating a GUI application on linux using python (the pi is nothing special in that sense). As you've already caught on, there will probably be Qt, Tk, and Gtk+ options. Any of those is fine, Gtk+ is probably the most common, but if your app is the only thing running, that won't make any difference. Some people think Tk is a little fugly ;) – goldilocks Dec 19 '14 at 8:30

You might also want to check out Python OS project - it's a GUI framework running on displays like these, it implements a GUI with attachable applications and provides UI elements.


Pygame will work to create a GUI app that can run on PiTFT (the console) without any X11 running.

There are other frameworks (such as Kivy) that in theory could also work on RPI but most of them have requirements for GL rendering which is not available in hardware for the PiTFT which connects via the GPIO header.

Assuming you already have the PiTFT configured and working via AdaFruit's instructions, add this to the python program to send graphics to the PiTFT framebuffer device:

import os
os.environ["SDL_FBDEV"] = "/dev/fb1"

Sticky Finger's Kali Pi is running a finger friendly menu on top of kali linux. It's using Pygame and can be found here:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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