prashkd85
Posts: 3
Joined: Mon Sep 19, 2022 11:33 am

Building a light weight raspbian for Pi Zero with GUI

Sun Sep 24, 2023 6:01 pm

Hello,

I am using Raspberry Pi Zero Wirelss connected to a 5" display and I am planning to use it as a small dashboard. I just flashed Debian Bullseye 32 version and while everything seems to be working (including my simple project), i am noticing the OS is running a bit sluggish. Since in using this Pi zero with nothing but GUI, I am concerned it won't be able to handle my full GUI project.

Therefore, I am considering of using Raspbian Lite and add packages that I will be needing. Since my GUI application is written in python Tkinter, can someone please add list of packages that I will be needing ?

Also, I am sure there's someone out there who's already done this experiment. Does buiding Raspbian lite and adding GUI packages really makes prerformance difference ?

kip_the_elder
Posts: 640
Joined: Mon May 03, 2021 3:49 pm
Location: Third Rock from the Sun

Re: Building a light weight raspbian for Pi Zero with GUI

Mon Sep 25, 2023 10:35 am

You say it's a bit sluggish...What are you comparing it to? What you are seeing maybe normal....The Zero is not a high performance machine...In the world of computing; It's a Moped, not a Panigale..

What are you trying to use it for? Using a GUI will use more resources generally, but different interfaces use different amounts...KDE for example is heavier than XFCE...which is heavier than a simple "DOS style" menu system...Like we used to use when Babbage was a lad. :lol:

Do you know what the bottleneck is? Have you done a free -h to see how much memory you are using?
Always be kind to beginner geeks. They will be the ones programming your ventilator. :)

User avatar
Gavinmc42
Posts: 8000
Joined: Wed Aug 28, 2013 3:31 am

Re: Building a light weight raspbian for Pi Zero with GUI

Mon Sep 25, 2023 11:52 am

Hard to get a small fast Linux with GUI on a Pi Zero these days.
Pain to support as well and uSD card GB Linux OS is hard to keep reliable.
So I use Ultibo ;)

But if you want Linux then PiCore 14 is out now
http://forum.tinycorelinux.net/index.ph ... 307.0.html
Time to revisit a simple GUI for that.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

pidd
Posts: 5165
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Building a light weight raspbian for Pi Zero with GUI

Mon Sep 25, 2023 2:05 pm

Do you need the gui?

Linux has graphics capability without adding all the gui overheads.

prashkd85
Posts: 3
Joined: Mon Sep 19, 2022 11:33 am

Re: Building a light weight raspbian for Pi Zero with GUI

Mon Sep 25, 2023 2:12 pm

pidd wrote:
Mon Sep 25, 2023 2:05 pm
Do you need the gui?

Linux has graphics capability without adding all the gui overheads.
Do you mean C++ GUI framework like QT5 ? Does it come baked in with Raspbian Lite 32 ?

pidd
Posts: 5165
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Building a light weight raspbian for Pi Zero with GUI

Mon Sep 25, 2023 2:55 pm

prashkd85 wrote:
Mon Sep 25, 2023 2:12 pm
pidd wrote:
Mon Sep 25, 2023 2:05 pm
Do you need the gui?

Linux has graphics capability without adding all the gui overheads.
Do you mean C++ GUI framework like QT5 ? Does it come baked in with Raspbian Lite 32 ?
I use freebasic which does it all for me, I can't remember what that uses with linux, maybe OpenGL or gfx? It ends up really fast. Freebasic compiler converts to C then GCC does the business but the graphics are all built in basic commands..

If you are only displaying animations there is ncurses and the like. I generally only use external libraries as a last ditch resort whatever language I'm using.

prashkd85
Posts: 3
Joined: Mon Sep 19, 2022 11:33 am

Re: Building a light weight raspbian for Pi Zero with GUI

Mon Sep 25, 2023 3:04 pm

pidd wrote:
Mon Sep 25, 2023 2:55 pm
prashkd85 wrote:
Mon Sep 25, 2023 2:12 pm
pidd wrote:
Mon Sep 25, 2023 2:05 pm
Do you need the gui?

Linux has graphics capability without adding all the gui overheads.
Do you mean C++ GUI framework like QT5 ? Does it come baked in with Raspbian Lite 32 ?
I use freebasic which does it all for me, I can't remember what that uses with linux, maybe OpenGL or gfx? It ends up really fast. Freebasic compiler converts to C then GCC does the business but the graphics are all built in basic commands..

If you are only displaying animations there is ncurses and the like. I generally only use external libraries as a last ditch resort whatever language I'm using.
This is a really interesting proposition. There's very little information on FreeBASIC available online that a beginners can absorbe quickly but it looks like fit for my application. I will continue exploring this option further. Thanks a lot for this.

pidd
Posts: 5165
Joined: Fri May 29, 2020 8:29 pm
Location: Wirral, UK

Re: Building a light weight raspbian for Pi Zero with GUI

Mon Sep 25, 2023 8:08 pm

prashkd85 wrote:
Mon Sep 25, 2023 3:04 pm
This is a really interesting proposition. There's very little information on FreeBASIC available online that a beginners can absorbe quickly but it looks like fit for my application. I will continue exploring this option further. Thanks a lot for this.
Definitely don't try and learn freebasic then try to use it.

Write your algorithm then plug freebasic into your algorithm. A quick skim through the command lists gives you a good idea of everything available. https://www.freebasic.net/wiki/DocToc

Most languages have the same sort of functionality it is mostly syntax differences, basic is the more natural syntax, it is rare you are wondering which punctuation mark you should be using. Virtually everything that can be done with C can be done in freebasic, certainly for procedural programming, I can't answer for object orientated although I believe freebasic does fully support objects. I'm strictly procedural in all languages I use out of choice.

Ignore anything with the qbasic compatibility mode (which was the origins of freebasic), stick to pure freebasic.

ame
Posts: 8167
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Building a light weight raspbian for Pi Zero with GUI

Mon Sep 25, 2023 8:29 pm

You could write a web-based gui, and have the Pi start a browser which connects to a server running on itself.

I am running Pi-Hole on an original Pi, which is not exactly a speed demon. The gui is astonishingly responsive. Of course that's with the server on the Pi and the browser on something else (phone, laptop, whatever). It might be slower if the Pi is running the browser too.

But... it makes it easy to replicate the display elsewhere, if you need to.
Oh no, not again.

User avatar
Gavinmc42
Posts: 8000
Joined: Wed Aug 28, 2013 3:31 am

Re: Building a light weight raspbian for Pi Zero with GUI

Tue Sep 26, 2023 1:40 am

You could write a web-based gui
Yep, webserver UI can be fast, the rendering is done elsewhere.
I have run the A-Frame VR game engine on a Pi B+ server.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ame
Posts: 8167
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Building a light weight raspbian for Pi Zero with GUI

Tue Sep 26, 2023 1:51 am

Gavinmc42 wrote:
Tue Sep 26, 2023 1:40 am
You could write a web-based gui
Yep, webserver UI can be fast, the rendering is done elsewhere.
Yes, but in this case the rendering will be done on the same Pi. It has its pros and cons I suppose.
Oh no, not again.

User avatar
Gavinmc42
Posts: 8000
Joined: Wed Aug 28, 2013 3:31 am

Re: Building a light weight raspbian for Pi Zero with GUI

Tue Sep 26, 2023 2:57 am

One of the restrictions of PiCore is the limited number of apps/libs etc ported to it.
However it does have TCL, TK.
http://distro.ibiblio.org/tinycorelinux/14.x/armv6/tcz/

The Windowing Manager is flwm which is written in fltk.
https://www.fltk.org/index.php
Never used it to write a GUI, only found out about it yesterday ;)

The OP wants to use a Wifi Pi so webserver UI is possible.
Python 3 has built-in webserver lib/app.

Even a real time Dashboard type display on a Zero using OpenVG is possible.
Done that stuff many times with Ultibo.
https://github.com/Gavinmc42
Just not with WiFi, which is now supported, sort of.

My recent experience with current Raspberry OS Lite on single core Pi's is lots of bloat for a slow X11 OS.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

bls
Posts: 3308
Joined: Mon Oct 22, 2018 11:25 pm
Location: Seattle, WA

Re: Building a light weight raspbian for Pi Zero with GUI

Tue Sep 26, 2023 3:19 am

Definitely use a lightweight window manager like twm, icewm, etc. Not a full desktop environment that provides a lot of features (at a cost!).
Pi tools:
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo

Return to “Beginners”