Ask Your Question

Revision history [back]

How to get sage command line show() to generate other than .html?

HI. I'm using SageMath 9.5 from the Lubuntu 22.04 apt packages on a PC laptop. When I start sage from the gui menu it opens jupyter and I can enter the following code and everything works.

G = tetrahedron((0,-3.5,0), color='blue') + cube((0,-2,0),color=(.25,0,.5))
G += octahedron(color='red') + dodecahedron((0,2,0), color='orange')
G += icosahedron(center=(0,4,0), color='yellow')
G.show(aspect_ratio=[1,1,1])

However, when I enter the same code in the command-line sage, I get an access denied error from firefox. I think this might have to do with firefox being a snap package by default now on Lubuntu 22.04. But my real question is how do I get the above code to show in its own window (is "natively" the right term?) without have to invoke the web browser? I want to avoid running firefox for sage so I would prefer to use the terminal, avoiding jupyter and displaying my plots without running the browser. Any help would by greatly appreciated. BTW, I am not yet proficient in python so please explain to me like I'm 5 years old. Thanks.