The Mission
We want to use the Raspberry Pi in products with a full blown GUI using a small touchscreen monitor connected to the HDMI port, but without the need to work with cumbersome new GUI tools or learn some new GUI based programming language (life is too short!). On the face of it this should be easy but GUI tools for Linux are not in abundance and all the ones we've looked at have various drawbacks. Oh for something as fantastic as Visual Studio on the PC or Xcode on the MAC. The solution it seems could be to design our app front end using HTML and Javascript, run this using apache, use built in Linux functionality to allow communication between php web pages and our background app programmed in C and display the GUI using an auto loading browser operating in kiosk mode. The browser is likely to be the bottleneck as the RPi hardware is not good for web browser performance, but if the pages are designed with a view to help with fast browser rendering maybe it will be good enough.
Pro's
Using standard web design for our GUI so easy to find someone with the right skills and to create something very cool looking. jQuery could be used to give very slick app features if wanted.
Using C for the core app functionality which we love, although this could be any language really.
No new programming languages to master.
The GUI will also work over Ethernet to remote devices if we wan't that.
Con's
Dealing with the data bridge between the web interface and the core application. Not ideal but the pay off of using HTML for the GUI design should make this a good trade.
OS
On power-up we want our screen on and working as quickly as possible. 'Arch' Linux would give us the fastest boot time especially if we use a class 10 or better SD card, but from our quick evaluation it makes life hard because online guides on how to do things don't work because someone has constantly decided to change how Arch works this week. Rasbian is so much easier to find resources on that just work so whilst it will take a bit longer to load we're going to use it, for now at least
The Basic Setup
Install Rasbian
See here
Set A Custom Boot Screen
See here
Install The Web Server
See here
Auto Run The Web Browser On Startup
To disable the screen auto sleep see here
To auto hide the mouse cursor see here
To set the browser to auto run see here
Design Your Application Link To The Web Browser
See here
Conclusion
A work in progress…
Using the above the boot up is not perfect but not far off whats needed. We need to:
Find a way to hide the NOOBS recovery console white screen shown immediately after powerup and ideally remove the few seconds of time it displays and holds before things carry on, presumably by installing Rasbian without using NOOBS if there is no other way to disable it.
Ideally we need to find a way to get the startup image to appear immediately and avoid the few seconds of scrolling command prompt text before it (in total it doesn't appear until 20 seconds after power on currently using a class 10 SD card). This text may be NOOBS related but seems more likely its the OS before its able to run the boot image script we created.
From this point the process is great. The custom image appears and is displayed for a while before the screen blanks and remains blank unitl the browser page appears. Using a class 10 SD card we get the page up 52 seconds after power on. The last part of the powerup seemed like it would be the problem maybe due to the login appearing or a Raspberry Pi and / or Midori logo being shown as the GUI and Midori loads but its not turned out to be the case which is great. Once the browser loads there is a small black square in the top left of the screen which seems to be a general bug (its mentioned on forums by others) but otherwise its pretty perfect. The browser is quite slow to load and render pages from the internet but loading a locally hosted page written well should be fast (we've not tested this yet…)
1 year ago
Great , thanks
4 years ago
thanks !
7 years ago
Thanks for the helpful guide and am gonna try this in the coming weekend and post here my experience for others to know.
8 years ago
This is very useful thank you!
9 years ago
Thanks! I used a lot of this for my campfire sing-a-long device: https://github.com/philipbeber/karaoke
10 years ago
Thank you great article
10 years ago
+1 For this!