The Beautiful Future

ubuntu remote connection 본문

스킬

ubuntu remote connection

Small Octopus 2018. 1. 23. 11:11

ssh soulhyuk@ml1.snowcorp.com

#vnc

- XRDP 란

통신프로토콜제공해준다.

포트번호는 3389

설치

$sudo apt-get install xrdp

- vnc 서버

참고한 블로그

https://blog.naver.com/PostView.nhn?blogId=engcang&logNo=221189076518&redirect=Dlog&widgetTypeCall=true&directAccess=false

- 설치

$sudo apt-get install gnome-panel vnc4server

-처음 실행 시 비번 설정, 실행할때마다 접속 가능한 디스플레이를 생성한다.

 나중에 접속시 IP:1 or IP:2 이런식으로 번호를 이용 접속가능하다.

$vnc4server

- 비번 바꾸기

$vncpassswd

- 서버종료, 위에서 비번 설정했던 것을 끄자. 뒤에 디스플레이 번호를 적어주면 됨.

$vnc4server -kill:1

- 스타트업파일 설정

$cp ~/.vnc/xstartup ~/.vnc/xstartup.old

- 테스트 에디터를 사용 아래와 같이 수정

$vim ~/.vnc/xstartup

unset SESSION_MANAGER

unset DBUS_SESSION_BUS_ADDRESS

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

gnome-panel &

gnome-settings-daemon &

metacity &

nautilus &

gnome-terminal &

- 실행방법

$vnc4server -geometry 1024x768

또는 디폴트 레졸루션을 미리정의

$ExeStart=/usr/bin/vncserver -depth 24 -geometry 1280x1024 :%I

- 공유설정

- vnc Viewer

리얼vnc 상업적 유료

https://www.realvnc.com/en/connect/download/viewer/

울트라 vnc 무료

http://www.uvnc.com/downloads/ultravnc.html

- 접속방법

뷰어에서 아이피:디스플레이번호

IP:display_number

ex) 192.168.0.1:display_number

- 자동실행

$ sudo nano /etc/init.d/vncserver

#!/bin/bash

### BEGIN INIT INFO

# Provides:          vncserver

# Required-Start:    networking

# Required-Stop:     networking

# Default-Start:     2 3 4 5

# Default-Stop:      0 1 6

### END INIT INFO

PATH="$PATH:/usr/bin/"

export USER="u12"

DISPLAY="1"

DEPTH="16"

GEOMETRY="1024x768"

OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"

. /lib/lsb/init-functions

case "$1" in

start)

log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"

su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"

;;

stop)

log_action_begin_msg "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}"

su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"

;;

restart)

$0 stop

$0 start

;;

esac

exit 0

$ sudo chmod +x /etc/init.d/vncserver

$ sudo update-rc.d vncserver defaults


# xrdp, ui로 연결

http://c-nergy.be/blog/?p=5305

http://jimnong.tistory.com/696?category=575588


# 데이터 복사 scp

https://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_scp_%EC%82%AC%EC%9A%A9%EB%B2%95


# 메모리 사용량

https://askubuntu.com/questions/432836/how-can-i-check-disk-space-used-in-a-partition-using-the-terminal-in-ubuntu-12-0/432842

$df -h

$df -h /home/

'스킬' 카테고리의 다른 글

Docker  (0) 2019.05.07
LAPACK 설치 windows  (0) 2019.04.04
git command  (0) 2017.11.10
Install Atom editor and integration with Github  (0) 2017.11.10
우분투 명령어  (0) 2017.08.09
Comments