일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- HDF5
- MAC
- portforwarding
- Matplotlib
- SSH
- c++
- LaTeX
- conda
- vim
- cython
- jupyter
- h5py
- HFS+
- cygwin
- tab space
- datascience
- virtual
- mpi4py
- Anaconda
- intel compiler
- arXiver
- GSL
- hyperref
- Visual Studio
- vi
- gfortran
- Windows
- python
- polyglot
- openmp
- Today
- Total
Astro Coke
[Cygwin] Import User Path Variable in Windows when access with SSH 본문
[Cygwin] Import User Path Variable in Windows when access with SSH
astrodoo 2019. 4. 4. 10:44SSH 로 접속을 했을 때, Cygwin 이 Windows 의 User Path Variable 을 읽어들이지 않고 System Path Variable 만 읽어들인다.
비슷한 경우:
https://superuser.com/questions/547098/does-cygwin-import-user-variables-or-just-system-variables
Does Cygwin import user variables or just system variables?
I can see windows system variables in cygwin with echo $MYVar However, user variables don't seem to work. I'm referring to the variables you set in system properties->advanced->environment varia...
superuser.com
Cygwin Doesn't Register All Environment Variables When Using SSH | smithii.com
When initiating a Cygwin bash session via SSH, Cygwin only registers the environment variables for the SYSTEM account, not for the individual user's account. So I added the following code to the end of my .bashrc file: if [ "$SSH_TTY" ]; then pushd . >/dev
smithii.com
이를 해결하기 위해서는 위의 두번째에서 알려주는 방법을 쓸 수도 있지만,
내 경우에는 에러가 발생했다.
가장 간단한 방법은
SSH로 접속할 때에만 따로 User Path Variables 을 .bashrc 에 추가하는 것이다.
.bashrc 의 맨 아래에 다음과 같이 추가하면 된다.
ex)
if [[ -n "$SSH_TTY" ]]; then
export PATH="$PATH:/cygdrive/c/Users/astrodoo/Anaconda3:/cygdrive/c/Users/astrodoo/Anaconda3/Scripts"
fi
'Computer Setup' 카테고리의 다른 글
[Chrome&Windows] 'Establishing secure connection' issue (0) | 2019.04.05 |
---|---|
[Vim] vim or vimdiff colorscheme setting (0) | 2019.04.04 |
[Cygwin] Using Tex Live in Cygwin (0) | 2019.04.04 |
[Python] inline backend 와 matplotlibrc 의 충돌 (0) | 2019.04.03 |
[Cython&openmp] omp.h file not found (0) | 2019.03.28 |