KDE service menu for ipython notebook

Gribouillis 1 Tallied Votes 594 Views Share

This snippet is reserved for users of the KDE linux desktop. It adds a service menu to kde applications such as dolphin and konqueror, to launch an ipython dashboard in a directory in one click.

More specifically, save the text of this snippet as a file ~/.kde/share/kde4/services/ServiceMenus/opennotebook.desktop (create the directory if necessary). Make sure ipython is installed. You may prefer an install via sudo pip install ipython over your distribution's ipython-notebook package (I experienced issues with ipython older than 1.1.0).

Then open dolphin and right-click a directory. In the Actions submenu, there should be an entry Start Notebook. Upon clicking this entry, a konsole tab opens which runs an ipython notebook. A web page appears in the default web browser which is the ipython dashboard for notebooks stored in this directory. We are ready to use python comfortably in 2 clicks !

I use this service menu every day, and it is very handy. I hope you'll enjoy it.

[Desktop Entry]

[Desktop Action OpenNotebook]
Exec=/usr/bin/konsole --workdir %f --new-tab --hold -e /bin/bash --rcfile ~/.bashrc -i -c "ipython notebook"
Name=Start Notebook