NI Linux Real-Time Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Google Chrome in NI Linux RT

Here at my company we have been developing a project that uses a browser interface for a monitoring system.

We integrated NI cRIO with a touch screen monitor.

Using a browser for UI has many advantages and mainly access through network without any changes in the interface.

First idea came out from another post in this community about using Mozilla Firefox as a client (https://decibel.ni.com/content/docs/DOC-41894).

During a long period, we used Firefox as main browser, but it wasn't fitting our needs, we were using Material Design UI from Google, and Chrome has much more compatibility as the pages run smoothly in this browser.

So, we decided to investigate how to use Chrome. We found out that Chrome does not have a tarball version for linux as Firefox does. We came up with a solution that requires installing some packages and "manually" installing another.

It is not 100% guaranteed it will be stable in your system, but it is worth a try.

First, install dependencies if they aren't already. (Note: all this installation considers you have direct internet access, otherwise you'll have to download in another computer and transfer the packages to cRIO)

Dependencies from repository


admin@NI-cRIO-903*:~# opkg update

admin@NI-cRIO-903*:~# opkg install curl libcups2 gconf libasound2 xz bzip2

libnss

Download a version of libnss3 from latest ubuntu LTS version - amd64 (http://packages.ubuntu.com/trusty/libnss3).

admin@NI-cRIO-903*:~# wget http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3_3.21-0ubuntu0.14.04.2_amd64.deb

Extract the deb and the tar inside.

admin@NI-cRIO-903*:~# ar -vx libnss3_3.21-0ubuntu0.14.04.2_amd64.deb && rm control.tar.gz debian-binary

admin@NI-cRIO-903*:~# tar -xvJf data.tar.xz && rm data.tar.xz

Rename and move the files to their final location.

admin@NI-cRIO-903*:~# mv usr/lib/x86_64-linux-gnu/ usr/lib/x86_64

admin@NI-cRIO-903*:~# cp -R usr/ / && rm -r usr/

libXss

Download a version of libXss1 from latest ubuntu LTS version - amd64 (http://packages.ubuntu.com/trusty/libxss1).


admin@NI-cRIO-903*:~#  wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxss/libxss1_1.2.2-1_amd64.deb

Extract the deb and the tar inside.

admin@NI-cRIO-903*:~# ar -vx libxss1_1.2.2-1_amd64.deb && rm control.tar.gz debian-binary

admin@NI-cRIO-903*:~# tar -xvf data.tar.gz && rm data.tar.gz

Rename and move the files to their final location.

admin@NI-cRIO-903*:~# mv usr/lib/x86_64-linux-gnu/ usr/lib/x86_64

admin@NI-cRIO-903*:~# cp -R usr/ / && rm -r usr/

Google Chrome


Download the latest version of Chrome (https://www.google.com.br/chrome/browser/desktop/).

We decided to use a Debian Version as other dependencies were also from this distribution.

We used curl, because wget version does not suppport https.

admin@NI-cRIO-903*:~# curl -o google-chrome-stable_current_amd64.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

Extract the deb and the tar inside.


admin@NI-cRIO-903*:~# ar -vx google-chrome-stable_current_amd64.deb && rm control.tar.gz debian-binary

admin@NI-cRIO-903*:~# tar -xvJf data.tar.xz && rm -r data.tar.xz etc/

Move the files to their final location.


admin@NI-cRIO-903*:~# cp -R opt/ / && cp -R usr/ /

admin@NI-cRIO-903*:~# rm -r opt/ usr/

Running Chrome

To run Google Chrome you need to be logged as lvuser, otherwise (i.e. admin) it will chash before it starts.

sh-4-3$ google-chrome-stable &

There are some options concerning command line and usage.

Enables full screen and hides menu and bars.

--kiosk

If you intend to launch Chrome from LabVIEW using System Exec.vi, you may use this option to persist configuration data. In default, when LabVIEW launches it, Chrome creates a folder in Temp, so after reboot any extension or configuration will be gone.

--user-data-dir=/home/lvuser/.config/google-chrome/

We've been testing Chrome, and so far it looks pretty stable.

Be free to test it and enjoy.


Comments
BradM
Active Participant
Active Participant
on

Thanks for the excellent writeup!

Volker64
Member
Member
on

Hi Felipefoz. Very nice, but I need some help. I am using a Compacdaq 9132 with RT-OS. I have installed firefox, but I want to install a browser which uses less ram memory. I think that Chrome is less ram hungry.

 

I was able to find the actual files of libnss, libxss and Chrome. But the linux commands that you have posted do not work to 100% and the files are copied to wrong subdirectories. I am not too familiar with linux commands, but I am sure that I would be able to move the files to the correct subdirectories. Your mv commands are meant to rename files and folders. It would me if you could let me know where the files should be moved too. Maybe you have screenshots of the file and folder structure how it should look like if all files are moved to their correct positions.

 

Or did you maybe find another way to install chrome or another slim browser in Labview Linux RT?

 

Many thanks in advance.

rolfk
Knight of NI Knight of NI
Knight of NI
on

If you hope for Chrome to be less memory hungry than Firefox, you are likely going to be badly disappointed. Chrome has been getting a monster, and development efforts are not on creating a lean and mean browser but a safe and fast one.

Rolf Kalbermatter
My Blog
felipefoz
Member Member
Member
on

@Volker64 said: 
Or did you maybe find another way to install chrome or another slim browser in Labview Linux RT?


Sorry to take so long to answer. I had issues with two accounts conflicting in the forums that I did not keep track of the replies.

This document I wrote almost 5 years ago, and probably nothing applies anymore as Linux and everything got new versions. At the time of the write I was using LabVIEW 2015 I believe. 

Today, I wouldn't recommend any installed browser on a production CompactRIO, for obvious reasons, memory management.

 

@rolfk said:

If you hope for Chrome to be less memory hungry than Firefox, you are likely going to be badly disappointed. Chrome has been getting a monster, and development efforts are not on creating a lean and mean browser but a safe and fast one.

Exactly.

Contributors