1

I hope this is not a too generic question for this forum.

I would like to create a simple GUI with just three or four clickable selections without the typical GUI open/close/resize options.

I am an inexperienced programmer and as a hobby I created a data logger for temperature, humidity, etc. It runs on well Raspberry Pi under Linux/Raspbian and a Python code. I can send data over the network and visualize it over a web-interface.

However, I would like to create a local display at the data collection point that would work off-line. I would like the user to be able to select among three or four display visualizations.

I investigated a bit using tkinter, but I would not like the user to be able to close windows nor resize them, etc (typical GUI operations). I am looking for a similar look and feel of a typical embedded software in car GPS devices. Any windows-type environment would clutter my 4” screen. It seems that we have either full-blown GUIs like tkinter or PyGTK or a local web display. Both of these solutions run on top of the Windows X, which seems to be an overkill and does not limit the user ability to interact with the system.

I could not find any solution. For example this Instructable: http://www.instructables.com/id/Raspberry-Pi-Wall-Display-Without-X-Windows/ is really just a slide-show system.

Can anyone recommend a solution for this? Thanks!

3 Answers 3

3

Typically when you launch an X server, it runs a window manager or desktop environment for you (eg Gnome, Unity, KDE). This is the component that handles resizing of other programs and drawing window decorations. The individual apps usually just draw the contents of the window.

You can start an X server without a window manager, by specifying which program you would like to run as an argument to startx. For example, from https://raspberrypi.stackexchange.com/questions/11866/how-can-i-start-x11-only-for-a-single-application

startx chromium --kiosk --

This launches chromium in kiosk mode. You could substitute (for example) a tkinter program in it's place, although you may have to detect the screen size and resize and position your application appropriately.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks a lot, Peter, This is what I was looking for ! I will also investigate Micah's suggestion above, but this solution could give me the professional looks with the tightness I searching for. I appreciate your preamble on X server as well !
@O'Mac No worries, good luck. If you feel this answered your question, could you mark it as the accepted answer (click the tick under the vote up/down arrows).
2

There are a couple of “TUI” options available (T being for Text instead of Graphical) that don’t need X. You’ll get buttons and other widgets that may suffice for your needs. Look into Dialog and Whiptail. Here is a nice Whiptail video demo.

1 Comment

Thanks Micah. This is an interesting solution. Dialog seems to be capable of a more modern look. I will investigate it further!
1

Take a look at LVGL. It's open source, easy to port, and can use /dev/fb directly without any window manager.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.