라즈베리파이에 GUI 모드로 원격접속을 하기 위해서 라즈베리파이에 TightVnc Server 를 설치한다.
vncserver :1
- 1번 호스트를 사용한다는 말이라고 이해하면 된다.
- 이후 뷰어 실행 시 Remote Host에 IP:1 을 입력하고 연결하면 된다.
pi@raspberrypi ~ $ sudo apt–get install tightvncserver…. (설치 과정 생략)pi@raspberrypi ~ $ tightvncserverYou will require a password to access your desktops.Password:Verify:Would you like to enter a view–only password (y/n)? nNew ‘X’ desktop is raspberrypi:1Creating default startup script /home/pi/.vnc/xstartupStarting applications specified in /home/pi/.vnc/xstartupLog file is /home/pi/.vnc/raspberrypi:1.logpi@raspberrypi ~ $ vncserver :1 –geometry 1920×1080 –depth 24A VNC server is already running as :1pi@raspberrypi ~ $ sudo netstat –tulpnActive Internet connections (only servers)Proto Recv–Q Send–Q Local Address Foreign Address State PID/Program nametcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 2724/Xtightvnctcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 2724/Xtightvnctcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2268/sshdudp 0 0 0.0.0.0:68 0.0.0.0:* 2223/dhclientudp 0 0 192.168.0.9:123 0.0.0.0:* 2101/ntpdudp 0 0 127.0.0.1:123 0.0.0.0:* 2101/ntpdudp 0 0 0.0.0.0:123 0.0.0.0:* 2101/ntpdudp 0 0 0.0.0.0:2263 0.0.0.0:* 2223/dhclientpi@raspberrypi ~cs
TightVnc Viewer 를 통해 라즈베리파이에 접속할 수 있다.
- 라즈베리파이 접속 용도로 윈도우 PC에 설치하는 경우, Server는 설치할 필요 없다.