Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi! On Ubuntu, I think Sage finds xdg-open and uses that, so it'll use whatever xdg-open is set to use to view pngs.

It looks like Sage calls sage.misc.viewer.browser() instead of sage.misc.viewer.png_viewer() even when it knows that the file is a png.

You can change the default viewer by typing

sage.misc.viewer.BROWSER = 'gpicview'

at the command line. (This may cause problems for anything which uses BROWSER but which gpicview can't handle, though..)

Hi! On Ubuntu, I think Sage finds xdg-open and uses that, so it'll use whatever xdg-open is set to use to view pngs.

It looks like Sage calls sage.misc.viewer.browser() instead of sage.misc.viewer.png_viewer() even when it knows that the file is a png.

You can change the default viewer by typing

sage.misc.viewer.BROWSER = 'gpicview'

at the command line. (This may cause problems for anything which uses BROWSER but which gpicview can't handle, though..)

UPDATE:

If you want this to be the new default setting, you can add the above line to ~/.sage/init.sage:

localhost-2:~ $ cat ~/.sage/init.sage
# personal options
sage.misc.viewer.BROWSER = 'gpicview'

The init.sage file is executed at startup time.