r/GraphicsProgramming • • Jan 23 '20

Question How do i create a UI without a desktop environment? (Raspbian Linux)

Hi! I want to make a graphical user interface (GUI) that starts when i boot up my Raspberry PI (Would be really nice if all the other splash screens with text and other stuff wouldn't show either). My vision is like a car display system, where i could make my own bootanimation and control everything i see, including animations.

I basicly just want a good way (something that looks professional and gives me full control) of making a UI with lists and tabs i could navigate between with buttons i choose (probalby via the GPIO-pins).

I have experience with web development and some experience of android development. Python, Java, Kotlin, C#, The language doesn't really make that much of a difference as long as i can control the GPIO-pins. Everything I've found is like "Really easy tkinter python programs", which I'm not willing to use, and doesn't give me that much control. The problem is also that everything I've found depends on having a Desktop environment, like raspbian desktop, but as I don't use the desktop and I don't want the extra boot time, I wan't something that works from the raspbian command interface.

Would be nice hearing from you, as I'm new to this subreddit. Thank you in advance!

0 Upvotes

2 comments sorted by

1

u/[deleted] Jan 23 '20

I'm not an expert but I guess that you actually do want to have most of the desktop stuff if you want this project to be at all convenient and still have some sanity left when it's done :)

Specifically display manager and the more "low level linux UI stuff"...

Have you considered using a slim display manager but configuring it to load your UI instead of the desktop? I think you should be able to use something like LightDM and configure it to load any binary instead of the default desktop.

That is, you don't need to load the actual desktop with linux if you don't want to but when you have the graphics subsystems that a linux desktop would use you should be able to choose whatever UI framework you like.

Some examples:

- unity/godot for c#

- kivy for python (Never used myself but I think it is fairly popular for "native" UIs written in python)

- React, d3.js or some other web framework in combination with a display manager and a browser could maybe work too but not sure about GPIO in that case...

Whatever framework you choose I do very much recommend you to use a display manager if you mainly care about making a UI, there's enough crazy going on with low level graphics on linux to make you spend years pulling your hair before you'll even have a button on screen IMO.

Maybe you would get better answers in a subreddit specifically for raspberry pi or linux.

Source: I've made a raspberry boot directly into fullscreen firefox/chrome using LightDM once a long time ago.