Graphical environments in the world of IoT

Ubuntu is available in Cloud Server Linux. Contact us to find out our latest offers!

The IoT promises to bring about a revolution in the way we interact with devices around us. While many IoT devices will be hidden away, from sensors that measure manufacturing tolerances in a factory to hubs that control lighting around the home, there are a class of devices that need to provide some sort of graphical output or display to the user. Some examples include digital signage, interactive kiosks, automotive in-car entertainment gateways, smart meters, and the plethora of display screens seen on everything from washing machines to smart thermostats. All of these examples need some way to output graphics to a screen display but in an embedded environment that is not always easy.

Linux is one of the most popular OS choices for manufacturers and solution providers to use in IoT devices and with it there are a few options available for graphical environments. From custom software to drive the display, through direct frame buffer access with toolkits such as QT, to a full X windowing server. All of these options have their pros and cons and often it is a trade-off between custom software and off-the-shelf components to speed up development. Custom software takes time and requires developers to continue to maintain a code base for the lifetime of the device, while using a graphical toolkit such as QT requires less code but comes with commercial licencing. The open source X windowing server is a popular choice but, being over 30 years old, has some shortcomings. It has been well documented that the design of X windows, although revolutionary at the time, has some security risks especially around application isolation and privilege escalation which has led to efforts to replace it by redesigning the graphical server from the ground up. One such effort is Mir.

Mir is a system-level implementation of a graphical server that is fast, light, and secure. The Mir graphical stack works across different platforms and driver models and is easy to integrate into many IoT solutions. It was first conceived over 6 years ago as part of an initiative by Canonical to unify the graphical environment across all devices, including desktop, TV, and mobile devices and continues to be developed with new features and modern standards like the Wayland protocol. As Mir is designed specifically with security in mind, the problems that X windows has are not applicable to Mir. Memory and disk space usage is much lower than other solutions making Mir an excellent choice for the IoT.

Often, today’s front-end environments use web technologies to provide a featureful interactive user interface. This means that supporting a browser environment is paramount for a display server. Fortunately, Mir handles this incredibly well. It has full support for the WebKit environment that is used by Apple’s Safari and many others and is capable of rendering pages just like modern browsers. Mir also supports Electron which is becoming increasingly popular for application developers and is used by projects such as Skype, Slack, and WhatsApp.

For a complete IoT environment you also need an OS and Ubuntu is one of the most popular choices today. Whether that is Ubuntu Core, classic or server, Mir is available to provide the graphical support needed. What we are seeing in the world of the IoT is an increasing use of Ubuntu Core and Mir especially in conjunction with mir-kiosk the easiest way to have a fully-featured web environment on Linux. A kiosk or smart display is a full-screen app running on a device, with the sole purpose of driving that display to provide specific information or a particular function. Mir-kiosk is one implementation of that functionality, running on top of the Mir display server.

When you have the power of web technologies and a solid, secure Ubuntu platform, many IoT use cases become as simple as installing Ubuntu and mir-kiosk. Full instructions on how to do that, including testing it out in a virtual environment first can be found here. One concrete example of what is possible when you combine these technologies is greenhouse crop monitoring. Using Ubuntu Core, Mir, a small LCD display, low-cost temperature sensors and a Raspberry Pi 3, it is possible to set up a high-tech 24/7 monitoring solution to help understand and control the environment in which crops are grown. In this example, a range of free and open source software is used to produce a graphical dashboard with Ubuntu and Mir at the core. More information on that example can be found here.

If you are looking for a modern, secure, and featureful solution for your graphical IoT needs then Mir provides one of the easiest ways to get there fast. For more information on Mir head on over to the project’s website.

The post Graphical environments in the world of IoT appeared first on Ubuntu Insights.

Ubuntu is available in Cloud Server Linux. Contact us to find out our latest offers!

Comments are closed.

>