Graphical environments in the world of IoT
Jamie Bennett
on 10 July 2018
Tags: developers , IoT , mir
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.
IoT as a service
Bring an IoT device to market fast. Focus on your apps, we handle the rest. Canonical offers hardware bring up, app integration, knowledge transfer and engineering support to get your first device to market. App store and security updates guaranteed.
IoT app store
Build a platform ecosystem for connected devices to unlock new avenues for revenue generation. Get a secure, hosted and managed multi-tenant app store for your IoT devices.
Newsletter signup
Related posts
6 facts for CentOS users who are holding on
Considering migrating to Ubuntu from other Linux platforms, such as CentOS? Find six useful facts to get started!
Why is Ubuntu Linux the leading choice to replace CentOS for financial services?
Financial services are powered by technology. The customer experience is increasingly driven by data, with tailoring of products and services to reflect...
Japanese device manufacturer I-O DATA DEVICE’s business expansion with Ubuntu Pro for Devices
I-O DATA has entered into a partnership with Canonical, aimed at bringing the benefits of open source and Ubuntu Pro for Devices to thousands of devices...