otfried / ipe

The Ipe extensible drawing editor
http://ipe.otfried.org
125 stars 9 forks source link

Latex not running in Linux (flatpack installation) #479

Closed lostinafro closed 10 months ago

lostinafro commented 10 months ago

Hi,

I start saying that this software is always been useful to me and I thank the developers for it. I always used the binary version installed on Ubuntu, but I liked the idea of employing the flatpak version: easier to install and always up to date.

However, using the flatpak installation, latex does not run anymore. Screenshot from 2023-09-18 14-53-41

Even when I add to the environmental variable IPELATEXPATH=/usr/bin/ the same error message appears: Screenshot from 2023-09-18 14-57-22 Note that IPE is not able to find /usr/bin/pdflatex, but the latex programs are actually in /usr/bin/, as shown here Screenshot from 2023-09-18 15-15-42 Remark the errors related to the QStandardPaths permissions, as you can inall the screen at startup of IPE (I don't know if these are related to the problem).

I tried give system-wide permissions to the flatpak application as well as creating a soft link of pdflatex, luatex, and xelatex in the HOME directory, but the same problems occurs: sh: line 1: /home/MYPC/.ipe/pdflatex: No such file or directory

Is a problem related to my settings? Thank you

otfried commented 10 months ago

It is simply not possible to use a local installation of latex (in your /usr/bin directory) from a flatpak.

This is a design decision of flatpak: to protect your system, the software in the flatpak has access to only those parts of the file system that you give it access to. The flatpak itself is a complete file system image, that already contains its own /usr/bin, and it is not possible to mix the one from your distribution with the one inside the flatpak.

There are three options you can use to run Latex from Ipe in a flatpak, described here: https://github.com/flathub/org.otfried.Ipe

In short, if you don't want to use online compilation, you would have to install the flatpak for Latex, or instead install latex yourself in a separate directory like /opt/texlive and give the flatpak access to this.