V
V
Vic Shostak2018-04-15 14:35:15
Raspberry Pi
Vic Shostak, 2018-04-15 14:35:15

Raspbian Lite. Is it possible to make a kiosk mode?

Good time of the year.
The task is to run Raspberry in kiosk mode, where a web server with a user interface page (on Django) will open in Chronium. Question: is it possible to do all this on Raspbian Lite (the official distribution, which is CLI only, no GUI)?
Installed all required dependencies like so:

$ wget http://ftp.us.debian.org/debian/pool/main/libg/libgcrypt11/libgcrypt11_1.5.0-5+deb7u4_armhf.deb
$ wget http://launchpadlibrarian.net/218525709/chromium-browser_45.0.2454.85-0ubuntu0.14.04.1.1097_armhf.deb
$ wget http://launchpadlibrarian.net/218525711/chromium-codecs-ffmpeg-extra_45.0.2454.85-0ubuntu0.14.04.1.1097_armhf.deb
$ sudo dpkg -i libgcrypt11_1.5.0-5+deb7u4_armhf.deb
$ sudo dpkg -i chromium-codecs-ffmpeg-extra_45.0.2454.85-0ubuntu0.14.04.1.1097_armhf.deb
$ sudo dpkg -i chromium-browser_45.0.2454.85-0ubuntu0.14.04.1.1097_armhf.deb

I launch the kiosk like this: I created a file in autoload ~/.config/autostart/chromium.desktop, I wrote this in it:
[Desktop Entry]
Encoding=UTF-8
Name=Connect
Comment=Checks internet connectivity
Exec=/usr/bin/chromium-browser -incognito --noerrdialogs --kiosk http://127.0.0.1:8000

When you restart the raspberry, nothing happens ..
I would be glad for sensible comments.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vic Shostak, 2018-04-18
@vikkyshostak

I figured it out myself, this instruction helped a lot: https://die-antwort.eu/techblog/2017-12-setup-rasp...
1. Install the necessary packages:
2. Rule /etc/xdg/openbox/autostart:

# Отключаем скринсейвер и режим сна для монитора
xset s off
xset s noblank
xset -dpms

# Разрешаем убийство процесса иксов по нажатию Ctrl + Alt + Backspace
# Чтобы снова запустить: $ sudo startx -- -nocursor
setxkbmap -option terminate:ctrl_alt_bksp

# Старт браузера Chromium в режиме киоска
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
chromium-browser --disable-infobars -incognito --noerrdialogs --kiosk 'http://127.0.0.1:8000/'

3. Create / edit ~/.bash_profile(to autorun Xs on reboot):
4. To control, hold down Ctrl + Alt + F2and go to the console. Back to browser - Ctrl + Alt + F1. To kill the X process - Ctrl + Alt + Backspace.
Actually, that's all - reboot and everything works as required.
If the browser hangs and it is impossible to reboot the RPi (anything happens), you can connect via SSH, kill the browser process and start it again on a monitor that is connected to HDMI:
$ export DISPLAY=:0
$ sudo chromium-browser -incognito --noerrdialogs --disable-infobars --kiosk http://127.0.0.1:8000/

L
Ledax, 2018-08-07
@Ledax

I was able to implement the kiosk mode according to your manuals, thanks. Have you ever had the need to refresh the page periodically? I have been fighting for the second day and I don’t understand how to send the F5 command while connected to the raspberry via ssh, and how to do the same but automatically at a given interval.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question