Instructions based on Piazza posts from students from previous years.
Sage is installed on the CS department machines, but is not included in your path. To add it to your path, you can execute the command
export PATH=/usr/local/sage:$PATH
. You will have to run this command everytime you use Sage unless you add this command
to your .bashrc file. Once Sage has been added to your path, you can run sage -n jupyter
to run the notebook. If it
does not automatically open a browser, you can open one yourself and visit http://localhost:8888/tree
.
When working remotely, there are two options: X11 forwarding and port forwarding. For both options, ensure that the notebooks are saved in an accessible directory on the remote machine.
X11 forwarding works by running everything locally on the department machine and sending the window drawing to your machine. As such,
it can be somewhat slow. To start an ssh connection with X11 forwarding enabled, add -X as an option to ssh:
ssh -X <username>@<machine>.cs.colostate.edu
Depending on your operating system, you may need to install packages to make this work - MacOS, for example, requires Xming or an equivalent.
Port forwarding works by connecting the ports on the two machines. Here we make port 8888 on your machine redirect to port 8888 on the university machine.
To port forward, log into the CS machine using
ssh -L 8888:localhost:8888 <username>@<machine>.cs.colostate.edu
Then you will want to run
sage -n jupyter --no-browser
where you will see
you can then visit the URL displayed when you run Sage on the CS machine and access the notebook:
If you are using PuTTy, enter your host as normal
Then navigate to Connections/SSH/Tunnels
Then enter in