mirror of
https://github.com/debloper/xiosk.git
synced 2026-04-26 21:35:51 +03:00
[GH-ISSUE #29] Pi Zero 2 W - Not launching browser on boot #29
Labels
No labels
bug
bug
documentation
enhancement
enhancement
feature request
good first issue
good first issue
help wanted
invalid
priority: high
priority: low
priority: medium
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/xiosk#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @daylemur on GitHub (Jul 31, 2024).
Original GitHub issue: https://github.com/debloper/xiosk/issues/29
I have followed all of the setup steps multiple times, and tried with multiple different installations of RaspOS (32bit, 64bit, Legacy, etc) and none seem to want to launch the browser once the system is running. The install script runs without any issues, and I am able to access the dashboard, update the piosk URLs and apply the changes to the Pi.
@debloper commented on GitHub (Jul 31, 2024):
What happens if you reboot after the installation?
Also (if rebooting didn't work) after the reboot, can you please run these following scripts and post the output?
All of this assumes that you are using PiOS with wayland+wayfire (latest bookworm build with graphical user interface) & ran the script as the same user that the desktop is auto logging-in to.
@MBennin commented on GitHub (Aug 10, 2024):
I am also experiencing issues getting the kiosk to display. The desktop loads up correctly and I can access the webpage at the pi's ip address.
I am using a Raspberry Pi Zero 2W, RaspOS 32bit Full, with this screen.
Output from the above commands:
@debloper commented on GitHub (Aug 10, 2024):
Thanks @MBennin this is super helpful!
This tells us that neither of the the processes (the chrome browser, or the wtype tab switcher) are running (except for the process that you're querying it with, i.e.
grepwhich doesn't count).As the next step, what happens if you open up a terminal (in desktop mode, not over SSH), and run the following:
I don't see why this won't run as it's clearly set up in the wayfire config (unless Wayfire on startup is expected to work differently on Pi Zero 2 W). And I don't see any eyebrow-raisers on the journal either.
This might need a deeper dive (and not just for PiOSK). Anyone stumbling across this issue, please post your anecdotes/experiences/findings, so it helps to piece together the puzzle.
@MBennin commented on GitHub (Aug 12, 2024):
I got the following output from the above command:
I made sure to enable wayland from raspi-config, so I'm not sure why it can't connect to the display.
@debloper commented on GitHub (Aug 12, 2024):
After looking into it for a bit, found out that Wayland is disabled on older SoCs. Seems like an imposed restriction (not a technical limitation).
Can you please try this workaround:
Thanks for the help to get to the bottom of this. I'd update the docs to reflect it.
@rsponar commented on GitHub (Aug 21, 2024):
I have the same issue on my Raspberry Pi zero 2W, adding
wayland=onto/boot/firmware/cmdline.txtdid not fix this, exact same error messages as @MBennin@Timmwardion commented on GitHub (Sep 7, 2024):
I was having the exact same issues as above (w RPi3). I ran ~/piosk/scripts/browser.sh and got the below:
After a bit of investigation I found that Wayland doesn't work on the RPi3 without 'wayland=on' in /boot/firmware/cmdline.txt
So I added that, rebooted, and Bam! Success.
Note: I should highlight that it's REALLY sluggish. Will likely swap the Pi3 out for a Pi4B tomorrow. No such thing as overkill :-)
@male-zvire commented on GitHub (Nov 1, 2024):
I have same issue with Rpi zero 2W... "wayland=on" in cmdline.txt helps, partly. Now, i need to confirm this window before browser starts.

@andiohn commented on GitHub (Nov 29, 2024):
It's in the browser scripts I think. I found this. I'm looking: https://issues.chromium.org/issues/373891800
@andiohn commented on GitHub (Nov 29, 2024):
Apparently --no-memcheck should fix it according to the /usr/bin/chromium-browser script
@andiohn commented on GitHub (Nov 29, 2024):
Didn't work. I added that to the browser.sh script and it still prompted me
@andiohn commented on GitHub (Nov 29, 2024):
Doesn't look like it's using the startup flags because the 'restore' shows too, so I think the usr bin will have to be modified or something.
@f1nch87 commented on GitHub (Dec 7, 2024):
Sound promising for me just baught two raspi zero 2w 😄
@male-zvire commented on GitHub (Dec 7, 2024):
Just delete

this section from chromium launch script
But dont use lot of javascript 😉 Zero 2 isn't strongman...
@arqtv commented on GitHub (Dec 8, 2024):
Remote browser (Chrome on OSX 10.13.6) not opening PIOSK web page on remote PIOSK target. Made all checks noted in this thread and get what I think are correct responses - see below. I have checked to see what ports are open on the remote PIOSK and only see port 22 and not port 80. I can ssh into PIOSK IP but browsing to the same local IP gives me a "This site can't be reached - unexpectedly closed by remote host". Both PIOSK and MAC are on same wifi network.
I have a hdmi monitor, keyboard and mouse connected to the target PIOSK which is a Pi3A+ running fresh and clean 32 bit Bookworm with Wayland/wayfire. Desktop loads but nothing else.
Running /scripts/browser.sh directly on the target spawns an error message
ERROR: wayland_connection.cc(205)] Failed to connect to Wayland display: No such fie or directory.
ERROR: ozone_platform_wayland.cc(264) Failed to initialize Wayland platform
But opening the browser first and then repeating the script command brings up the browser with several tabs that do eventually load. Remote browsing is however still not working. Connection is refused, due to no web server running and port 80 not open.
piosk@piosk:~ /piosk/$ ./scripts/browser.sh
Opening in existing browser session.
Results obtained using ssh to target
piosk@piosk:~ $ cat .config/wayfire.ini
[autostart]
browser = /home/piosk/piosk/scripts/browser.sh
switcher = bash /home/piosk/piosk/scripts/switcher.sh
piosk@piosk:~ $ ps aux | grep chrom
piosk 1595 0.0 0.4 7532 1792 pts/0 S+ 15:24 0:00 grep --color=auto chrom
piosk@piosk:~ $ ps aux | grep piosk
avahi 401 0.0 0.6 6408 2816 ? Ss 14:37 0:00 avahi-daemon: running [piosk.local]
piosk 750 0.0 1.6 16540 7040 ? Ss 14:37 0:00 /lib/systemd/systemd --user
piosk 751 0.0 0.5 36384 2488 ? S 14:37 0:00 (sd-pam)
piosk 766 0.0 1.4 43140 6272 ? S<sl 14:37 0:00 /usr/bin/pipewire
piosk 767 0.0 0.6 22112 2944 ? Ssl 14:37 0:00 /usr/bin/pipewire -c filter-chain.conf
piosk 768 0.0 3.0 121404 13484 ? S<sl 14:37 0:00 /usr/bin/wireplumber
piosk 769 0.0 1.2 35852 5376 ? S<sl 14:37 0:00 /usr/bin/pipewire-pulse
piosk 770 0.0 0.5 8588 2560 tty1 S+ 14:37 0:00 -bash
piosk 772 0.0 0.7 7496 3456 ? Ss 14:37 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
piosk 825 0.0 1.3 43304 5760 ? Ssl 14:37 0:00 /usr/libexec/xdg-permission-store
piosk 838 0.0 1.9 56704 8320 ? Ssl 14:37 0:00 /usr/bin/lxsession -s LXDE-pi -e LXDE
piosk 887 0.0 0.2 6196 1276 ? Ss 14:37 0:00 /usr/bin/ssh-agent /usr/bin/startlxde-pi
piosk 932 0.0 1.4 44308 6144 ? Ssl 14:37 0:00 /usr/libexec/gvfsd
piosk 937 0.0 1.1 56580 5120 ? Sl 14:37 0:00 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f
piosk 947 0.0 2.9 89580 12672 ? S 14:37 0:01 openbox --config-file /home/piosk/.config/openbox/lxde-pi-rc.xml
piosk 950 0.0 1.9 49676 8320 ? Sl 14:37 0:00 lxpolkit
piosk 952 0.2 10.6 399424 46460 ? Sl 14:37 0:06 lxpanel --profile LXDE-pi
piosk 954 0.0 11.9 352776 52180 ? Sl 14:37 0:02 pcmanfm --desktop --profile LXDE-pi
piosk 971 0.0 0.2 6196 1148 ? Ss 14:37 0:00 /usr/bin/ssh-agent -s
piosk 979 0.0 0.9 14200 4096 ? S 14:37 0:00 systemd-inhibit --what=handle-power-key gtk-nop
piosk 982 0.0 0.5 4960 2304 ? S 14:37 0:00 xcompmgr -aR
piosk 993 0.0 5.1 225600 22268 ? S 14:37 0:00 gtk-nop
piosk 1027 0.0 2.3 93012 10112 ? Ssl 14:37 0:00 /usr/libexec/gvfs-udisks2-volume-monitor
piosk 1031 0.0 1.2 26784 5248 ? Sl 14:37 0:00 /usr/lib/menu-cache/menu-cached /run/user/1000/menu-cached-:0
piosk 1039 0.0 1.2 40616 5632 ? Ssl 14:37 0:00 /usr/libexec/gvfs-goa-volume-monitor
piosk 1043 0.0 1.2 40552 5504 ? Ssl 14:37 0:00 /usr/libexec/gvfs-mtp-volume-monitor
piosk 1047 0.0 1.2 41616 5632 ? Ssl 14:37 0:00 /usr/libexec/gvfs-gphoto2-volume-monitor
piosk 1051 0.0 1.4 54108 6144 ? Ssl 14:37 0:00 /usr/libexec/gvfs-afc-volume-monitor
piosk 1057 0.0 1.5 53788 6912 ? Sl 14:37 0:00 /usr/libexec/gvfsd-trash --spawner :1.13 /org/gtk/gvfs/exec_spaw/0
piosk 1456 2.5 7.8 128448 34164 ? Sl 14:38 1:12 lxterminal
piosk 1502 0.0 0.8 8596 3840 pts/1 Ss 14:43 0:00 bash
piosk 1505 4.0 0.8 8656 3712 pts/1 S+ 14:43 1:42 htop
piosk 1510 0.0 0.9 8596 3968 pts/2 Ss+ 14:46 0:00 bash
root 1563 0.0 1.9 14816 8704 ? Ss 15:22 0:00 sshd: piosk [priv]
piosk 1570 0.0 1.4 15076 6356 ? S 15:22 0:00 sshd: piosk@pts/0
piosk 1571 0.1 0.9 8584 3968 pts/0 Ss 15:22 0:00 -bash
piosk 1597 300 0.9 11864 4224 pts/0 R+ 15:25 0:00 ps aux
piosk 1598 0.0 0.4 7532 1792 pts/0 S+ 15:25 0:00 grep --color=auto piosk
piosk@piosk:~ $ journalctl -fb
Dec 08 15:22:13 piosk sshd[1563]: pam_unix(sshd:session): session opened for user piosk(uid=1000) by (uid=0)
Dec 08 15:22:13 piosk systemd-logind[452]: New session 5 of user piosk.
Dec 08 15:22:13 piosk systemd[1]: Started session-5.scope - Session 5 of User piosk.
Dec 08 15:22:13 piosk sshd[1563]: pam_env(sshd:session): deprecated reading of user environment enabled
Dec 08 15:23:45 piosk sudo[1587]: piosk : TTY=pts/0 ; PWD=/home/piosk ; USER=root ; COMMAND=/usr/bin/nano .config/wayfire.ini
Dec 08 15:23:45 piosk sudo[1587]: pam_unix(sudo:session): session opened for user root(uid=0) by piosk(uid=1000)
Dec 08 15:24:06 piosk sudo[1587]: pam_unix(sudo:session): session closed for user root
Dec 08 15:24:18 piosk sudo[1591]: piosk : TTY=pts/0 ; PWD=/home/piosk ; USER=root ; COMMAND=/usr/bin/nano .config/wayfire.ini
Dec 08 15:24:18 piosk sudo[1591]: pam_unix(sudo:session): session opened for user root(uid=0) by piosk(uid=1000)
Dec 08 15:24:22 piosk sudo[1591]: pam_unix(sudo:session): session closed for user root
Please advise what I should check further or how I should initialise the PIOSK web server?
@debloper commented on GitHub (Dec 9, 2024):
@arqtv I think you have 2 issues:
labwccompositor; follow this issue for workarounds.ufworiptablesdocs for details.@brimdor commented on GitHub (Dec 15, 2024):
If Pi Zero W 2 is not an option due to incompatibility, I recommend removing from your description stating that RPi Zero W 2, Pi 4 and 5 are all compatible.
@SpiraMirabilis commented on GitHub (Dec 17, 2024):
The piosk needs to use systemd to manage its three scripts that are running.
I'm not really interested in actually submitting a PR but this is how you would do it:
Here is an example of a systemd service that should be used instead of the way piosk currently sets itself up to be autorun:
install in /etc/systemd/system/ and then run sudo systemctl daemon-reload, sudo systemctl enable piosk-browser and sudo systemctl start piosk-browser (repeat for other two)
piosk-browser.service
[Unit]
Description=Run piosk 'browser.sh' to launch chromium
After=default.target
[Service]
Type=simple
ExecStartPre=/usr/bin/sleep 5
ExecStart=/bin/bash /home/pi/piosk/scripts/browser.sh
WorkingDirectory=/home/pi
User=pi
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/pi/.Xauthority
Environment=XDG_RUNTIME_DIR=/run/user/1000
Restart=on-failure
[Install]
WantedBy=graphical.target
Note that it has a small sleep delay before the service fires, and it depends on graphical.target so it will launch (with a delay) after the GUI comes up, and it hijacks the pi user's environmental variables for the X display adapter. Note that this will only work if the user is named "pi".
If you configured the raspberry pi user with a different username then you'd have to adjust this. The savvy developer could include these three files as a template in the install script and then use sed to add in the actual user name so that it would always work.
You'd need a seperate version of this for the switcher.sh and also one to run the index.js if you wanted it to switch tabs and have the webserver running, here are the ones I used:
piosk-switcher.service
[Unit]
Description=Run piosk 'switcher.sh' to switch tabs
#After=piosk-browser.service
#Requires=piosk-browser.service
[Service]
Type=simple
ExecStartPre=/usr/bin/sleep 30
ExecStart=/bin/bash /home/pi/piosk/scripts/switcher.sh
WorkingDirectory=/home/pi
User=pi
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/pi/.Xauthority
Environment=XDG_RUNTIME_DIR=/run/user/1000
Restart=on-failure
RestartSec=5
[Install]
WantedBy=graphical.target
piosk-webserver.service
[Unit]
Description=Run piosk webserver
[Service]
Type=simple
ExecStartPre=/usr/bin/sleep 5
ExecStart=/usr/bin/node /home/pi/piosk/index.js
WorkingDirectory=/home/pi/piosk
User=root
Restart=on-failure
[Install]
WantedBy=graphical.target
Ideally you should have three of these, including one to run your index.js. Putting things in rc.local is ugly, there is no functionality to restart it if it fails and a bunch of other things.
This will solve the "after X hours the piosk stops switching tabs" issue which is undoubtedly the switcher.sh script failing for some random reason or another, but systemd will automatically restart it as long as "browser.sh" is running.
Edit: I removed the After/Requires section in piosk-switcher.service as this seems to get hung up on boot often and just replaced it with a 30 second delay and hoping for the best, which seems to work well!
@debloper commented on GitHub (Jul 21, 2025):
Pi Zero/ZeroW/Zero2W removed from recommendations:
github.com/debloper/piosk@4e3fd3ed3eThis can't be fixed as long we're using chromium as the browser platform.