I would start with the official Raspbian-Lite since it is already pretty much as stripped down as one could need, and works out of the box with the hardware.
By Default You Get a fully functional, light weight linux for free (time, money, freedom)
- Kernel
- Coreutils (Shell and basic shell tools)
- Networking Tools (wlan and ssh)
- System Frameworks like
python
ruby
perl
"A bare-bones linux install with networking, but no UI except a single window application? Things like wireless could be handled via config files, etc. What's the best way to approach this?"
Check! (Note, config is already done via files, the GUI tools are just interfaces to edit config files and periodically read status files to track dynamic information)
Only thing that you Don't get is a GUI of any sort. More on that below.
GUI Options
When you write a GUI application, there are common elements that you usually need to have. E.G.
- Button (Events and Mouse Handling)
- Window/Subwindow (Overlapping Buffers)
- Tool Bar (Context Dependent Visibility)
- Text Box (
- Image
When choosing a framework, a trade-off exists between functionality that is done for you and functionality you must reinvent.
Note: Calculating the pixels to draw for a button is simple, but to create a system that can detect and respond to all kinds of arbitrary input (click, double click, drag, swipe, scroll, etc.) is actually very very hard (read: tedious and error prone).
What follows is a brief description of a few options for bare-bones displays.
1. Framebuffer
The Raw Graphical Output on your screen actually is itself a file. This file is there even if X
is not installed.
/dev/fb0
An description of what this thing is can be found in the kernel documentation.
However, for us it is suffice to imagine this as a "bitmap" of your screen. With many caveats, because the formatting of the data is platform dependent.
Your application (written in c
, python
, java
, whatever). Would open this file, and write (Platform Dependent!) bytes to it to display and modify an image on the display. It would also need to grab raw input from mouse and keyboard and interpret that as button clicks, and distribute events (calls) to appropriate functions.
For example
cat /dev/urandom >/dev/fb0
Will make colorful pixels randomly populate your screen
2. X Windowing System (X11 aka Xorg)
The most infamous user of framebuffer. In a nut-shell This provides
- Windows (Possibly Overlapping Independent Regions)
- Input (Mouse and Keyboard)
- Events
Most people will use a higher level GUI library like GTK
Qt
or wxWidgets
to create usable objects like buttons and toolbars using the basic features provided by X
. These libraries also greatly simplify creating "event handlers" for things like buttons and key presses.
You can also directly draw graphics using OpenGL
You do not need to have a full featured GUI Desktop Running or even Installed to use X to run a graphical application
Your application (Again, python
, c++
, whatever) would use the GUI Tools together with Xlib
(API for Xorg) to draw widgets, windows, etc. on the screen.
NOTE: When running a Full-Screen Application with a desktop environment, there are pretty much no other GUI tools running in the background anyway, mimicking this use.
3. Text Based User Interface (nCURSES!)
Text Based User Interfaces are a simple alternative to all of the above, and may be a cool and elegant solution to your "Information Appliance" concept.
This application uses the terminal shell directly to create visual displays with ASCII characters. The library ncurses
is supported in many languages and provides GUI-like concepts of windows, buffers, buttons, tabs, input, etc. in a console environment
You can actually create a very simple Menu-Based Interface using just a shell script with the built-in linux utility
dialog
which creates the type of interface shown in the top left of the following image.
