SageMath-x86_64.AppImage on Ubuntu 25.04
SageMath-x86_64.AppImage on Ubuntu 25.04
I'm trying out the SageMath-x86_64.AppImage on Ubuntu 25.04. After installing libfuse2t64 it runs and I have been able to run commands and scripts that do calculations and make 2d plots. However I am unable to figure out how to get 3d graphs using the default viewer or jmol. My browser is the Firefox snap version, which may be the problem, though it does work fine with Sage 10.7 built from source (but that's on a different machine).
Starting SageMath-x86_64.AppImage and setting a writable and readable tmp directory allows Firefox to run and find the file, but it displays a blank page. In a text editor the image file seems to be similar to one generated by a Sage 10.7 built directly from source, but it is displayed as a blank window. On another machine a copy still displays as a blank window.
When I've tried to use jmol, I get an error message that jmol can't find java, but java is there. Here's a copy of the session.
rquint@Iphegenia:~/Sage$ env TMPDIR=/home/rquint/Sage/TEMP ./SageMath-x86_64.AppImage
sage: var('x y')
(x, y)
sage: plot3d(x*sin(y), (-1,1), (-1,1))
sage: plot3d(x*sin(y), (-1,1), (-1,1), viewer="jmol")
RuntimeError: jmol cannot run, no suitable java version found
sage: !java --version
openjdk 25-ea 2025-09-16
OpenJDK Runtime Environment (build 25-ea+16-Ubuntu-1)
OpenJDK 64-Bit Server VM (build 25-ea+16-Ubuntu-1, mixed mode, sharing)
Any suggestions on what to try next?
After thinking about it I decided to abandon my old habits of using the terminal and scripts and try a Juypter notebook and was able to use plot3d successfully. Still leaves open the question of why it doesn't work from the command line.
Try with any non-Snap browser. Snap browsers are forbidden to access /tmp
Yes, using a non-snap browser would work. However I have been using a different method with Sage built from source, creating a dotsage directory to replace
.sage
and starting Sage with environment variablesDOT_SAGE=<path to dotsage>
andTMPDIR=<path to dotsage>/temp
. When I tried this with SageMath.AppImage the html file for the graphic image is created in a path accessible by the firefox snap, but I found thatthree.min.js
is in a folder under/var
rather than in the equivalent folder in the built version's sage-10.7 tree, andthree.min.js
is needed to display the image. Except for the line<script src="... sage-10.7/local/share/threejs-sage/r122/three.min.js"></script>
the html files are identical.