15

I am running Raspbian, and I am trying to setup a "kiosk mode" box. I have successfully done this with midori, but midori does not support html5. so I wanted to try the new beta "web browser" (seems to run epiphany-browser).

my current setup is like this: /etc/xdg/lxsession/LXDE/autostart:

@xset s off
@xset -dpms
@xset s noblank
@midori -e Fullscreen -a http://www.playr.biz/23612/15122

this new web browser is discussed here

but when I look at the manpage, it does not say much about CLI options.

man epiphany-browser

so, my question is: how can I start the epiphany-browser in full screen mode, and start a specific URL like I have done with midori above? (if possible at all).

update: I followed advice and I tried the following in file /etc/xdg/lxsession/LXDE/autostart

@epiphany-browser http://www.playr.biz/5dd1/1ddd5
@sleep 2s
@echo key F11 | xte

but it did not make it full screen, so I tried to run xte manually, but got an error " Unable to open display 'default'"

so, I did two things, I changed the file /etc/lightdm/lightdm.conf and I looked for this line:

xserver-command=X -s 0 dpms

then I changed it to:

xserver-command=X -s 0 dpms :0

to define the display/screen as :0 (localhost number 0)

now, if I run this

echo key F11 | xte -x:0

the screen goes full screen.

but, when I update the /etc/xdg/lxsession/LXDE/autostart like this:

@epiphany-browser http://www.playr.biz/5ddd/1dddd
@sleep 60s
@echo key F11 | xte -x:0

PS: I tried 2s, 10s, 60s and 120s, but that did not help.

So I guess the @sleep 60s might not work.

techraf
  • 4,353
  • 10
  • 32
  • 43
Sverre
  • 315
  • 1
  • 4
  • 12

4 Answers4

9

This is not a direct answer to your problem, but it is a suggestion based on the context.

I am trying to setup a "kiosk mode" box. I have successfully done this with midori, but midori does not support html5.

Chromium (a fork of chrome) is available for the pi, supports HTML 5, and although it is undocumented, has a --kiosk mode. I tested this on the raspbian, but I imagine it is in the Arch and Pidora repos as well:

> apt-get install chromium

A surprisingly small download, < 100 MB. Then:

> chromium --kiosk

Presto, full screen. There does not seem to be a way to get it out of full screen (F11 doesn't work), but perhaps that is the point of kiosk mode.

Initially, chromium has a residential memory footprint (i.e., actual RAM usage) of ~70 MB.

goldilocks
  • 60,325
  • 17
  • 117
  • 234
8

It doesn't look like there's a way to do it directly, but the xte tool can be used to simulate a key press.

epiphany-browser http://www.playr.biz/23612/15122
sleep 2s # give it time to start
echo key F11 | xte # simulate pressing the full screen key
Fred
  • 4,592
  • 19
  • 29
4

Here's an example of a digital picture frame using epiphany kiosk style: http://simplyautomationized.blogspot.com/2015/04/rpicframe-html5-kiosk-style-picture.html

You will need a window manager opened before launching. matchbox-window-manager is light weight

The -a in the CLI will load it in kiosk mode:

sudo -u pi epiphany-browser -a --profile ~/.config http://localhost/index.html
raspi-ninja
  • 889
  • 2
  • 8
  • 15
1

I think the trick here is to include the sleep command in the automation script instead of depending on /bin/sleep.

My /etc/xdg/lxsession/LXDE-pi/autostart looks like this and seems to work as intended:

@xset s off
@xset -dpms
@xset s noblank
@epiphany-browser index.html
@xte 'sleep 10' 'key F11'

Of course you should replace 'index.html' with a real URL and you still need the xautomation package.

Greenonline
  • 2,969
  • 5
  • 27
  • 38