On Sat, Dec 26, 2009 at 9:38 PM, Dr. David Kirkby
<[email protected]> wrote:
> I've created a startup script
>
> /local-bins/start-sage
>
> to start Sage, which has in it:
>
> #!/usr/bin/env bash
> /homes/sageserv/sage-4.3/sage -notebook address='' accounts=True
> server_pool=['sa...@localhost']
>
>
> If I try to start Sage from that script, so the server starts on port 8000, 
> but
> it is log logging in correctly as user 'sage1' . Note the line shown in sage:
>
> notebook(address=r'''''',accounts=True,server_pool=r'''[sa...@localhost]''')
>
> bears little resemblence to what is in the startup script.
>
> Out of the 3 variables passed, only the 'accounts=True' looks right. Both
> 'address' and 'server_pool' look rather strange. The server starts, but can't
> actually compute anything. You can see below an error generated by the ssh
> command - clearly it is being sent something it does not understand.
>
> If instead I start the Sage manually, without a script, and type the same type
> at the sage prompt, so the server works fine, and things can be computed.
>
> Any ideas what might be wrong? Is sed/awk or similar tools used in some way to
> parse the startup script, using GNU-specific options?
>
> At the minute, the only way I can run the sage server is to log in manually 
> and
> start Sage. Clearly that wont survive a reboot
>

There is no need or reason to use "sage -notebook".  Instead, here's
what I do to make it so I can start sagenb.org with a script ("start")
-- I just write a little Python script:

wst...@boxen:/sagenb/sagenb$ more notebook.py
import sagenb.notebook.notebook_object as n

server_pool=['sagen...@localhost']

n.notebook('sage_notebook', port=8888, accounts=True, address='',
         server_pool = server_pool, ulimit='-u 1000 -v 1000000 -t 3600',
    open_viewer=False, timeout=20*60, secure=False, port_tries=0)

wst...@boxen:/sagenb/sagenb$ more start
nohup sage notebook.py 1>> logs/notebook.out 2>>logs/notebook.err &

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to