On Mon, May 26, 2008 at 4:09 PM, Greg Landweber
<[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I just noticed that as of Sage 3.0.1, the notebook has default
> secure=False. While that is all well and good for localhost use, I run
> a Sage notebook server, and I need to set secure=True. I would happily
> do so explicitly, except that I have my computer configured to
> automatically start the sage notebook from the command line, and I
> have not been able to get Sage to change the secure setting from the
> command line.

Not reading further, may I recommend using "sage -c" instead of "sage
-notebook"?
See below.

teragon-2:~ was$ sage -c "print 2+3"
5
teragon-2:~ was$ sage -c "print notebook(secure=True)"
The notebook files are stored in: /Users/was/.sage//sage_notebook
Port 8000 is already in use.
Trying next port...
****************************************************
*                                                  *
* Open your web browser to https://localhost:8001  *
*                                                  *
****************************************************


>
> My current working Sage command is:
>
> /Applications/sage/sage -notebook ~/.sage/sage_notebook 8000 greg.bard.edu
>
> but starting with Sage 3.0.1, this opens an insecure server, which on
> startup tells me that I must be crazy. According to the notebook?
> help, if I wanted to run in secure mode I would need to use the
> command
>
> /Applications/sage/sage -notebook ~/.sage/sage_notebook 8000
> greg.bard.edu 0 True
>
> However, sage is complaining about the "0", presumably for the
> port_tries parameter, giving me the traceback:
>
> Traceback (most recent call last):
>  File "/Applications/sage/local/bin/sage-notebook", line 14, in <module>
>    notebook(*sys.argv[1:])
>  File 
> "/Applications/sage/local/lib/python2.5/site-packages/sage/server/notebook/notebook_object.py",
> line 143, in __call__
>    return self.notebook(*args, **kwds)
>  File 
> "/Applications/sage/local/lib/python2.5/site-packages/sage/server/notebook/run_notebook.py",
> line 266, in notebook_twisted
>    port = find_next_available_port(port, port_tries)
>  File 
> "/Applications/sage/local/lib/python2.5/site-packages/sage/server/misc.py",
> line 91, in find_next_available_port
>    for port in range(start, start+max_tries+1):
> TypeError: unsupported operand type(s) for +: 'int' and 'str'
>
> Is it treating the max_tries parameter as a string?
>
> -- Greg
>
> --
> Gregory D. Landweber
> Assistant Professor of Mathematics
> Bard College
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to