Running Sage for web browser automatically on bootup

6 views
Skip to first unread message

rvau...@gmail.com

unread,
Jul 6, 2010, 3:48:35 PM7/6/10
to sage-support, rvau...@rutgers.edu
I can manually start Sage for web access as follows from the command
line:

[sagenb@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

Dr. David Kirkby

unread,
Jul 6, 2010, 4:02:12 PM7/6/10
to sage-s...@googlegroups.com

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


Dave

ma...@mendelu.cz

unread,
Jul 6, 2010, 5:01:00 PM7/6/10
to sage-support


On 6 čnc, 22:02, "Dr. David Kirkby" <david.kir...@onetel.net> wrote:
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=['sageuser@localhost'],directory='/opt/dotsage/
sage_notebook', timeout=2000, ulimit="-v 300000")

* sage user can log to sageuser user without password.

Hope this helps
Robert
Reply all
Reply to author
Forward
0 new messages