Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8597

Raspberry Pi OS • Re: Trixi RAM Memory Usage Graph Widget

$
0
0
ChatGPT offers this setup guide:

Dependencies & Setup Guide for memgraph-widget.py

Tested on: Raspberry Pi OS Trixie (64-bit) with Wayland or X11.

1️⃣ Install system dependencies

Code:

sudo apt updatesudo apt install -y python3-full python3-venv python3-psutil libxcb-cursor0

python3-full provides headers, pip, and venv;
libxcb-cursor0 prevents the Qt “xcb plugin” error.

2️⃣ Create and activate a Python virtual environment

Code:

python3 -m venv ~/memgraph-venvsource ~/memgraph-venv/bin/activate
3️⃣ Install required Python packages inside the venv

Code:

pip install PySide6 psutil

This downloads Qt for Python (Pyside 6.x) and the system-statistics library psutil.

4️⃣ Save the script and make it executable

Code:

nano ~/memgraph-widget.py    # paste Larry’s codechmod +x ~/memgraph-widget.py
5️⃣ Run it (as normal user, not root)

Code:

~/memgraph-widget.py &

Right-click the window to close it.

6️⃣ (Optional) Add to Autostart

Code:

mkdir -p ~/.config/autostartcat > ~/.config/autostart/memgraph-widget.desktop <<'EOF'[Desktop Entry]Type=ApplicationExec=/home/$USER/memgraph-widget.pyHidden=falseNoDisplay=falseX-GNOME-Autostart-enabled=trueName=Memory Graph WidgetComment=Displays live memory usage graphEOF

It will appear automatically each time you log in.

🧠 Troubleshooting Notes
SymptomLikely CauseFix
ModuleNotFoundError: No module named 'PySide6'The virtual environment isn’t active.Run

Code:

source ~/memgraph-venv/bin/activate
before launching.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb"Missing libxcb-cursor0.

Code:

sudo apt install libxcb-cursor0
.
Window does not appear when run as rootWayland/X11 security: root has no display.Always run as your normal desktop user.
Script won’t start on bootAutostart file path incorrect or not executable.Verify

Code:

chmod +x ~/memgraph-widget.py
and the .desktop entry.

Statistics: Posted by LDighera — Tue Oct 28, 2025 6:57 pm



Viewing all articles
Browse latest Browse all 8597

Trending Articles