<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MM on a Raspberry Zero W in 2023]]></title><description><![CDATA[<p dir="auto">Hello everybody,<br />
I just set up my MM software on a Raspberry Pi Zero W. You might ask why such an old device in 2023… well there are several reasons for that:<br />
1st I just had some laying around from past projects and 2nd ( and most important ) the low power draw of the Zero W was just perfect to power it off a USB connection on my monitor, so I did not have to fiddle around with buck converters to power the pi.</p>
<p dir="auto">I ran into several problems while installing it, and I just want to share the solutions I found for them.</p>
<p dir="auto"><strong>¿RaspberryOS light or full?</strong><br />
Well, the easiest way is to opt for a full flegded OS, but since the Zero W has so limited capability, I opted for a Light install. So I had to adapt my installation mixing several ( outdated ) installation tutorials I found. In the end, I installed Xorg and openbox manually and start them from my <code>.profile</code> with autologin. After that, I start the browser from whithin my <code>/etc/xdg/openbox/autostart</code></p>
<p dir="auto"><strong>Which lightweight browser can I use on the Zero W?</strong><br />
The quick and easy answer is none. Chromium is not supported anymore on the Zero W ( legacy build is an option though, but segfaults frequently due to the limited amount of ram ); Midory works ok, but I was not able to remove the direction bar from the top, so that did not work either. So in the end, I opted to write a simple “browser” myself with Python Webkit2 bindings. I had to install de following software:<br />
<code>sudo apt-get install gir1.2-webkit2-4.0 libgtk-3-dev libwebkit2gtk-4.0-dev python3-gi</code></p>
<p dir="auto">After that, the following file did the trick:</p>
<pre><code>import gi
gi.require_version("Gtk", "3.0")
gi.require_version("WebKit2", "4.0")
from gi.repository import Gtk, WebKit2

class Minibrowser(Gtk.Window):
    def __init__(self):
        Gtk.Window.__init__(self, title="MagicMirror²")
       # The size doesn't actually matter since on the bottom we are going to maximize the window
        self.set_default_size(800, 600)

        web_view = WebKit2.WebView()
        web_view.load_uri("http://localhost:8080")

        scrolled_window = Gtk.ScrolledWindow()
        scrolled_window.add(web_view)
        self.add(scrolled_window)
        self.fullscreen()

if __name__ == "__main__":
    win = Minibrowser()
    win.connect("destroy", Gtk.main_quit)
    win.show_all()
    Gtk.main()
</code></pre>
<p dir="auto">¡The boot process is ugly!<br />
Yes it is and I installed plymouth to make it more attractive. In the end it doen’t actually matter and it even delays de boot for a few seconds, but I like it!<br />
I installed the plymouth spinfinity theme and made it all black. After that I added <code>splash quiet</code> to the <code>/boot/cmdline.txt</code> file and that was it.</p>
<p dir="auto">I hope that this helps a few fellow tinkerers who wish to repurpose their old Zeros.</p>
<p dir="auto">Best regards<br />
Merlin</p>
]]></description><link>https://forum.magicmirror.builders/topic/18200/mm-on-a-raspberry-zero-w-in-2023</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 14:14:45 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/18200.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 26 Nov 2023 11:13:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MM on a Raspberry Zero W in 2023 on Sun, 26 Nov 2023 20:04:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/merlinelmago" aria-label="Profile: MerlinElMago">@<bdi>MerlinElMago</bdi></a> as I said, those parms to Midori work properly for me</p>
]]></description><link>https://forum.magicmirror.builders/post/112871</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/112871</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 26 Nov 2023 20:04:56 GMT</pubDate></item><item><title><![CDATA[Reply to MM on a Raspberry Zero W in 2023 on Sun, 26 Nov 2023 19:40:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> Thanks for the tip. Will try it, but I’m reasonably happy with my minibrowser because it is not as resource hungry as ff or chromium.</p>
<p dir="auto">Looking at your script I see you pass <code>-e Fullscreen -e Navigationbar</code> to the Midori browser, but with those arguments, the address bar would still appear…</p>
<p dir="auto">Best regards<br />
Merlin</p>
]]></description><link>https://forum.magicmirror.builders/post/112870</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/112870</guid><dc:creator><![CDATA[MerlinElMago]]></dc:creator><pubDate>Sun, 26 Nov 2023 19:40:55 GMT</pubDate></item><item><title><![CDATA[Reply to MM on a Raspberry Zero W in 2023 on Sun, 26 Nov 2023 12:58:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/merlinelmago" aria-label="Profile: MerlinElMago">@<bdi>MerlinElMago</bdi></a> if you use my install script, it will setup pi0w to run successfully w chromium, Firefox or Midori.</p>
<p dir="auto">you do have to increase the swap space</p>
<p dir="auto">see<br />
<a href="https://github.com/sdetweil/MagicMirror_scripts" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/sdetweil/MagicMirror_scripts</a></p>
]]></description><link>https://forum.magicmirror.builders/post/112864</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/112864</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 26 Nov 2023 12:58:49 GMT</pubDate></item></channel></rss>