On 6 čnc, 22:02, "Dr. David Kirkby" <[email protected]> wrote:
> On 07/ 6/10 08:48 PM, [email protected] wrote:
>
>
>
> > I can manually start Sage for web access as follows from the command
> > line:
>
> > [sag...@het-math ~]$ sage
> > ----------------------------------------------------------------------
> > | Sage Version 4.3.4, Release Date: 2010-03-19                       |
> > | Type notebook() for the GUI, and license() for information.        |
> > ----------------------------------------------------------------------
> > sage: notebook(interface="",open_viewer=False)
>
> > However, I would like this to happen automatically
> > on bootup, w/ no manual intervention required.
>
> > Is there an undocumented incantation of the sage command
> > that I could put in a .rc bootup script?
>
> > Thanks,
> > Richard Vaughn
>
> You need a startup script - the format of which depends on your operating
> system, not Sage. Sage itself has no way to start at boot.
>
> Something like:
>
>           su - sageserv /local-bins/start-sage
>
> in a startup script will run the script 'start-sage' as a user 'sageserv'
>
> then the script should have something like:
>
> nohup /homes/sageserv/sage-4.4.2.alpha0-t2.math/sage
> /homes/sageserv/notebook.py >>  /homes/sageserv/logfile.out&
>
> which will start sage, while reading notebook.py
>
> Exactly how you do it will depend on operating system.
>
> That's how I did it on Solaris, though  the correct way to do it on Solaris
> would be using the Service Management Facility (SWF). Your system might use
> something like that - I'm not a linux guru

Also not linux guru , but this is my configuration:
* my Sage is in /opt/sage  (soft link which can be changed easily when
testing new version)
* my Sage notebook directory is /opt/dotsage/sage_notebook

* the file /etc/rc.local contains line
nohup su sage -c 'cd /opt/sage&&./sage ../notebook.sage' &> /dev/null
&

* the file /opt/notebook.sage contains one line:
notebook(address='', secure=False, accounts=True, open_viewer=False,
server_pool=['sageu...@localhost'],directory='/opt/dotsage/
sage_notebook', timeout=2000, ulimit="-v 300000")

* sage user can log to sageuser user without password.

Hope this helps
Robert

-- 
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
URL: http://www.sagemath.org

Reply via email to