web kiosk

910 views
Skip to first unread message

Ghost Dog

unread,
May 27, 2023, 12:21:01 PM5/27/23
to Chromium-discuss
Hello,

I'm using Ubuntu 22.04 and trying to create a web based kiosk. I was able to get it to start. But chromium on shows one tab and the white list I created is not working 

this is what I have so far below any help with be great thinks.



 To turn Chromium into a kiosk with six tabs and a whitelist on Ubuntu, you can follow these steps:

1. Install Chromium:
   ```
   sudo apt update
   sudo apt install chromium-browser
   ```

2. Create a new directory for the kiosk configuration files:
   ```
   mkdir kiosk
   cd kiosk
   ```

3. Create a file named `kiosk.sh` and open it in a text editor:
   ```
   nano kiosk.sh
   ```

4. Add the following code to the `kiosk.sh` file. This code launches Chromium in kiosk mode, opens the specified URLs in separate tabs, and applies a whitelist for allowed websites.
   ```bash
   #!/bin/bash
   chromium-browser --kiosk --incognito --disable-session-crashed-bubble \
   --disable-infobars --disable-features=TranslateUI --disable-translate \
   --no-first-run --fast --fast-start --disable-restore-session-state \
   --disable-features=TranslateUI --disable-translate \
   --app="https://example.com" \
   --new-window="https://example.com" \
   --new-window="https://example.com" \
   --new-window="https://example.com" \
   --new-window="https://example.com" \
   --new-window="https://example.com"
   ```

   Replace `"https://example.com"` with the actual URLs you want to open in the tabs.

5. Save and exit the text editor (Ctrl+O, Ctrl+X).

6. Make the `kiosk.sh` file executable:
   ```
   chmod +x kiosk.sh
   ```

7. Create a file named `chromium-kiosk.service` for the systemd service:
   ```
   sudo nano /etc/systemd/system/chromium-kiosk.service
   ```

8. Add the following content to the `chromium-kiosk.service` file:
   ```
   [Unit]
   Description=Chromium Kiosk
   Wants=graphical.target
   After=graphical.target

   [Service]
   Environment=DISPLAY=:0.0
   Environment=XAUTHORITY=/home/YOUR_USERNAME/.Xauthority
   ExecStart=/path/to/kiosk.sh

   [Install]
   WantedBy=default.target
   ```

   Replace `/path/to/kiosk.sh` with the actual path to the `kiosk.sh` file you created.

9. Save and exit the text editor (Ctrl+O, Ctrl+X).

10. Enable and start the Chromium kiosk service:
    ```
    sudo systemctl enable chromium-kiosk.service
    sudo systemctl start chromium-kiosk.service
    ```

   Replace `chromium-kiosk.service` with the actual name of the service file if you used a different name.

11. Test the kiosk mode by rebooting the system or restarting the service:
    ```
    sudo systemctl restart chromium-kiosk.service
    ```

This setup will launch Chromium in kiosk mode, opening the specified URLs in separate tabs. The `--incognito` flag ensures that no browsing history is saved, and the whitelist is achieved by specifying the allowed URLs in the `kiosk.sh` file.

PhistucK

unread,
May 27, 2023, 12:25:23 PM5/27/23
to kissmybl...@gmail.com, Chromium-discuss
Can you reproduce the same thing with Chrome?
That Chromium is modified and packaged by others and may differ in behaviour, so there is not much this group can do, I think.

PhistucK


--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Jon Perryman

unread,
May 27, 2023, 2:10:38 PM5/27/23
to Chromium-discuss, kissmybl...@gmail.com
I think that you may misunderstand chrome kiosk mode. Why would you ever want to use tabs in a kiosk because switching tabs and changing focus can be a problem. Everything you need can be performed from a single tab. Use an IFRAME when you need access to another domain.

--new-window opens a window instead of a tab. Maybe --kiosk disables --new-window. I've never tried it but it would make sense because you wouldn't want multiple windows in kiosk mode.

I personally disagree with using tabs in kiosk mode. I would design a webpage that has tabs. If you insist on using tabs, then settings has a feature to start tabs or you could use start those tabs from javascript in your initial screen by specifying a unique TARGET= for each tab.

Any time you can't get features working in your desired environment, then get it working in a simple clean environment first. Fot instance, you complain about whitelist not working. You don't know how your changes might affect the whitelist. For example, does --kiosk disable or modify the whitelist? My guess would be no but maybe there was a decision that is different from your interpretation. Take --incognito as an easy example because it's behaviour is different from most people's expectations.


Reply all
Reply to author
Forward
0 new messages