Thursday, May 2, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 1041  / 2 Years ago, sat, august 6, 2022, 1:28:59

I need to be able to render my own GUI to the screen, but I'm not really sure how to do this considering I'm in a CLI environment. I don't want to install Ubuntu-desktop or anything, I don't need an entire desktop, just the ability to render directly to the screen.



I've read a bit about X. I assume I need to make something that implements it. Are there references that explain this? I'm assuming a low level language (e.g. C) will be necessary, but obviously I'd feel more comfortable if it was a higher level language required (e.g. Python).



Please let me know, I can't seem to find anything on Google. I don't think I'm searching for the right thing, perhaps I just need refined search terms.



What I'm developing is an application that I want to install on a single board computer. The computer would only be used for the purpose of this application, so I don't want to waste resources loading ubuntu-desktop or gnome just so that I can render my application. I really just don't want the extra overhead. Let me know if that changes anything.


More From » command-line

 Answers
2

If you want to do full-screen applications with no windows involved and use Python over C, you have several options:



Game engines: For example the SDL library. Python bindings exist here.
SDL applications run on top of X, wayland, framebuffer, SVGALib and much more. It will give you full-screen graphics and for a SOC you will only need a frame-buffer-device, e.g. when you see the Linux mascot during boot, you are already there. However, if you have some advanced GUI like a modern car cockpit in mind, it might involve OpenGL for anti-aliasing. For an ATM (automatic teller machine) like GUI it will miss the standard buttons and boxes which you would have to implement yourself. Many SDL games in the ubuntu repositiories can be recompiled to run under a framebuffer.



Linux installers: The debian-installer uses the gtk+ toolkit on top of a framebuffer device, no X involved. You will have all Gtk+ widgets at your command, and good text rendering with pango, modern graphics with anti-aliasing with cairo. Python bindings exist. The OpenSuse distribution has a similar installer on top of QT.



Text mode graphics (TUI): If you have only text output with a few buttons to render, consider using the ncurses library. It will allow you a textual user interface with a high-level API. midnight-commander is a good example. Python bindings exist.



Commercial biddings: If this is a professional project, employing other commercial toolkits and realtime operating systems is an option. See also this and similar tagged questions, even without linux at Stack Overflow.



Helpful search keywords




  • microcontroller gui library

  • immediate mode graphics

  • DirectFB

  • RTOS graphics

  • RTOS gui toolkit

  • custom linux gui


[#32446] Sunday, August 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eanda

Total Points: 439
Total Questions: 116
Total Answers: 105

Location: Armenia
Member since Sat, Dec 31, 2022
1 Year ago
eanda questions
Tue, Nov 22, 22, 15:24, 1 Year ago
Sat, Oct 16, 21, 23:48, 3 Years ago
Sun, Jul 3, 22, 09:38, 2 Years ago
Thu, Feb 3, 22, 14:33, 2 Years ago
;