ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 27 Aug 2020 04:50:43 -0500Centering output in the sagemath serverhttps://ask.sagemath.org/question/53196/centering-output-in-the-sagemath-server/ It's a question already asked but in an other context. I whent the output of sage to be centered in the page. As It is fo a sagemath server included in an html page, I wonder what is the mechanism to obtain ce centering of the result in the windows. this resultCyrilleThu, 27 Aug 2020 04:50:43 -0500https://ask.sagemath.org/question/53196/Is there a way to remove "Terms of Service" popup?https://ask.sagemath.org/question/47052/is-there-a-way-to-remove-terms-of-service-popup/My dear friends,
after using sagemath for a few of month, I want to introduce more people to use sagemath, because sagemath is really useful and powerful.
I live in China, and we have GFW, hence mnay site such as google, facebook, are blocked. I am not sure if sagemath.org would be blocked, hence I want to setup own sagemath server.
Thanks for the open source of sagemath, I almost have my own sagemath server!
When I try embedded sagemath code in some sagemathcell, and Evaluate code, it always popup the "Terms of Service". Is there a way to remove it?
Please visit http://sagemath.askplanck.cn
Put any sagemath code, such as, 1+2
You will find the popup.
Thanks for help!
John
John BaoWed, 03 Jul 2019 08:56:25 -0500https://ask.sagemath.org/question/47052/Using Sage on a Local Serverhttps://ask.sagemath.org/question/32456/using-sage-on-a-local-server/ I have code that I have written in Sage that I would like to use within a web application on a local server. I have tried accomplishing this with Sage server in VirtualBox (both versions 6.10 and 7.0) with no luck. Is there a way that I can create a website on a local server that uses Sage only for the execution of the Sage code in such a way that the website is open to anyone without needing them to create an account or log in? I am only making use of @interact, RK4 calculations, and graphing using Sage.kjapolsonThu, 04 Feb 2016 13:37:52 -0600https://ask.sagemath.org/question/32456/How does Notebook worksheet timeout work?https://ask.sagemath.org/question/23351/how-does-notebook-worksheet-timeout-work/I cannot understand how the Sage Notebook server actually treats the `timeout` parameter. The [documentation](http://sagemath.org/doc/reference/notebook/sagenb/notebook/notebook_object.html) just says that it is the "*...seconds until idle worksheet sessions automatically timeout.*" However, it is not completely clear when the worksheet is considered *idle*.
From [this answer](http://ask.sagemath.org/question/7638/what-state-is-preserved-when-i-close-a-running-notebook-browser-window/?answer=11556#post-id-11556) by William Stein it follows that the worksheet is considered *idle* if the user closes the corresponding tab in the browser.
I performed several tests today and here is what I got:
1. I started my local Notebook server with `timeout=10` and opened a couple of worksheets in my browser. After that I closed some of them keeping the others open, and just waited for the corresponding message in the console. After about 10 minutes I saw a bunch of messages in the console saying that Sage had just closed all of my opened worksheets. So, Sage server closed all the worksheets regardless of whether they were opened in the browser or not.
2. During the second test I opened two worksheets and started to refresh only one of them (by pressing `F5`). After ~10min Sage closed both of them at the same time. So, obviously, refreshing the page does not help.
3. The third test was to start computing something and see what happens. So I started some "never-ending" computation in the worksheet and kept the page open in the browser. It showed the rotating stick (`/ \ / \ ...`) for ~10 minutes and than terminated the process again, despite the fact that I kept the browser tab open all the time.
So it looks like the only thing that resets the timer is starting some cell to calculate something (`Shift+Enter`).
*And just a side note: I noticed that the minimum actual timeout is 10 minutes.*
---------------
My question is: are all my tests and conclusions correct? And if they are, is it really the intended behaviour for Notebook server?v_2eThu, 10 Jul 2014 12:26:37 -0500https://ask.sagemath.org/question/23351/Running SAGE in the own networkhttps://ask.sagemath.org/question/10646/running-sage-in-the-own-network/Hi!
I'm using Fedora 18 64bits where I installed the SAGE and it runs normally when I'm using localhost:8080 and with local ip of the machine: 192.168.2.51:8080 (as an example).
I checked the firewall (ipchains) , any computer can connect to 192.168.2.51 . I'm trying to run in my tablet (and several computers in a class) the SAGE in the LAN (others programs/servers are working fine).
I did a search in google and here, I'm almost 1 week trying to solve this. I can't connect in the SAGE machine/server from other computers in the local network.
1) Can someone please explain how to set it to run locally?
2) Why not include in future releases an option to automatically turn it on to an entire network and maybe outside (public)? The security issues is up to the admin of the server.
Thank you very much for the attention.Luiz Roberto MeierTue, 22 Oct 2013 17:28:45 -0500https://ask.sagemath.org/question/10646/does sage server API work in 5.10?https://ask.sagemath.org/question/10469/does-sage-server-api-work-in-510/I am trying to run a simple notebook server to use API described [here](http://www.math.ucla.edu/~jimc/mathnet_d/sage/reference/sagenb/simple/twist.html) and [here](http://www.sagemath.org/doc/reference/notebook/sagenb/notebook/notebook_object.html)
I run the following code in sage command line:
sage:version()
'Sage Version 5.10, Release Date: 2013-06-17'
sage: from sagenb.notebook.notebook_object import test_notebook
sage: passwd = str(randint(1,1<<128))
sage: nb = test_notebook(passwd, secure=False, interface='localhost', port=Integer(9000), verbose=True, directory=None)
Instead of running server, I get the following:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-8-6fc45872bdcd> in <module>()
----> 1 nb = test_notebook(passwd, secure=False, interface='localhost', port=Integer(9000), verbose=True,directory=None)
/opt/sage/devel/sagenb/sagenb/notebook/notebook_object.pyc in test_notebook(admin_passwd, secure, directory, port, interface, verbose)
266
267 nb = _notebook.load_notebook(directory)
--> 268 nb.set_accounts(True)
269 nb.add_user('admin', admin_passwd, '')
270 nb.set_accounts(False)
AttributeError: 'Notebook' object has no attribute 'set_accounts'
I have also tried to connect to a "normal" sage server created by notebook() via 'simple' URL:
http://localhost:8080/simple/login?username=admin&password=%s
which returns error 404
Does the sage server API work in sage 5.10? Is there a workaround how to create such server? Is there any other way to execute some sage code remotely?
ADuC812Sun, 25 Aug 2013 10:26:41 -0500https://ask.sagemath.org/question/10469/Graphics are plotted on the wrong X11 displayhttps://ask.sagemath.org/question/10403/graphics-are-plotted-on-the-wrong-x11-display/I set up a sage server by adding the following line to my ~/.profile:
nohup sage -c "notebook(interface='', secure=True, automatic_login=False, directory='./sage_notebook.sagenb')" >/dev/null 2>&1 &
I run my sage server from an Ubuntu desktop.
When I login and try to plot graphics from my laptop, the figures appear on my desktop screen.
I tried looking for solutions to this online, but I could not find anything. feynmanFri, 02 Aug 2013 03:46:02 -0500https://ask.sagemath.org/question/10403/Server not foundhttps://ask.sagemath.org/question/7526/server-not-found/I just downloaded the Sage app for OS X and after an hour of waiting the server still can not e found. Any ideas on what I am doing wrong?mikesev19Mon, 01 Jul 2013 10:05:30 -0500https://ask.sagemath.org/question/7526/Secure notebook with htaccess?https://ask.sagemath.org/question/10247/secure-notebook-with-htaccess/Hi,
we installed sage-5.9 on a server (Ubuntu 12.04) of our working group. We would like to open the port, such that all members of the team can access the notebook without a ssh tunnel. Is it possible to secure the access with htaccess or something like that?
Or to ask it in an other direction: Is a notebook secure enough without restricting the access? The users are not allowed to create new users. But could this be a security issue for our server?
Thanks.Ivo HedtkeMon, 17 Jun 2013 05:16:54 -0500https://ask.sagemath.org/question/10247/browser settingshttps://ask.sagemath.org/question/10199/browser-settings/Hi Folks:
I would like to know where I would configure browser settings for the user on a Sage server.
I built a Sage server for students to use at school (Sage 5.9 on Ubuntu Server 12.04.2 x64). While building the system, I was comparing the browser behavior (using Firefox 21.0 w/ Java Platform SE 7 & Deployment Toolkit) to the public Sage server at sagenb.org (Sage 5.4). I noticed a couple of differences: First, when a new worksheet is made, the sagenb.org site displays the new worksheet in the same tab whereas the home-built server opens another tab for the worksheet. Second, when a plot is created, the sagenb.org site automatically renders it interactively whereas the home-built server renders a static image first with an interactive button.
Are these differences a result of different Sage versions? Are there other settings? Can these setting be changed? If so, where are they located and are they documented? Thanks!
Have a GREAT DAY!!
Shaun
em2slynMon, 10 Jun 2013 14:24:54 -0500https://ask.sagemath.org/question/10199/Securing a Sage Serverhttps://ask.sagemath.org/question/10205/securing-a-sage-server/Hi Folks:
I am looking for a procedure on how to secure a Sage server and could use some expertise.
I built a Sage server based on the instructions provided in the Wiki article, *Setting Up a Sage Server* (Sage 5.9 on Ubuntu Server 12.04.2). I've disabled self registration and add users through the command line so that accounts and passwords can be distributed to those who need access prior to their initial sign in. My understanding is that when users login, passwords are sent in the clear using the default configuration. Since I'd like students to have access outside of school, securing the Sage server would be a prudent step.
I'm using HAProxy as the reverse proxy server and would like to secure the user logins using SSL. I've been searching the web to find some guides but with limited success. Does anyone know of any websites that I could use as reference or have a procedure that would help walk through the process of preparing OpenSSL, setting up HAProxy, and configuring Sage?
I'm building this so students at our school can use this in their classes. Any help would be appreciated. Thanks!
Have a GREAT DAY!!
Shaunem2slynSat, 08 Jun 2013 05:12:18 -0500https://ask.sagemath.org/question/10205/