Skip to content

Install on Chrome OS

Eliran Wong edited this page Nov 30, 2024 · 9 revisions

Prepare your Chrome OS

Enable Linux container in your Chrome OS first

https://github.com/eliranwong/ChromeOSLinux#turn-on-linux

Set up "Unique Bible App" on Chrome OS

Basically, you simply need to download UBA and run it if you have Python and git in place.

Steps to set up for a fresh installation:

  1. Install Python and basic libraries

  2. Install UBA

  3. Run UBA

  1. Prepare for Installation

Get python ready!

UBA is a python-based application, so you need to have Python installed to run UBA.

Minimum Python version for running UBA: 3.7

There are several different ways to install Python, read more information at: https://www.python.org/downloads/

Below is one of the options we tested:

sudo apt install -y build-essential python3 python-setuptools python3-pip python3-dev python3-venv libssl-dev libffi-dev libnss3

  1. To download:
cd ~
python3 -m venv ub
source ub/bin/activate
pip install --upgrade uniquebible
echo "alias uniquebible='. $(pwd)/ub/bin/activate && $(which ubgui)'" >> ~/.bashrc
source ~/.bashrc
  1. To run:

uniquebible

A screenshot is provided here, so you may know what to expect during the first-time setup:

UBA should look like this screenshot below the first time you run it:

Desktop Application Shortcut

A desktop shortcut "UniqueBibleApp.desktop" is generated for you automatically the first time you run UBA.

The shortcut file is automatically copied to ~/.local/share/applications

You should be able to find it with application Launcher on Chrome OS.

A Note about Installing PySide2 [optional]

PySide2 is a python package required for running UBA. It is automatically set up for you the first time you run UBA.

In case you find that you cannot run UBA with error message telling you that PySide2 is not installed, you may need to manually install PySide2.

We observed that some low-memory chromebooks failed to instead PySide2 by running:

pip3 install PySide2

If this is your case, run the following command instead to install PySide2:

pip3 install --index-url=https://download.qt.io/official_releases/QtForPython/ pyside2 --trusted-host download.qt.io

Remarks: If you install "PySide2" this way, its directory is located at "~/.local/lib/python3.x/site-packages/PySide2" rather than "/usr/local/lib/python3.x/dist-packages/PySide2" as you install with pip3 command.

Read more at: https://wiki.qt.io/Qt_for_Python/GettingStarted]

Use fcitx with UBA [optional]

You can use input method fcitx with UBA if:

1) You have "fcitx" installed

[You may read our notes on installing fcitx on Chrome OS Linux at: https://github.com/eliranwong/ChromeOSLinux/blob/main/input_method/fcitx.md]

2) You have "fcitx-frontend-qt5" installed, use the following command to check:

apt -qq list fcitx-frontend-qt5

3) You have the file "libfcitxplatforminputcontextplugin.so" placed properly inside folder "PySide2/Qt/plugins/platforminputcontexts/":

[You may skip this step (3) if you select "fcitx" on "Set Config Flags" Window in UBA]

If you have UniqueBible installed in home directory and have PySide2 installed inside venv, the following line should help you copy the file to the right place:

cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so ~/UniqueBible/venv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so

chmod +x ~/UniqueBible/venv/lib/python3.7/site-packages/PySide2/Qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so

In case you do not use venv, the path may be one of the followings, depends on how you install PySide2:

/usr/local/lib/python3.7/dist-packages/PySide2/Qt/plugins/platforminputcontexts/
[if you install PySide2 by running "pip3 install PySide2"]

OR

~/.local/lib/python3.7/site-packages/PySide2/Qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so
[if you install PySide2 by running "pip3 install --index-url=https://download.qt.io/official_releases/QtForPython/ pyside2"]

Trouble-shooting

UBA has a script that automates fixes on the issues mentioned below:

https://github.com/eliranwong/ChromeOSLinux/blob/main/troubleshooting/qt.qpa.plugin_cannot_load_xcb.md

Clone this wiki locally