jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.6k stars 4.86k forks source link

shell_command config option for terminado not picked up #2339

Open quaxquax opened 7 years ago

quaxquax commented 7 years ago

When trying to set the shell for the terminado terminal I came across this documentation that mentions the _shellcommand option, which is supposed to be a python dictionary.

The shape of the dictionary is not specified, but from this code I gleamed that the following line may, work, but it apparently does not get picked up.

c.NotebookApp.terminado_settings={'shell_command': ['bash']}

Any pointers as how to use that option?

Many thanks in advance!

quaxquax commented 7 years ago

I failed to mention, I am using the Jupyter version included in the latest Anaconda distribution, i.e. Python 3.6 with the package jupyter_core-4.2.1-py36_0

>>$ jupyter --version
4.2.1
gnestor commented 7 years ago

That looks right to me...

@minrk @Carreau Any ideas?

minrk commented 7 years ago

What's conda list? I used that config and it does indeed change the shell. Where are you setting the configuration?

quaxquax commented 7 years ago

Here's my conda -list output. Thanks for taking a look at this.

root@ip-172-31-16-26:~# conda list

packages in environment at /opt/anaconda3:

# _license 1.1 py36_1
alabaster 0.7.9 py36_0
anaconda custom py36_0
anaconda-client 1.6.0 py36_0
anaconda-navigator 1.5.0 py36_0
anaconda-project 0.4.1 py36_0
astroid 1.4.9 py36_0
astropy 1.3 np111py36_0
babel 2.3.4 py36_0
backports 1.0 py36_0
bash_kernel 0.6 beautifulsoup4 4.5.3 py36_0
bitarray 0.8.1 py36_0
blaze 0.10.1 py36_0
bokeh 0.12.4 py36_0
boto 2.45.0 py36_0
bottleneck 1.2.0 np111py36_0
bzip2 1.0.6 3
cairo 1.14.8 0
cffi 1.9.1 py36_0
chardet 2.3.0 py36_0
chest 0.2.3 py36_0
click 6.7 py36_0
cloudpickle 0.2.2 py36_0
clyent 1.2.2 py36_0
colorama 0.3.7 py36_0
conda 4.3.14 py36_0
conda-env 2.6.0 0
configobj 5.0.6 py36_0
contextlib2 0.5.4 py36_0
cryptography 1.7.1 py36_0
curl 7.52.1 0
cycler 0.10.0 py36_0
cython 0.25.2 py36_0
cytoolz 0.8.2 py36_0
dask 0.13.0 py36_0
datashape 0.5.4 py36_0
dbus 1.10.10 0
decorator 4.0.11 py36_0
dill 0.2.5 py36_0
docutils 0.13.1 py36_0
entrypoints 0.2.2 py36_0
et_xmlfile 1.0.1 py36_0
expat 2.1.0 0
ezvis3d 0.2 fastcache 1.0.2 py36_1
flask 0.12 py36_0
flask-cors 3.0.2 py36_0
fontconfig 2.12.1 2
freetype 2.5.5 2
get_terminal_size 1.0.0 py36_0
gevent 1.2.1 py36_0
glib 2.50.2 1
gmp 6.1.0 0
graphviz 2.38.0 4
graphviz 0.6 greenlet 0.4.11 py36_0
gsl 2.2.1 0
gst-plugins-base 1.8.0 0
gstreamer 1.8.0 0
h5py 2.6.0 np111py36_2
harfbuzz 0.9.39 2
hdf5 1.8.17 1
heapdict 1.0.0 py36_1
IBMQuantumExperience 1.1.0 icu 54.1 0
idna 2.2 py36_0
imagesize 0.7.1 py36_0
ipykernel 4.5.2 py36_0
ipython 5.1.0 py36_0
ipython_genutils 0.1.0 py36_0
ipywidgets 5.2.2 py36_1
isort 4.2.5 py36_0
itsdangerous 0.24 py36_0
jbig 2.1 0
jdcal 1.3 py36_0
jedi 0.9.0 py36_1
jinja2 2.9.4 py36_0
jpeg 9b 0
jsonschema 2.5.1 py36_0
jupyter 1.0.0 py36_3
jupyter_client 4.4.0 py36_0
jupyter_console 5.0.0 py36_0
jupyter_contrib_core 0.3.0 py36_1 conda-forge jupyter_contrib_nbextensions 0.2.6 py36_0 conda-forge jupyter_core 4.2.1 py36_0
jupyter_highlight_selected_word 0.0.10 py36_0 conda-forge jupyter_latex_envs 1.3.8.2 py36_1 conda-forge jupyter_nbextensions_configurator 0.2.4 py36_0 conda-forge lazy-object-proxy 1.2.2 py36_0
libffi 3.2.1 1
libgcc 5.2.0 0
libgfortran 3.0.0 1
libiconv 1.14 0
libpng 1.6.27 0
libsodium 1.0.10 0
libtiff 4.0.6 3
libtool 2.4.2 0
libxcb 1.12 1
libxml2 2.9.4 0
libxslt 1.1.29 0
llvmlite 0.15.0 py36_0
locket 0.2.0 py36_1
lxml 3.7.2 py36_0
markupsafe 0.23 py36_2
matplotlib 2.0.0 np111py36_0
metakernel 0.20.1 mistune 0.7.3 py36_0
mkl 2017.0.1 0
mkl-service 1.1.2 py36_3
mpmath 0.19 py36_1
multipledispatch 0.4.9 py36_0
nbconvert 4.2.0 py36_0
nbformat 4.2.0 py36_0
ncurses 5.9 10
networkx 1.11 py36_0
nltk 3.2.2 py36_0
nose 1.3.7 py36_1
notebook 4.3.1 py36_0
numba 0.30.1 np111py36_0
numexpr 2.6.1 np111py36_2
numpy 1.11.3 py36_0
numpydoc 0.6.0 py36_0
oct2py 4.0.5 octave-kernel 0.26.2 odo 0.5.0 py36_1
openpyxl 2.4.1 py36_0
openssl 1.0.2k 1
pandas 0.19.2 np111py36_1
pandoc 1.15.0.6 0
pango 1.40.3 1
partd 0.3.7 py36_0
path.py 10.0 py36_0
pathlib2 2.2.0 py36_0
patsy 0.4.1 py36_0
pcre 8.39 1
pep8 1.7.0 py36_0
pexpect 4.2.1 py36_0
pickleshare 0.7.4 py36_0
pillow 4.0.0 py36_0
pip 9.0.1 py36_1
pixman 0.34.0 0
ply 3.9 py36_0
prompt_toolkit 1.0.9 py36_0
psutil 5.0.1 py36_0
ptyprocess 0.5.1 py36_0
py 1.4.32 py36_0
pyasn1 0.1.9 py36_0
pycosat 0.6.1 py36_1
pycparser 2.17 py36_0
pycrypto 2.6.1 py36_4
pycurl 7.43.0 py36_2
pydotplus 2.0.2 pyflakes 1.5.0 py36_0
pygit2 0.25.0 pygments 2.1.3 py36_0
pylint 1.6.4 py36_1
pyopenssl 16.2.0 py36_0
pyparsing 2.1.4 py36_0
pyqt 5.6.0 py36_2
pyquil 0.0.2 pytables 3.3.0 np111py36_0
pytest 3.0.5 py36_0
python 3.6.0 0
python-dateutil 2.6.0 py36_0
pytz 2016.10 py36_0
pyyaml 3.12 py36_0
pyzmq 16.0.2 py36_0
qt 5.6.2 3
qtawesome 0.4.3 py36_0
qtconsole 4.2.1 py36_1
qtpy 1.2.1 py36_0
r 3.3.2 r3.3.2_0
r-assertthat 0.1 r3.3.2_4 r r-backports 1.0.4 r3.3.2_0 r r-base 3.3.2 1 r r-base64enc 0.1_3 r3.3.2_0 r r-bh 1.62.0_1 r3.3.2_0 r r-bitops 1.0_6 r3.3.2_2 r r-boot 1.3_18 r3.3.2_0 r r-broom 0.4.1 r3.3.2_0 r r-car 2.1_4 r3.3.2_0 r r-catools 1.17.1 r3.3.2_2 r r-class 7.3_14 r3.3.2_0 r r-cluster 2.0.5 r3.3.2_0 r r-codetools 0.2_15 r3.3.2_0 r r-colorspace 1.3_1 r3.3.2_0 r r-crayon 1.3.2 r3.3.2_0 r r-curl 2.3 r3.3.2_0
r-data.table 1.10.0 r3.3.2_0 r r-dbi 0.5_1 r3.3.2_0 r r-devtools 1.12.0 r3.3.2_0
r-dichromat 2.0_0 r3.3.2_2 r r-digest 0.6.10 r3.3.2_0 r r-doparallel 1.0.10 r3.3.2_0
r-dplyr 0.5.0 r3.3.2_0 r r-evaluate 0.10 r3.3.2_0 r r-forcats 0.1.1 r3.3.2_0 r r-foreach 1.4.3 r3.3.2_0 r r-foreign 0.8_67 r3.3.2_0 r r-formatr 1.4 r3.3.2_0 r r-ggplot2 2.2.0 r3.3.2_0
r-gistr 0.3.6 r3.3.2_0 r r-git2r 0.16.0 r3.3.2_0
r-glmnet 2.0_5 r3.3.2_0 r r-gridbase 0.4_7 r3.3.2_0
r-gtable 0.2.0 r3.3.2_0 r r-haven 1.0.0 r3.3.2_0 r r-hexbin 1.27.1 r3.3.2_0 r r-highr 0.6 r3.3.2_0 r r-hms 0.3 r3.3.2_0 r r-htmltools 0.3.5 r3.3.2_0 r r-htmlwidgets 0.8 r3.3.2_0 r r-httpuv 1.3.3 r3.3.2_0 r r-httr 1.2.1 r3.3.2_0
r-igraph 1.0.1 r3.3.2_0
r-irdisplay 0.4.4 r3.3.2_0 r r-irkernel 0.7.1 r3.3.2_0 r r-irlba 2.1.2 r3.3.2_0
r-iterators 1.0.8 r3.3.2_0 r r-jsonlite 1.1 r3.3.2_0 r r-kernsmooth 2.23_15 r3.3.2_0 r r-knitr 1.15.1 r3.3.2_0 r r-labeling 0.3 r3.3.2_2 r r-lattice 0.20_34 r3.3.2_0 r r-lazyeval 0.2.0 r3.3.2_0 r r-lme4 1.1_12 r3.3.2_0 r r-lubridate 1.6.0 r3.3.2_0 r r-magrittr 1.5 r3.3.2_2 r r-maps 3.1.1 r3.3.2_0 r r-markdown 0.7.7 r3.3.2_2 r r-mass 7.3_45 r3.3.2_0 r r-matrix 1.2_7.1 r3.3.2_0 r r-matrixmodels 0.4_1 r3.3.2_0 r r-memoise 1.0.0 r3.3.2_0
r-mgcv 1.8_16 r3.3.2_0 r r-mime 0.5 r3.3.2_0 r r-minqa 1.2.4 r3.3.2_2 r r-mnormt 1.5_5 r3.3.2_0 r r-modelr 0.1.0 r3.3.2_0 r r-munsell 0.4.3 r3.3.2_0 r r-nlme 3.1_128 r3.3.2_0 r r-nloptr 1.0.4 r3.3.2_2 r r-nmf 0.20.6 r3.3.2_0
r-nnet 7.3_12 r3.3.2_0 r r-openssl 0.9.5 r3.3.2_0
r-pbdzmq 0.2_4 r3.3.2_0
r-pbkrtest 0.4_6 r3.3.2_0 r r-pkgmaker 0.22 r3.3.2_0
r-plyr 1.8.4 r3.3.2_0
r-pryr 0.1.2 r3.3.2_0 r r-psych 1.6.9 r3.3.2_0 r r-purrr 0.2.2 r3.3.2_0 r r-quantmod 0.4_7 r3.3.2_0 r r-quantreg 5.29 r3.3.2_0 r r-r6 2.2.0 r3.3.2_0 r r-randomforest 4.6_12 r3.3.2_0 r r-rbokeh 0.5.0 r3.3.2_0 r r-rcolorbrewer 1.1_2 r3.3.2_3 r r-rcpp 0.12.8 r3.3.2_0
r-rcpparmadillo 0.7.500.0.0 r3.3.2_0
r-rcppeigen 0.3.2.9.0 r3.3.2_0 r r-readr 1.0.0 r3.3.2_0 r r-readxl 0.1.1 r3.3.2_0 r r-recommended 3.3.2 r3.3.2_0 r r-registry 0.3 r3.3.2_0
r-repr 0.10 r3.3.2_0 r r-reshape2 1.4.2 r3.3.2_0
r-rmarkdown 1.3 r3.3.2_0 r r-rngtools 1.2.4 r3.3.2_0
r-rpart 4.1_10 r3.3.2_0 r r-rprojroot 1.1 r3.3.2_0 r r-rstudioapi 0.6 r3.3.2_0
r-rvest 0.3.2 r3.3.2_0 r r-scales 0.4.1 r3.3.2_0
r-selectr 0.3_0 r3.3.2_0 r r-shiny 0.14.2 r3.3.2_0 r r-sourcetools 0.1.5 r3.3.2_0 r r-sparsem 1.74 r3.3.2_0 r r-spatial 7.3_11 r3.3.2_0 r r-stringi 1.1.2 r3.3.2_0 r r-stringr 1.1.0 r3.3.2_0 r r-survival 2.40_1 r3.3.2_0 r r-tibble 1.2 r3.3.2_0
r-tidyr 0.6.0 r3.3.2_0 r r-tidyverse 1.0.0 r3.3.2_0 r r-ttr 0.23_1 r3.3.2_0 r r-uuid 0.1_2 r3.3.2_0 r r-whisker 0.3_2 r3.3.2_2
r-withr 1.0.2 r3.3.2_0
r-xml2 1.0.0 r3.3.2_0 r r-xtable 1.8_2 r3.3.2_0 r r-xts 0.9_7 r3.3.2_2 r r-yaml 2.1.14 r3.3.2_0 r r-zoo 1.7_13 r3.3.2_0 r readline 6.2 2
redis 3.2.0 0
redis-py 2.10.5 py36_0
requests 2.12.4 py36_0
rope 0.9.4 py36_1
rpy2 2.8.5 py36r3.3.2_2
ruamel_yaml 0.11.14 py36_1
scikit-image 0.12.3 np111py36_1
scikit-learn 0.18.1 np111py36_1
scipy 0.18.1 np111py36_1
seaborn 0.7.1 py36_0
setuptools 27.2.0 py36_0
shellpy 0.5.0 simplegeneric 0.8.1 py36_1
singledispatch 3.4.0.3 py36_0
sip 4.18 py36_0
six 1.10.0 py36_0
snowballstemmer 1.2.1 py36_0
sockjs-tornado 1.0.3 py36_0
sphinx 1.5.1 py36_0
spyder 3.1.2 py36_0
sqlalchemy 1.1.5 py36_0
sqlite 3.13.0 0
statsmodels 0.6.1 np111py36_1
sympy 1.0 py36_0
terminado 0.6 py36_0
tk 8.5.18 0
toolz 0.8.2 py36_0
tornado 4.4.2 py36_0
traitlets 4.3.1 py36_0
unicodecsv 0.14.1 py36_0
wcwidth 0.1.7 py36_0
werkzeug 0.11.15 py36_0
wget 1.18 0
wget 3.2 wheel 0.29.0 py36_0
widgetsnbextension 1.2.6 py36_0
wrapt 1.10.8 py36_0
xlrd 1.0.0 py36_0
xlsxwriter 0.9.6 py36_0
xlwt 1.2.0 py36_0
xz 5.2.2 1
yaml 0.1.6 0
zeromq 4.1.5 0
zlib 1.2.8 3

minrk commented 7 years ago

Aha! Passing these settings to terminado is new in notebook 5.0, which should be released very soon. That's why it's not getting picked up.

quaxquax commented 7 years ago

Thanks for clearing this up! Looking forward to 5.0 :-)

On Fri, Mar 31, 2017 at 4:18 AM, Min RK notifications@github.com wrote:

Aha! Passing these settings to terminado is new in notebook 5.0, which should be released very soon. That's why it's not getting picked up.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jupyter/notebook/issues/2339#issuecomment-290648131, or mute the thread https://github.com/notifications/unsubscribe-auth/AFDYcimysVgJTZEBV5KMladT92JrsnPsks5rrLbygaJpZM4Mo7TQ .

GISTech01 commented 6 years ago

Hi @minrk , I'm currently running python 3.6.4 and jupyter notebook 5.6.0 and unable to get jupyter notebook to change from powershell to bash. I've followed the same steps as @quaxquax has the following been implemented yet?

lchutny commented 5 years ago

@minrk same as @GISTech01 - I'm using python 3.7.0, jupyter 5.6.0 and I can't get the notebook to recognize bash , it still wants to use powershell.

Monduiz commented 5 years ago

Same here, I added c.NotebookApp.terminado_settings={'shell_command': ['bash']} to the jupyter_notebook_config.py file and when I launch terminal from a jupyter session, terminal is not launched in bash with my variables.

RaghavendraSingh commented 4 years ago

Did anyone find a solution for this? I am still facing this issue in 5.6.0

kevin-bates commented 4 years ago

Not sure if this will be helpful but for releases prior to 6.x no "sourcing" of various profiles or rc scripts takes place. In 6.0+, and on non-Windows systems, the specified shell is invoked as a login shell (-l is added to its invocation) and you should find the corresponding 'login' resources (e.g., .bash_profile for bash) have been sourced.

However, in either set of versions (>= 5.0), you should find that the shell specified in shell_command has been invoked.