Skip to content

Service start/stop shortcut

A kiosk-style FR201 typically launches a fullscreen browser or dashboard on boot via a systemd service. That’s great in production and miserable when you need to troubleshoot — every time you escape to a TTY, the service relaunches the dashboard before you can type anything useful.

The fix: drop two single-letter scripts (s to stop, r to restart) onto the device’s PATH. When you break out to the console, you can stop the service in two keystrokes (s, Enter) before it has a chance to take the screen back.

Replace kiosk.service with the actual unit name on your device.

  1. Write the s (stop) command to /usr/local/bin/:

    Create the stop shortcut
    sudo tee /usr/local/bin/s > /dev/null << 'EOF'
    #!/bin/bash
    sudo systemctl stop kiosk.service
    echo "Kiosk service stopped"
    EOF
  2. Write the r (restart) command:

    Create the restart shortcut
    sudo tee /usr/local/bin/r > /dev/null << 'EOF'
    #!/bin/bash
    sudo systemctl restart kiosk.service
    echo "Kiosk service restarted"
    EOF
  3. Mark both executable:

    Mark the shortcuts executable
    sudo chmod +x /usr/local/bin/s /usr/local/bin/r

/usr/local/bin/ is on every user’s PATH by default, so any account on the device — including a non-pi kiosk user — can run s or r from anywhere.

When the dashboard is up and you need to break out:

  1. Switch to a TTY (Ctrl+Alt+F2 usually works) or kill the X session, depending on how the kiosk is configured.
  2. Log in.
  3. Type s and hit Enter. The service stops and stays stopped until you run r.

When you’re done troubleshooting, type r to bring the dashboard back.