sudo apt-get install tmux
then create this shell scripts somewhere in your $PATH
and chmod +x
them.
#!/bin/bash
tmux new-session -d -s ipython && \
tmux send-keys -t ipython 'ipython notebook --no-browser --profile=santiago' Enter && \
notify-send IPython 'Notebook started: http://localhost:8888' || \
notify-send IPython 'Failed to start. Maybe it was already running: http://localhost:8888'
#!/bin/bash
tmux new-session -d -s ijulia && \
tmux send-keys -t ijulia 'ipython notebook --no-browser --profile=julia' Enter && \
notify-send IJulia 'Notebook started: http://localhost:8888' || \
notify-send IJulia 'Failed to start. Maybe it was already running: http://localhost:8888'
and finally create launchers for them. I did this from the cinnamon menu editor in linux mint.
Reattach to them with tmux attach
.
The other files in this gist are an older method. It asked you for a folder from where to start the notebook. This new method always start from the home directory, thats how I like it.
Make an executable file:
#!/bin/bash
tmux new-session -d -s ipython && \
tmux send-keys -t ipython 'ipython notebook --no-browser --profile=santiago' Enter
URL=`echo "$1" | cut -d / -f 4-`
google-chrome "http://localhost:8888/notebooks/$URL"
and set it as the default application for .ipynb files