Ask Your Question
0

How to set folder for temporary graphics files

asked 2 years ago

richardquint gravatar image

With Ubuntu changing to Firefox as a snap there is a problem with SageMath's location for temporary files, i.e., $HOME/.sage/temp/$HOSTNAME/<some random 4 digit number>, since the snap version of Firefox can't access hidden folders. Is there a way to set another location to hold the html files generates by plot3d? (The files are there but my default browser, Firefox, can't display them.) A less satisfactory solution would be to use a different browser (e.g., Epiphany) just to display these files.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 2 years ago

It should work to set the environment variable DOT_SAGE to something that is not hidden. The default value is $HOME/.sage. A more drastic solution would be to rewrite the definition of SAGE_TMP in src/sage/misc/misc.py to use some other directory.

Preview: (hide)
link

Comments

Thank you John. After copying $HOME/.sage to $HOME/dotsage and doing export DOT_SAGE=$HOME/dotsage in the terminal before running <path to sage>/sage works. I then added export DOT_SAGE=$HOME/dotsage to my .bashrc file and running <path to sage>/sage works in a terminal. What still confuses me is a Ubuntu/Gnome problem I have using a desktop file where I start a sage session using the command EXEC=gnome-terminal --class=SageTerminal -- /home/rquint/Sage/sage-9.6/sage. If I just paste gnome-terminal --class=SageTerminal -- /home/rquint/Sage/sage-9.6/sageinto a terminal session everything works as expected. But when running sage using the desktop file the DOT_SAGE environment value set in .bashrc isn't inherited.

richardquint gravatar imagerichardquint ( 2 years ago )

I'm afraid I don't know how environment variables work in Ubuntu with desktop files. Maybe DOT_SAGE=... EXEC=gnome-terminal --class=...?

John Palmieri gravatar imageJohn Palmieri ( 2 years ago )

With lots of help, I got it working. If anyone is interested, take a look at the discussion at AskUbuntu

richardquint gravatar imagerichardquint ( 2 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2 years ago

Seen: 365 times

Last updated: May 19 '22