Friday 17 August 2018

Introduction to Crostini - Part 4: Applications



Chrome OS already supports both applications and Chrome extentions as well as Android applications together with locally created shortcuts. With Crostini, support extends to Linux applications and as a result some Windows applications are also available. Below looks at each in more detail as the processes and terminology for managing applications is both similar and subtly different.


Chrome OS Applications

Chrome OS applications are installed though the Web Store which is a web-based application in itself:


Applications can be added or installed:



pinned and/or launched:


and removed or uninstalled:


Android Applications

Android applications can be installed through two ways.

Using Play Store



Similarly applications can be added or installed:


opened and/or pinned:


uninstalled using Play Store:


or alternatively removed or uninstalled:


Using Google Play


As this is a web service you actually request to install an application on a device:




they can be opened and/or pinned:


or alternatively removed or uninstalled:


Locally Created Shortcuts

Web pages can be treated similar to applications in that a shortcut can be created to them:




they can be launched and also unpinned:


or alternatively removed:


Linux Applications

Linux applications can be installed in the Crostini terminal as previously shown using the CLI. However a new feature now enables a more seamless approach to running Linux applications on Chrome OS where the installation is initiated behind the scenes.

Using the Steam application as an example first download the debian package and copy to 'Linux Files' using the Files application:


Then right click on the file to 'Install with Linux (Beta)':



The full installation isn't finished as this has only created an application icon:


and when you launch the application the actual Linux installation will begin (note the 'penguin' icon in the system tray):


Depending on the application the current 'Beta' status becomes apparent. Some Linux applications have package dependencies, as in this case, so the installation can request confirmation that the additional packages should be installed. This request could be overridden but at this stage a manual confirmation is still required. Additionally the installation can fail during this step either due to package conflicts with the Crostini packages or because of other errors. Hence the Beta status. In this example if you change the screen colours:


you can see more clearly what confirmations are required:


before the application will finish installing:



also noting the correct application icon is now displayed in the system tray when the application launches.

Local Desktop Linux Applications

Similar to how on Linux you can create a desktop entry for an application the same applies to Chrome OS. First create the local desktop file:


This will create an application icon as defined in the desktop file:


which can be launched or pinned:


and uninstalled simply by removing the desktop file:


Windows Applications

There are a number of ways to get Windows binaries to execute under Linux but one of the simplest ways is to use an application called Wine. Wine is provides compatibility layer that effectively simulates a Windows environment using Linux-based libraries as an alternatives to Microsoft's proprietary libraries.

Using the Steam application again as an example first download the Windows executable and copy to 'Linux Files' using the Files application:


Next install Wine into your Linux container. Note unless you know you will only be installing a 64-bit Windows binary (see later) then it is best to install both 32-bit and 64-bit Wine by first adding 32-bit packages to your sources:



Then install the Windows binary using Wine:





This time note that a 'penguin' application icon is now displayed in the system tray when the application launches.

Immediately you will notice some anomolies.  For example before being able to enter text into the box you will need to first right click it.

Secondly if you try and launch the Steam application icon it will fail:


This can be fixed by editing the application's desktop entry and putting quotes around the arguments to the Wine command:


YMMV with the quality of Windows executables as this Steam application shows.

If you know you are only going to install a single 64-bit application then the Wine installation is slightly simpler. First install Wine:


Then download the 64-bit version of the Windows application and copy to your Linux files:


Install the application as before using Wine:





Again a manual launch of the application will fail:


until the each desktop entry is edited as before:


which allows them to work:


Again some icons will fail. It seems any with a hyphen in their name need renaming to work:


Uninstall will work although you will need to manually remove any renamed files as in the above example:



For the latest version of Wine and additional support I recommend consulting the WineHQ website.

Interesting Application Scenarios

An interesting application scenario arises when both the same Chrome OS and Android applications are installed even though the actual application functionality differs.

For example if the Chrome OS application 'Chrome Remote Desktop" is first installed:


followed by the Android application 'Chome Remote Desktop':


you will notice that because their applications icons are identical a small Chrome symbol appears superimposed on the Chrome OS application icon:


This can be demonstrated when both applications are pinned to the system tray and 'App info' is used to confirm the difference:


When the Android version of the application is uninstalled the Chrome symbol is automatically removed:


Another interesting application scenario is that the same application from each of the different OS can be installed along side each other and run in parallel. To demonstrate this I've first installed the Chrome OS version of VLC:


and then the Android version:


next the Ubuntu version:


and finally the Windows version:



Then with all the applications installed:


it is possible to open them in parallel and play the same video file in each:



Please donate if you find this guide useful using the following link http://goo.gl/nXWSGf.