How to use a web browser as a device's user interface

Aus Wiki
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Idea

When you construct a device with a special function or special capabilities, you may face the need for a user interface to control them. Usually this means, you have to attach monitor, mouse and keyboard or -more convenient- a touchscreen, and program some special software, to run on your device and interact with the user. The easiest way to get a user interface in place is installing a webbrowser, displaying a website with HTML elements, that feeds back to a webserver running locally on the device, which executes scripts written e.g. in PHP or Python in reaction to the user's inputs. Such a solution allows not only for quick and easy development and adjustments, but also for remote control of devices over a network. Here, I would like to describe, how an installation of Debian can be used, to display nothing but such a web control interface on an attached monitor, to allow for a convenient way of control over a device, dedicated to a specific function.

Concept

  • a webserver, e.g. Apache2
  • an X-server, e.g. Xorg
  • a webbrowser, e.g. Firefox/Iceweasel
  • init script, runs at startup (/etc/init.d; /etc/rc2.d)
  • starts the X-server
  • starts the webbrowser, on top of the X-server
  • maximizes the browser window, no display of window decorations, use the full screen
  • feeds a startup URL
  • Voila!

Howto

  • setup
Xorg -configure
mv xorg.conf.new /usr/share/X11/xorg.conf.d/
  • run
X -retro
iceweasel --display=:0 -fullscreen

Links

Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Werkzeuge