Raspberry Pi - VNC 서버 설치

OS/Raspberry Pi 2017.09.04 00:31 Posted by 파란크리스마스

출처 : Raspberry Pi 3를 VNC로 접속하여 원격 제어하는 방법 (x11vnc)

VNC 서버 설치

$ sudo apt-get install x11vnc xinetd

VNC 서버 해상도 설정

$ sudo vi /boot/config.txt

주석 제거

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1280
framebuffer_height=720

재부팅

$ sudo shutdown -r now

암호 설정

$ sudo x11vnc -storepasswd /etc/x11vnc.pass
Enter VNC password: 
Verify password:    
Write password to /etc/x11vnc.pass?  [y]/n y
Password written to: /etc/x11vnc.pass

암호 설정

$ sudo vi /lib/systemd/system/x11vnc.service

주석 제거

[Unit]
Description="x11vnc"
Requires=display-manager.service
After=display-manager.service

[Service]
ExecStart=/usr/bin/x11vnc -xkb -loop -noxrecord -noxfixes -noxdamage -display :0 -auth guess -rfbauth /etc/x11vnc.pass
ExecStop=/usr/bin/killall x11vnc

[Install]
WantedBy=multi-user.target

VNC 서버 실행

$ sudo systemctl daemon-reload
$ sudo systemctl start x11vnc

VNC 서버 서비스 등록

$ sudo systemctl enable x11vnc
Created symlink from /etc/systemd/system/multi-user.target.wants/x11vnc.service to /lib/systemd/system/x11vnc.service.