Siraya Printer — Linux register PC install (USB / copy folder)
=============================================================

WHAT IS IN THIS FOLDER
----------------------
Copy the entire **agent-linux** folder to the register PC (e.g. ~/SirayaPrinter/).

  Install.sh                 <- run once (sudo — installs service + CUPS deps)
  SirayaPrinter.AppImage     <- desktop manager (printers, test print, settings)
  install-from-folder.sh     <- called by Install.sh (do not run alone unless you know sudo)
  service/payload/linux-x64/ <- bundled print agent + Node (offline, no npm on PC)
  START_HERE.txt             <- this file

REQUIREMENTS
------------
- Ubuntu 22.04+ or Debian 12+ (64-bit)
- USB thermal receipt printer
- Internet on first install (downloads CUPS packages if missing; agent itself is bundled)

INSTALL STEPS
-------------
1. Plug in the USB thermal printer.
2. Copy this whole folder to the PC, e.g. ~/SirayaPrinter/
3. Open a terminal in that folder:
     chmod +x Install.sh SirayaPrinter*.AppImage
     ./Install.sh
4. Enter your sudo password when asked.
5. Browser may open http://127.0.0.1:5000 — select your CUPS printer queue → Test print.
6. A **Siraya Printer** icon is added to your Desktop and app menu.
7. Double-click **SirayaPrinter.AppImage** (or the Desktop icon) for daily use.
8. On **this same PC**, open POS in the browser:
     https://pos.siraya.food/pos

If no printer appears in the list, add it in CUPS first:
  http://localhost:631  (Admin → Add Printer → USB → Raw / ESC-POS queue)

AFTER INSTALL
-------------
- Background service: siraya-printer (starts on boot)
- Installed to: /opt/siraya/printer
- Data: /var/lib/siraya/printer
- Setup / test: http://127.0.0.1:5000
- Logs: journalctl -u siraya-printer -f
- Install log: /tmp/siraya-printer-install.log

TROUBLESHOOTING
---------------
- "Payload missing" → copy the full folder including service/payload/linux-x64/
- Service down → sudo systemctl restart siraya-printer
- Test print OK but POS does not print → use POS on this PC (agent is 127.0.0.1 only)
- Garbled receipt → wrong CUPS driver; use Raw queue not PDF
