Changes

Jump to: navigation, search

XELK-TN-001: Using Chromium browser as an Embedded GUI

752 bytes added, 14:24, 8 October 2020
no edit summary
{{AppliesToAxelEsatta}}
{{AppliesToAxelLite}}
{{AppliesToAXEL Lite TN}}
{{AppliesToSBCX}}
{{InfoBoxBottom}}
|1.0.0
|Oct 2019
|[[Axel_Embedded_Linux_Kit_(XELK)#XELK_4.01.0|4.01.0]]
|
|-
Starting from [[Axel_Embedded_Linux_Kit_(XELK)#XELK_4.0.0|XELK 4.0.0]] a new root file system image can be created using Yocto recipes provided by DAVE's XELK BSP.
The new <code>axel-image-x11-browser</code> Yocto image includes the recipes for adding the following '''LASP''' packages(Linux, Apache, SQLite and PHP):
* backend with apache2 and PHP* frontend with Chromium browserwith HTML5 and Javascript* apache2 web server* PHP with apache2 plugindatabase SQLite
== Architecture ==
<Directory "/usr/share/apache2/htdocs">
root@imx6qxelk:~#
 
=== PHP ===
For demonstration purposes the PHP info page is loaded as the home page for our web server running on the system:
 
<pre>
root@imx6qxelk:~# cat /usr/share/apache2/htdocs/.htaccess
DirectoryIndex phpinfo.php
root@imx6qxelk:~# cat /usr/share/apache2/htdocs/phpinfo.php
<?php
 
phpinfo();
 
?>
root@imx6qxelk:~#
</pre>
 
In this way, the PHP info page is shown when the web browser is started on localhost.
=== Graphical backend ===
=== Chromium ===
In the same way of the web server, chormiumcam chormium can be started using a proper service:
<pre>
* removing warning '''popus''': <code>--test-type</code>
==== keyboard ====For a touch screen interaction, it is possible to install a Virtual Keyboard available on the ''chrome Google store''. This is very easy starting chrome on the proper URL and then installing it:
root@imx6qxelk:~# google-chrome https://chrome.google.com/webstore/detail/virtual-keyboard/pflmllfnnabikmfkkaddkoolinlfninn
 
==Results==
 
Chrome browser started with its home page:
 
[[File:Chrome.png|600px]]
 
 
===Use case #1: PHP ===
For demonstration purposes the PHP info page is loaded as the home page for our web server running on the system:
 
<pre>
root@imx6qxelk:~# cat /usr/share/apache2/htdocs/.htaccess
DirectoryIndex phpinfo.php
root@imx6qxelk:~# cat /usr/share/apache2/htdocs/phpinfo.php
<?php
 
phpinfo();
 
?>
root@imx6qxelk:~#
</pre>
 
In this way, the PHP info page is shown when the web browser is started on localhost.
 
[[File:Phpinfo.png|600px]]
 
===Use case #2: eZ Server Monitor ===
A useful application demostrating PHP capabilities is the [https://www.ezservermonitor.com/ eZ Server Monitor]: it is a lightweight and simple dashboard for Linux machine.
 
It uses PHP scripts for collecting the server status/information and displaying them on an embedded web page.
 
[[File:EZServer-top.png|600px]] [[File:EZServer.png|600px]]
 
{| class="wikitable" | width="100%"
| {{#ev:youtube|xxxxxxxx|500|center|eZ Server Monitor running on NXP iMX6DL |frame}}
|}
8,154
edits

Navigation menu