This project is a fork of the UCTRONICS display utility for Raspberry Pi, fully refactored and optimized for AlmaLinux 10 / RHEL 9+ environments.
The display utility uses the ST7735 controller via I2C to display system information such as hostname, IP address, CPU load, RAM usage, temperature, and disk usage.
The source code has been heavily modified for stability, clarity, and better integration with server environments.
- The first line of the display now shows:
hostname ipwhen IP display is enabled.HOSTNAME(uppercase) when IP display is disabled.
- Removed the
"IP:"prefix to prevent line wrapping on smaller displays. - Hostname/IP formatting is handled by
get_ip_address_new()inrpiInfo.c.
- Changed disk usage source to read from the filesystem mounted as root
/, using statvfs('/') (instead of hardcoded/dev/sda). - Correctly calculates total and used disk space for any filesystem mounted as root.
- Entire
st7735.crewritten for clean C89 compatibility. - Memory safety improvements: buffer bounds checking,
malloc()/free()handling for IP strings. - Removed redundant variables and fixed potential truncation bugs.
- Clearer separation of drawing functions and data retrieval logic.
- Uses
/dev/i2c-1by default (can be changed in source). - Fully compatible with systemd service environments.
- No Raspberry Pi–specific dependencies — works on any SBC with the ST7735 over I2C.
# Clone your forked repository
git clone https://github.com/YOURUSERNAME/uctronics-display.git
cd uctronics-display
# Build
make clean && make
# Install binary
sudo install -m 0755 display /usr/bin/uctronics-displayuctronics-displayCreate a systemd service file at /etc/systemd/system/uctronics-display.service:
[Unit]
Description=UCTRONICS Display Service
After=multi-user.target
[Service]
ExecStart=/usr/bin/uctronics-display
Restart=always
User=root
[Install]
WantedBy=multi-user.targetEnable and start:
sudo systemctl daemon-reload
sudo systemctl enable --now uctronics-displayExample when IP display is enabled:
ansible 10.0.0.15
=================
CPU: 12%
Example when IP display is disabled:
ANSIBLE
=================
CPU: 12%
hardware/rpiInfo/rpiInfo.c- Updated
get_ip_address_new()to return formatted string:hostname iporHOSTNAME. - Added logic for uppercase hostname only when IP display is disabled.
- Updated
hardware/st7735/st7735.c- Removed
"IP:"prefix entirely. - Now calls
get_ip_address_new()directly for first-line display. - Memory safety fixes and code cleanup.
- Removed
This project remains under the same license as the original UCTRONICS source. Please check LICENSE for details.