embed bash terminal in notebook?

262 views
Skip to first unread message

Hai Nguyen

unread,
Jun 30, 2016, 2:05:24 PM6/30/16
to jup...@googlegroups.com
Hi all,

is there any way to embed a real bash terminal in notebook? like embedding HTML by IFrame.

I am aware of %%bash magic, '!' trick and bash_kernel but none of them are as convenient to use
as the real bash shell (for example, I just want to hit Enter to execute the command rather
Ctrl-Enter)

Cheers
Hai

Fernando Perez

unread,
Jun 30, 2016, 3:20:19 PM6/30/16
to Project Jupyter
The Notebook already offers a "real" terminal, if you go to the "New" menu in the home page you can open a standalone terminal. 

Warning: hack ahead.

Now, since those get a URL, you can iframe that, though it's a bit of a crazy hack:

Inline image 1

If you really, really want to do this regularly, you could wrap the JS API calls to create a new terminal, get its URL and iframe it all into one utility function. I don't think that's something we want to expose officially (that object's lifetime won't be coordinated with the notebook state and kernel lifetime, etc). But it's fine if you want to do it as a personal little utility.

Cheers,

f

Hai Nguyen

unread,
Jun 30, 2016, 3:36:53 PM6/30/16
to jup...@googlegroups.com

great. this is exactly what I need for my personal use. thanks

Hai
Reply all
Reply to author
Forward
0 new messages