William Stein wrote: > On Wed, Dec 23, 2009 at 12:42 PM, Dr. David Kirkby > <david.kir...@onetel.net> wrote: >> rvaug...@gmail.com wrote: >>> Thanks for all the security-related comments and suggestions. >>> Very helpful, and very appreciated. >>> >>> Another question: >>> We'd like the "sage: notebook(address="",open_viewer=False, secure = >>> True) " >>> to be executed on boot-up so that it's "there" when anyone wants it. >>> Any suggestions on how? /etc/init.d/{script}? >>> >>> Thanks, >>> -Richard Vaughn >> I run my first 'public' server yesterday, so my experience is pretty small, >> but >> I suspect something like a startup script with >> >> su - sage /homes/sage/sage-4.2/sage -notebook address='' >> server_pool=['sa...@localhost'] ulimit='-v 500000' accounts=True >> >> >> >> should start the process as non-root. However, there are too many quotes in >> that >> command - > > Just make a script in /usr/local/bin/, e.g., > > /usr/local/bin/start_sage_server > > put something like this in it: > > /homes/sage/sage-4.2/sage -notebook address='' accounts=True > > William >
I created a script like you said, though since it was for test, I stuck it in /tmp. Anyway, here's my script. -bash-3.00$ cat /tmp/start_sage_server #!/bin/sh /homes/sage/sage-4.2/sage -notebook address='' server_pool=['sa...@localhost'] ulimit='-v 500000' accounts=True Here is the output from Sage. Is this normal? They syntax is quite around the : notebook(address=r'''''',server_pool=r'''[sa...@localhost]''',ulimit=r'''-v 500000''',accounts=True) is different to what I'd type to start the notebook at the sage: prompt. I think you can see my concern about whether there are extra quotes here. Where does the latter 'r' come from, after the address= and after the serverpool=? -bash-3.00$ /tmp/start_sage_server ---------------------------------------------------------------------- | Sage Version 4.2.1, Release Date: 2009-11-14 | | | | Built on Solaris 10 03/2005 so will run on any Solaris 10 system | | Note, at this point in time, Sage on Solaris is somewhat | | experimental, having not had extensive testing. | | | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- Please wait while the Sage Notebook server starts... ... notebook(address=r'''''',server_pool=r'''[sa...@localhost]''',ulimit=r'''-v 500000''',accounts=True) ********************************************************************** WARNING: Running the notebook insecurely not on localhost is dangerous because its possible for people to sniff passwords and gain access to your account. Make sure you know what you are doing. ********************************************************************** The notebook files are stored in: sage_notebook.sagenb ********************************************************************** WARNING: Insecure notebook server listening on external address. Unless you are running this via ssh port forwarding, you are **crazy**! You should run the notebook with the option secure=True. ********************************************************************** ************************************************** * * * Open your web browser to http://localhost:8000 * * * ************************************************** /homes/sage/sage-4.2/local/lib/python2.6/site-packages/Twisted-8.2.0-py2.6-solaris-2.10-sun4u.egg/twisted/internet/_sslverify.py:5: DeprecationWarning: the md5 module is deprecated; use hashlib instead import itertools, md5 2009-12-24 04:25:46+0000 [-] Log opened. 2009-12-24 04:25:46+0000 [-] twistd 8.2.0 (/homes/sage/sage-4.2/local/bin/python 2.6.2) starting up. 2009-12-24 04:25:46+0000 [-] reactor class: twisted.internet.selectreactor.SelectReactor. 2009-12-24 04:25:46+0000 [-] twisted.web2.channel.http.HTTPFactory starting on 8000 2009-12-24 04:25:46+0000 [-] Starting factory <twisted.web2.channel.http.HTTPFactory instance at 0x38830d0> /homes/sage/sage-4.2/local/bin/sage-native-execute: xdg-open: not found -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org