3

I have an Aquaris M10 Ubuntu tablet and I am happy with it.

Now, I need to use a latex application on it so I tried to install Kile (the usual Latex environment I use on my Ubuntu laptop).

I used the libertine container and installed kile with

libertine-container-manager create -i puritine2 -n "Puritine 2" -t chroot -d vivid --force

However, I can't find kile in the .json database after installation

libertine-container-manager list-apps --id puritine --json | grep "\"kile\"

and as a result I cannot add kile to my X Apps Scope.

Do you have any advice to solve this problem? Do you know if there is some other Latex Environment I can use on my M10?

Mattma
  • 133

1 Answers1

4

I could launch kile successfully on M10! It needed some tweaking and requires some basic knowledge how to use linux.

I was just curious, and tried to install kile on the fresh libertine container in my M10 tablet.

  1. You said you installed kile, but showed only libertine container creation. To install kile after container creation you had to do:

    libertine-container-manager install-package -p kile -i puritine2
    

The libertine container is bare minimum and applications needs to be installed like that.

Your list-apps --id puritine --json | grep "\"kile\" should show only installed packages, also you forgot to make --id puritine2. Anyway at current OTA-12 the list-apps bugs and returns only container name! However for searching the installed package you could use:

libertine-container-manager search-cache -s kile and it should return the 3 packages with kile

  1. However you should be warned, that installing kile will pull whole ~500MB of additional stuff, from texlive to many of kde libs and kde's dependable (like pulseaudio, which is completely irrelevant for kile directly). Considering that you could bend your workflow (look for advice at the bottom of the answer) to save the precious space of tablet.

  2. I can confirm that icon is weirdly missing in the libertine scope, even if ... search-cache -s kile returns 3 entries of kile. Also manual checking of json file under ~/.local/share/libertine/ContainersConfig.json shows that kile is installed (It does not differ from other working customly installed X programs).

  3. It looks there are many problems with kde apps in the libertine: universal Qt4 apps gets installed and works OK (i.e. Qgis), however many kde apps does not work. In my previous tries installing KDE programs (i.e. okular) I experienced few times that icon of the app would be shown in the libertine scope, but the app would crash during launch/ (or would not launch at all). This time it looked different, there is no icon, so I had to find out what is going on. The first thing was to find out where the desktop file of kile is and check out if i.e. icons are not missing, or other configurations are ok.

  4. THE FIX: The problem is that libertine ignores kde's tidy encapsulation of kde app desktop files into additional folder of kde4. To fix the problem we need to go to the root file system of the container (in our case puritine2), navigate to standard location of global path of the desktop files, go one folder deeper (-> to kde4), copy the kile.desktop file and paste it on level shallower:

    cd .cache/libertine-container/puritine2/rootfs/usr/share/applications
    cd kde4
    cp kile.desktop ../
    

Thats all!

Go to libertine scope and refresh by top -> bottom swipe, the kile icon should appear under Puritine2. At the first launch you should be patient, It could need taping once to get rid of welcome widget and proceed to loading the kile interface (can take up to 1 min).

Have a nice TeX'ing!

failure and alternatives:

Then exiting kile through menu: files->quit/exit, it quits to dark screen. This happened to me after second try of launch. From now on it behaves (does not launch, or gets stuck at startup) same as the rest of KDE apps on UT :/. Unfortunately my help finishes here as there is no documentation how to debug libertine launched Xapps, and traditional robust method of launching the app from terminal is confined out. So look for bellow advice:

As the alternative I have tried to get the mentioned TeXstudio (Actually I was using it on my desktop and I liked it before I moved to Overleaf), which installs and works fine (a bit sluggish, but this is UT/XMir problem), I opened this one like ten times, loaded some of my projects, tried to quit in different ways (with UT way of swiping out, and with menu->files->quit) and it is working. I also tried to make and compile a template and it is working. However, there is no on screen keyboard (Hopefully OTA-13 will fix this), so there is no way to write/edit without a physical keyboard at the moment. (Actually no of this puritine2 app gets the onscreen keyboard, it can be the issue with some missing undocumented configuration).

update: it looks that I was right, the keyboard have to be enabled per container, this is relevant link to xda post. I am not going to try it for now cause probably OTA13 after few days will fix that. Also I am not sure that the solution under that link would fix the missing keyboard for qt4 apps (both kile and texstudio at the moment), as the snippets are explicily mentioning only gtk2 and gtk3.

Another problem which I run into is that UT/Libertine is able to install just very basic set of (La)Tex styles, and i.e. my project could not be compiled as additional styles are required. Hackish way would be to get the exact style from CTAN and add it to the project folder, however casually ubuntu/debian have the texlive-latex-extra package (500MB) vailable to install, which installs most of known common styles and latex packages. However texlive-latex-extra installation in libertine fails for some reasons, which finally points to my advice bellow.

P.S. (This is modified original answer/advice): I am also Latex user and I didn't wanted to spend ~1 GB for full blown texlive environment, I managed to change my workflow to get as much as possible from mine M10 tablet which is quite limited on the resources (disk space, slowed down due to confinements).

  1. I use Overleaf (It is cloud based have full latex/pdflatex/xelatex working tons of templates, 1 private project is for free, payed subscription enables use of git, so the Latex text sources can be git pulled edited offline and pushed back for compilation, when connected to internet). Overleaf web is quite tablet friendly. I managed to create "webapp" shortcut (the click package) to get the icon and run in the fullscreen mode. (If there would be any interest I could try uploading to uAppStore that click).

  2. for offline editing I use Seabass -- native Ubuntu Touch app (really nice app for any coding on UT, for now it have no auto stuff for latex, but does code highlighting, and is quite convenient using touch interface only)

P.S.S the only trick to use such workflow is to enable r/w root partition for once to get proper git with git+https enabled (to use the encryption for pulling pushing to overleaf)