레이블이 ssh인 게시물을 표시합니다. 모든 게시물 표시
레이블이 ssh인 게시물을 표시합니다. 모든 게시물 표시

2011년 10월 6일 목요일

ssh client에 있는 Xserver를 DISPLAY에 설정하기

ssh접속하는 경우에, DISPLAY를 자동으로 설정하게 하여서 추가적인 작업없이 Xserver를 바로 사용할 수 있게 하는 script. .bash_profile에 넣어두면 된다.

export DISPLAY=`echo $SSH_CLIENT |cut -d ' ' -f 1`:0.0

This bash script set "DISPLAY" environment variable automatically with your ssh client IP address. Put this line in ".bash_profile" if you want to run this whenever you login with ssh connection.