By following the tutorial from Running an iPython Notebook Server on AWS - EC2 Instance
I successfully configured the ipython notebook server on AWS EC2 instance, also I found that to use matplotlib module I have to ssh -X to the instance and then run:
nohup ipython notebook --profile=nbserver
and then set
%matplotlib inline
in the ipython notebook connected through https in the browser.
Now I want to automate the whole process so that I can directly open the browser to use the ipython notebook when starting an instance, just like the RStudio AMI created by Louis Aslett, so I tried:
crontab -e
then I add the following line to the end of this file
@reboot nohup ipython notebook --profile=nbserver
But but when I reboot this instance this command won't work. Also I don't know how to enable X11 forward in the start up script so that I can use matplotlib to plot. Can someone help me with this configuration?