keep the same conda env after entering screen

走远了吗. 提交于 2020-01-05 04:13:09

问题


I have tried the following

at the end of my .screenrc

conda activate ${CONDA_DEFAULT_ENV}

in my bash terminal, I typed:

conda activate atwork3
echo ${CONDA_DEFAULT_ENV}
> atwork3
screen -S test
> # starts screen OK but comes with env base
echo ${CONDA_DEFAULT_ENV}
> base

I read that you cannot put bad commands in the .screenrc or the full file gets ignored which is probably what happens to me here

I also tried things from how-to-open-tabs-windows-in-gnu-screen-execute-commands-within-each-one but did not yet get the real stuff behind these comments and how to specify a command in .screenrc or at screen call (examples are weird to me)

Anyone could please give an example on how to change env while entering screen to keep the conda env of the mother bash terminal! (also in subscreens!)

来源:https://stackoverflow.com/questions/57705407/keep-the-same-conda-env-after-entering-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!