I have set up Ubuntu Base image for Arm on my Android phone and now I want to install some apps.
How do I set up the eBook reader Foliate?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
This answer does not require a rooted Android device.
Almost all apps in the official Ubuntu repositories (e.g. LibreOffice, GIMP) are also available for ARM, and the procedure for their installation is same as in a AMD64 desktop computer. By default, you are the root user in Termux, and you won't need
apt install name-of-the-app
For some reason, Android does not allow running sandboxed apps distributed through snap and flatpak channels (Flatpak shows segmentation fault when one tries to add the flathub repo). I have not tried appimages.
However, certain apps (like Foliate) need some special tweaks after its installation. Since snap and flatpak are not available, we can install Foliate with its PPA.
add-apt-repository ppa:apandada1/foliate apt update apt install foliate
At this point you will notice that it opens, but goes into an endless loop when one tries to open a book.
Open a terminal, and enter the command
(Alternatively, you can use a GUI text editor)
And change the the
Exec entry to
Exec=WEBKIT_FORCE_SANDBOX=0 com.github.johnfactotum.Foliate %U
(previously it was
And, for the library view (at the end of the .desktop file),
Exec=WEBKIT_FORCE_SANDBOX=0 com.github.johnfactotum.Foliate --library
Now exit and restart Ubuntu. Foliate would open books successfully.
I found that adding
.bashrc does not work for some reason.
Foliate in fullscreen mode. The screen resolution is manually set to 700x1500 to force portrait mode.
Opening Books - Sometimes, Foliate opens the previously read book when you double click a new .epub file. The workaround is to use
Open... in the Foliate menu, and select in the the book you want to open with the file manager.
Handling updates - The edited desktop file would be replaced when Foliate receives an update. You can copy the edited .desktop file to your desktop
cp /usr/share/applications/com.github.johnfactotum.Foliate.desktop /root/Desktop/
and restore it after Foliate is updated
cp /root/Desktop/com.github.johnfactotum.Foliate.desktop /usr/share/applications/
Portrait Mode - If you want to read books in portrait mode, change the screen resolution of VNC server to something like
700x1500 (you can find what best fits your phone screen with some trial and error.) Foliate would automatically switch to portrait mode.
Fullscreen Mode -- You can make Foliate fullscreen (
Menu --> Fullscreen icon).
Themes - The default looks of any DE installed in the Ubuntu Base image may not be very good. You can install GTK themes and Icon themes to make apps look better. Many good themes (e.g. Arc GTK theme and Papirus Icon theme) are already available in the official Ubuntu repositories.