Skip to content

Instantly share code, notes, and snippets.

@HonbraDev
Last active June 3, 2026 14:06
Show Gist options
  • Select an option

  • Save HonbraDev/d6a6c80d97631743f07901ec8918f49c to your computer and use it in GitHub Desktop.

Select an option

Save HonbraDev/d6a6c80d97631743f07901ec8918f49c to your computer and use it in GitHub Desktop.
Ubuntu Server 20.04 LTS Firefox kiosk
# Stop the kiosk service
sudo systemctl stop kiosk
# Remove the kiosk service from startup
sudo systemctl disable kiosk
# Remove the kiosk service
sudo rm -f /etc/systemd/system/kiosk.service
# Reload systemctl daemons
sudo systemctl daemon-reload
# Remove the kiosk startup file and directory
sudo rm -rf /opt/kiosk
# Remove X.org, OpenBox, Firefox and autoremove associated programs no longer in use
sudo apt remove --autoremove -y xorg openbox firefox
# Install X.org, OpenBox, Firefox
sudo apt install --no-install-recommends -y xorg openbox firefox
# Write X.org startup script to /opt/kiosk/kiosk.sh
sudo mkdir /opt/kiosk
echo "xset s
xset -dpms
off openbox-session &
while true;
do
/usr/bin/firefox --kiosk --private-window 'https://honbra.com/'
done" | sudo tee /opt/kiosk/kiosk.sh
# Write service file to /etc/systemd/system/kiosk.service
echo "[Unit]
Description=Start kiosk
[Service]
Type=simple
ExecStart=sudo startx /etc/X11/Xsession /opt/kiosk/kiosk.sh
[Install]
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/kiosk.service
# Add permissions to the files
sudo chmod 644 /etc/systemd/system/kiosk.service
sudo chmod +x /opt/kiosk/kiosk.sh
# Enable the service on startup
sudo systemctl daemon-reload
sudo systemctl enable kiosk
# Finish
echo "Edit /etc/systemd/system/kiosk.service to change the website.
Run 'sudo systemctl start kiosk' to start the kiosk
Thanks for using the Kiosk gist by @HonbraDev :)"
@diogo24m

diogo24m commented Jan 8, 2025

Copy link
Copy Markdown

When I start the service, I get this error:
Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1

Do you know what could be the problem?

@HonbraDev

Copy link
Copy Markdown
Author

@diogo24m I have no idea lol

@arwiendd

Copy link
Copy Markdown

Hi, the script works, thanks for everything! I am using a touch screen and there are some points where data entry is required, have you tried to open an on-screen keyboard at these points?

@Sanian-Creations

Copy link
Copy Markdown

This confuses me, is openbox even necessary? I ask because I don't think the line off openbox-session & does anything, since off is not a command. If people are getting this to work when the code is like this, then that must mean that that particular line is not necessary, and potentially installing openbox isn't required at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment