-
-
Notifications
You must be signed in to change notification settings - Fork 38
Install on Chrome OS
Enable Linux container in your Chrome OS first
https://github.com/eliranwong/ChromeOSLinux#turn-on-linux
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:
-
Install Python and git
-
Download UBA
-
Run UBA
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
Get git ready! [optional]
There are different ways to download UBA, we use git in the following example.
To install git, run on terminal:
sudo apt install -y git
Don't want to use git? You can download a zip package of UBA and unzip it instead of using git:
https://github.com/eliranwong/UniqueBible/archive/master.zip
You simply need to download and run. Everything else will be set up for you automatically the first time you run UBA.
To download:
To run:
python3 UniqueBible/uba.py
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:
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.
You can run UBA with terminal without typing a fullpath, by creating an alias.
Below is an example:
This example only works if:
-
You use bash
-
The following example assumes that you install UBA in your home directory. You need to change the path if you install at a different location.
echo "alias uba='$HOME/UniqueBible/uba.py'" >> ~/.bashrc
Close and reopen your terminal app, you should then be able to run UBA with this simple command:
uba
Our setup script automatically makes file "uba.py" executable, but in case it is not running, you may need to set permission on it manually:
chmod u+x $HOME/UniqueBible/uba.py
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]
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"]
UBA has a script that automates fixes on the issues mentioned below: