Raspberry PI : Running the Browser on startup without a Desktop

Een reactie plaatsen

juli 19, 2013 door Tim

The simplest way to start a browser (e.g. Midori, Firefox, Chromium) from the command line without a desktop manager is with for example:

xinit /usr/bin/midori -e Fullscreen -a 

http://dev.mobilitylab.org/TransitScreen/screen/index/11

The problem with this is that the Midori window may not be fullscreen even though Midori is running in “fullscreen” mode, because Midori doesn’t behave very well without a window manager running. Other browsers handle this a little better; NetSurf is better behaved (but has no JavaScript); Firefox allows specifying the window width and height as command line options; Chromium has a specific -kiosk mode. (But Firefox and Chromium are heavier than Midori).

A good fix for Midori is to install a very lightweight fullscreen-only kiosk-specialized window manager, e.g. matchbox. Install it with:

sudo apt-get install matchbox

Then create a script for xinit to run (I called mine “transitscreen”). In this file put, for example:

#!/bin/sh
matchbox-window-manager &
midori -e Fullscreen -a http://dev.mobilitylab.org/TransitScreen/screen/index/11

Now run xinit ./transitscreen (or whatever you called the script) and the Midori window should be fullscreen. (Note, due to the quirks of xinit, you have the have a forward slash in the argument for it to be handled correctly, so don’t say just xinit transitscreen for example.)

https://github.com/MobilityLab/TransitScreen/wiki/Raspberry-Pi#running-the-browser-without-a-desktop

Geef een reactie

Vul je gegevens in of klik op een icoon om in te loggen.

WordPress.com logo

Je reageert onder je WordPress.com account. Log uit / Bijwerken )

Twitter-afbeelding

Je reageert onder je Twitter account. Log uit / Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log uit / Bijwerken )

Google+ photo

Je reageert onder je Google+ account. Log uit / Bijwerken )

Verbinden met %s

Kalender

juli 2013
M D W D V Z Z
« Jun   Aug »
1234567
891011121314
15161718192021
22232425262728
293031  

Blog Stats

  • 203,525 hits

My Bookmarks

%d bloggers op de volgende wijze: